試験科目：Hortonworks Data Platform Certified Developer
問題と解答：全110問 HDPCD 資格取得講座
NO.1 You write MapReduce job to process 100 files in HDFS. Your MapReduce algorithm uses
TextInputFormat: the mapper applies a regular expression over input values and emits key-values
pairs with the key consisting of the matching text, and the value containing the filename and byte
offset. Determine the difference between setting the number of reduces to one and settings the
number of reducers to zero.
A. There is no difference in output between the two settings.
B. With zero reducers, all instances of matching patterns are gathered together in one file on HDFS.
With one reducer, instances of matching patterns are stored in multiple files on HDFS.
C. With zero reducers, no reducer runs and the job throws an exception. With one reducer, instances
of matching patterns are stored in a single file on HDFS.
D. With zero reducers, instances of matching patterns are stored in multiple files on HDFS. With one
reducer, all instances of matching patterns are gathered together in one file on HDFS.
* It is legal to set the number of reduce-tasks to zero if no reduction is desired.
In this case the outputs of the map-tasks go directly to the FileSystem, into the output path set by
setOutputPath(Path). The framework does not sort the map-outputs before writing them out to the
* Often, you may want to process input data using a map function only. To do this, simply set
mapreduce.job.reduces to zero. The MapReduce framework will not create any reducer tasks.
Rather, the outputs of the mapper tasks will be the final output of the job.
In this phase the reduce(WritableComparable, Iterator, OutputCollector, Reporter) method
is called for each <key, (list of values)> pair in the grouped inputs.
The output of the reduce task is typically written to the FileSystem via
Applications can use the Reporter to report progress, set application-level status messages
and update Counters, or just indicate that they are alive.
The output of the Reducer is not sorted.
NO.2 Given the following Hive commands:
Which one of the following statements Is true?
A. The file mydata.txt is copied to a subfolder of /apps/hive/warehouse
B. The file mydata.txt is copied into Hive's underlying relational database 0.
C. The file mydata.txt does not move from Its current location in HDFS
D. The file mydata.txt is moved to a subfolder of /apps/hive/warehouse
NO.3 Which one of the following statements describes the relationship between the NodeManager
and the ApplicationMaster?
A. The ApplicationMaster starts the NodeManager in a Container
B. The ApplicationMaster starts the NodeManager outside of a Container
C. The NodeManager creates an instance of the ApplicationMaster
D. The NodeManager requests resources from the ApplicationMaster
NO.4 MapReduce v2 (MRv2/YARN) splits which major functions of the JobTracker into separate
daemons? Select two.
A. Managing file system metadata
B. Job scheduling/monitoring
C. Launching tasks
D. Job coordination between the ResourceManager and NodeManager
E. MapReduce metric reporting
F. Heath states checks (heartbeats)
G. Resource management
H. Managing tasks
The fundamental idea of MRv2 is to split up the two major functionalities of
the JobTracker, resource management and job scheduling/monitoring, into separate
daemons. The idea is to have a global ResourceManager (RM) and per-application
ApplicationMaster (AM). An application is either a single job in the classical sense of Map-
Reduce jobs or a DAG of jobs.
The central goal of YARN is to clearly separate two things that are unfortunately smushed
together in current Hadoop, specifically in (mainly) JobTracker:
/ Monitoring the status of the cluster with respect to which nodes have which resources
available. Under YARN, this will be global.
/ Managing the parallelization execution of any specific job. Under YARN, this will be done separately
for each job.
Reference: Apache Hadoop YARN - Concepts & Applications