Hortonworks-Certified-Apache-Hadoop-2.0-Developer(Pig and Hive Developer) Sample Questions:
1. In a MapReduce job, you want each of your input files processed by a single map task. How do you
configure a MapReduce job so that a single map task processes each input file regardless of how many
blocks the input file occupies?
A) Write a custom MapRunner that iterates over all key-value pairs in the entire file.
B) Increase the parameter that controls minimum split size in the job configuration.
C) Set the number of mappers equal to the number of input files you want to process.
D) Write a custom FileInputFormat and override the method isSplitable to always return false.
2. Analyze each scenario below and indentify which best describes the behavior of the default partitioner?
A) The default partitioner implements a round-robin strategy, shuffling the key-value pairs to each reducer
in turn. This ensures an event partition of the key space.
B) The default partitioner assigns key-values pairs to reduces based on an internal random number
generator.
C) The default partitioner computes the hash of the key and divides that valule modulo the number of
reducers. The result determines the reducer assigned to process the key-value pair.
D) The default partitioner computes the hash of the key. Hash values between specific ranges are
associated with different buckets, and each bucket is assigned to a specific reducer.
E) The default partitioner computes the hash of the value and takes the mod of that value with the number
of reducers. The result determines the reducer assigned to process the key-value pair.
3. Which HDFS command copies an HDFS file named foo to the local filesystem as localFoo?
A) hadoop fs -get foo LocalFoo
B) hadoop fs -put foo LocalFoo
C) hadoop fs -Is foo
D) hadoop -cp foo LocalFoo
4. Given a directory of files with the following structure:
line number, tab character, string:
Example:
1 abialkjfjkaoasdfjksdlkjhqweroij
2 kadfjhuwqounahagtnbvaswslmnbfgy
3 kjfteiomndscxeqalkzhtopedkfsikj
You want to send each line as one record to your Mapper. Which InputFormat should you use to complete
the line: conf.setInputFormat (____.class) ; ?
A) SequenceFileInputFormat
B) KeyValueFileInputFormat
C) BDBInputFormat
D) SequenceFileAsTextInputFormat
5. Which of the following tool was designed to import data from a relational database into HDFS?
A) HCatalog
B) Ambari
C) Sqoop
D) Flume
Solutions:
| Question # 1 Answer: D | Question # 2 Answer: C | Question # 3 Answer: A | Question # 4 Answer: B | Question # 5 Answer: C |
We're so confident of our products that we provide no hassle product exchange.


By Ford

