Hadoop Questions and Answers – MapReduce Job – 2

This set of Hadoop Multiple Choice Questions & Answers (MCQs) focuses on “MapReduce Job – 2”.

1. _________ is a data migration tool added for archiving data.
a) Mover
b) Hiver
c) Serde
d) None of the mentioned
View Answer

Answer: a
Explanation: Mover periodically scans the files in HDFS to check if the block placement satisfies the storage policy.

2. Point out the correct statement.
a) Mover is not similar to Balancer
b) hdfs dfsadmin -setStoragePolicy <path> <policyName> puts a storage policy to a file or a directory.
c) addCacheArchive add archives to be localized
d) none of the mentioned
View Answer

Answer: c
Explanation: addArchiveToClassPath(Path archive) adds an archive path to the current set of classpath entries.

3. Which of the following is used to list out the storage policies?
a) hdfs storagepolicies
b) hdfs storage
c) hd storagepolicies
d) all of the mentioned
View Answer

Answer: a
Explanation: Arguments are none for the hdfs storagepolicies command.

4. Which of the following statement can be used to get the storage policy of a file or a directory?
a) hdfs dfsadmin -getStoragePolicy path
b) hdfs dfsadmin -setStoragePolicy path policyName
c) hdfs dfsadmin -listStoragePolicy path policyName
d) all of the mentioned
View Answer

Answer: a
Explanation: refers to the path referring to either a directory or a file.

advertisement
advertisement

5. Point out the wrong statement.
a) getInstance() creates a new Job with particular cluster
b) getInstance(Configuration conf) creates a new Job with no particular Cluster and a given Configuration
c) getInstance(JobStatus status, Configuration conf) creates a new Job with no particular Cluster and given Configuration and JobStatus
d) all of the mentioned
View Answer

Answer: a
Explanation: getInstance() creates a new Job with particular cluster.

6. Which of the following method is used to get user-specified job name?
a) getJobName()
b) getJobState()
c) getPriority()
d) all of the mentioned
View Answer

Answer: a
Explanation: getPriority() is used to get scheduling info of the job.

7. __________ get events indicating completion (success/failure) of component tasks.
a) getJobName()
b) getJobState()
c) getPriority()
d) getTaskCompletionEvents(int startFrom)
View Answer

Answer: d
Explanation: getPriority() provides scheduling info of the job.

8. _________ gets the diagnostic messages for a given task attempt.
a) getTaskOutputFilter(Configuration conf)
b) getTaskReports(TaskType type)
c) getTrackingURL()
d) all of the mentioned
View Answer

Answer: a
Explanation: getTaskDiagnostics(TaskAttemptID taskid) gets the diagnostic messages for a given task attempt.

advertisement

9. reduceProgress() gets the progress of the job’s reduce-tasks, as a float between _________
a) 0.0-1.0
b) 1.0-2.0
c) 2.0-3.0
d) None of the mentioned
View Answer

Answer: a
Explanation: mapProgress() is used to get the progress of the job’s map-tasks, as a float between 0.0 and 1.0.

10. The Job makes a copy of the _____________ so that any necessary internal modifications do not reflect on the incoming parameter.
a) Component
b) Configuration
c) Collector
d) None of the mentioned
View Answer

Answer: b
Explanation: A Cluster will be created from the conf parameter only when it’s needed.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Books in Hadoop.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.