Exam Code : HDPCD
Exam Name : Hortonworks Data Platform Certified Developer
Vendor Name :
"Hortonworks"
HDPCD Dumps HDPCD Braindumps HDPCD Real Questions HDPCD Practice Test
HDPCD Actual Questions
killexams.com Hortonworks HDPCD
Hortonworks Data Platform Certified Developer
https://killexams.com/pass4sure/exam-detail/HDPCD
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.
There is no difference in output between the two settings.
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.
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.
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 FileSystem.
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.
Note: Reduce
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 OutputCollector.collect(WritableComparable, Writable).
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.
Indentify the utility that allows you to create and run MapReduce jobs with any executable or script as the mapper and/or the reducer?
Oozie
Sqoop
Flume
Hadoop Streaming
mapred
Hadoop streaming is a utility that comes with the Hadoop distribution. The utility allows you to create and run Map/Reduce jobs with any executable or script as the mapper and/or the reducer.
http://hadoop.apache.org/common/docs/r0.20.1/streaming.html (Hadoop Streaming, second sentence)
Which one of the following statements is true about a Hive-managed table?
Records can only be added to the table using the Hive INSERT command.
When the table is dropped, the underlying folder in HDFS is deleted.
Hive dynamically defines the schema of the table based on the FROM clause of a SELECT query.
Hive dynamically defines the schema of the table based on the format of the underlying data.
You need to move a file titled “weblogs” into HDFS. When you try to copy the file, you can’t. You know you have ample space on your DataNodes. Which action should you take to relieve this situation and store more files in HDFS?
Increase the block size on all current files in HDFS.
Increase the block size on your remaining files.
Decrease the block size on your remaining files.
Increase the amount of memory for the NameNode.
Increase the number of disks (or size) for the NameNode.
Decrease the block size on all current files in HDFS.
Which process describes the lifecycle of a Mapper?
The JobTracker calls the TaskTracker’s configure () method, then its map () method and finally its close () method.
The TaskTracker spawns a new Mapper to process all records in a single input split.
The TaskTracker spawns a new Mapper to process each key-value pair.
The JobTracker spawns a new Mapper to process all records in a single file.
For each map instance that runs, the TaskTracker creates a new instance of your mapper.
Note:
The Mapper is responsible for processing Key/Value pairs obtained from the InputFormat. The mapper may perform a number of Extraction and Transformation functions on the Key/Value pair before ultimately outputting none, one or many Key/Value pairs of the same, or different Key/Value type.
With the new Hadoop API, mappers extend the org.apache.hadoop.mapreduce.Mapper class. This class defines an 'Identity' map function by default - every input Key/Value pair obtained from the InputFormat is written out.
Examining the run() method, we can see the lifecycle of the mapper:
/**
Expert users can override this method for more complete control over the
execution of the Mapper.
@param context
@throws IOException
*/
public void run(Context context) throws IOException, InterruptedException { setup(context);
while (context.nextKeyValue()) {
map(context.getCurrentKey(), context.getCurrentValue(), context);
}
cleanup(context);
}
setup(Context) - Perform any setup for the mapper. The default implementation is a no-op method.
map(Key, Value, Context) - Perform a map operation in the given Key / Value pair. The default implementation calls Context.write(Key, Value)
cleanup(Context) - Perform any cleanup for the mapper. The default implementation
is a no-op method.
Hadoop/MapReduce/Mapper
Which one of the following files is required in every Oozie Workflow application?
job.properties
Config-default.xml
Workflow.xml
Oozie.xml
Which one of the following statements is FALSE regarding the communication between DataNodes and a federation of NameNodes in Hadoop 2.2?
Each DataNode receives commands from one designated master NameNode.
DataNodes send periodic heartbeats to all the NameNodes.
Each DataNode registers with all the NameNodes.
DataNodes send periodic block reports to all the NameNodes.
In a MapReduce job with 500 map tasks, how many map task attempts will there be?
It depends on the number of reduces in the job.
Between 500 and 1000.
At most 500.
At least 500.
Exactly 500.
From Cloudera Training Course:
Task attempt is a particular instance of an attempt to execute a task
There will be at least as many task attempts as there are tasks
If a task attempt fails, another will be started by the JobTracker
Speculative execution can also result in more task attempts than completed tasks
Review the following 'data' file and Pig code.
Which one of the following statements is true?
The Output Of the DUMP D command IS (M,{(M,62.95102),(M,38,95111)})
The output of the dump d command is (M, {(38,95in),(62,95i02)})
The code executes successfully but there is not output because the D relation is empty
The code does not execute successfully because D is not a valid relation
Which one of the following is NOT a valid Oozie action?
mapreduce
pig
hive
mrunit
Examine the following Hive statements:
Assuming the statements above execute successfully, which one of the following statements is true?
Each reducer generates a file sorted by age
The SORT BY command causes only one reducer to be used
The output of each reducer is only the age column
The output is guaranteed to be a single file with all the data sorted by age
Your client application submits a MapReduce job to your Hadoop cluster. Identify the Hadoop daemon on which the Hadoop framework will look for an available slot schedule a MapReduce operation.
TaskTracker
NameNode
DataNode
JobTracker
Secondary NameNode
JobTracker is the daemon service for submitting and tracking MapReduce jobs in Hadoop. There is only One Job Tracker process run on any hadoop cluster. Job Tracker runs on its own JVM process. In a typical production cluster its run on a separate machine. Each slave node is configured with job tracker node location. The JobTracker is single point of failure for the Hadoop MapReduce service. If it goes down, all running jobs are halted. JobTracker in Hadoop performs following actions(from Hadoop Wiki:)
Client applications submit jobs to the Job tracker.
The JobTracker talks to the NameNode to determine the location of the data
The JobTracker locates TaskTracker nodes with available slots at or near the data The JobTracker submits the work to the chosen TaskTracker nodes.
The TaskTracker nodes are monitored. If they do not submit heartbeat signals often enough, they are deemed to have failed and the work is scheduled on a different TaskTracker.
A TaskTracker will notify the JobTracker when a task fails. The JobTracker decides what to do then: it may resubmit the job elsewhere, it may mark that specific record as something to avoid, and it may may even blacklist the TaskTracker as unreliable. When the work is completed, the JobTracker updates its status. Client applications can poll the JobTracker for information.
24 Interview Questions & Answers for Hadoop MapReduce developers, What is
a JobTracker in Hadoop? How many instances of JobTracker run on a Hadoop Cluster?