Premium

Cloudera Hadoop Developer Certification Questions and Answer (Dumps and Practice Questions)



Question :

You have following data in a hive table

ID:INT,COLOR:TEXT,WIDTH:INT
1,green,190
2,blue,300
3,yellow,299
4,blue,199
5,green,199
6,yellow,299
7,green,799

Select the correct MapReduce program which can produce the output similar to below Hive Query.

Select color from table group by color Having SUM(WIDTH)>600;

  :
1. 1
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers

Correct Answer : Get Lastest Questions and Answer :

Explanation: Mapper will produce the output as below.

A green,190
A blue,300
A yellow,299
A blue,199
A green,199
A yellow,299
A green,799

In the reducer, it will go to same reducer and single reduce method call will have all the values.
All the color as key and all the widths in a single ArrayList instance will hold.

blue ( 300,199)
green (190,199,799)
yellow (299,299)

Final output it will emit as
green 1188





Question : You have following data in a hive table

ID:INT,COLOR:TEXT,WIDTH:INT
1,green,190
2,blue,300
3,yellow,299
4,blue,199
5,green,199
6,yellow,299
7,green,799

Select the correct MapReduce program which can produce the output similar to below Hive Query.

Select color from table group by color DESC Having SUM(WIDTH)>600;

  : You have following data in a hive table
1. 1
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers

Correct Answer : Get Lastest Questions and Answer :

Explanation: Explanation is same as previous questions, it uses Collections.reverseOrder() to sort based on the color in descending order.




Question :

You have following data in a hive table

ID:INT,COLOR:TEXT,WIDTH:INT
1,green,190
2,blue,300
3,yellow,299
4,blue,199
5,green,199
6,yellow,299
7,green,799

Select the correct MapReduce program which can produce the output similar to below Hive Query.

Select color,sum(width) from table group by color order by color desc;
  :
1. 1
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers

Correct Answer : Get Lastest Questions and Answer :

Explanation: Mapper will produce the following output

A green,190
A blue,300
A yellow,299
A blue,199
A green,199
A yellow,299
A green,799

Hence each key and values will go to the same simulator.
In the reducer we will create the reverse order TreeMap (Descending order of the key, in this case it would be descending order of color)

And finally we will sum all the widths of the single color, and emits the values as below.

yellow 598
green 1188
blue 499


Related Questions


Question : What are the core components of the Hadoop framework


 : What are the core components of the Hadoop framework
1. HDFS (Hadoop Distributed File System)
2. MapReduce
3. Access Mostly Uused Products by 50000+ Subscribers
4. 1 nad 2 both are correct


Question : Which project is the part of Hadoop Ecosystem ?

 : Which project is the part of Hadoop Ecosystem ?
1. Pig
2. Hive
3. Access Mostly Uused Products by 50000+ Subscribers
4. 1 and 2
5. All of the above


Question : What is the possible data block size in hadoop

 : What is the possible data block size in hadoop
1. 64 MB
2. 128 MB
3. Access Mostly Uused Products by 50000+ Subscribers
4. Both 1 and 2 are correct


Question : What is the default replication factor in the HDFS...
 : What is the default replication factor in the HDFS...
1. 1
2. 2
3. Access Mostly Uused Products by 50000+ Subscribers
4. 4


Question : Which of the following are MapReduce processing phases ?
 : Which of the following are MapReduce processing phases ?
1. Map
2. Reduce
3. Access Mostly Uused Products by 50000+ Subscribers
4. Sort
5. 1 and 2 only


Question : What is true about HDFS ?

 : What is true about HDFS ?
1. HDFS is based of Google File System
2. HDFS is written in Java
3. Access Mostly Uused Products by 50000+ Subscribers
4. All above are correct