Map wordCountMap = new Map(String, List(String>>(); //It holds each word as a key and all the same words are in the list In a word count Mapper class, you are emitting key value pair as Case 1 : context.write("word, IntWritable(1)) and
Case 2 : context.write("word, IntWritable(wordCountMap.get("word").size())) " ,
Select the correct statement from above example code snippet
Explanation: You should read the file in the configure() method so that, files can be loaded only once and not loaded each time a map() method is called.
Question : You have added the below files in Distributed cache
Which of the following is a correct method to get all the paths in an Array of the Distributed Cache files
1. 1. Iterate over the DistributedCache instance in the Mapper and add all the cached file paths to an array. 2. 2. There is a direct method available on the DistributedCache.getAllFilePath() 3. Access Mostly Uused Products by 50000+ Subscribers 4. 4. All of the above
1. Input file splits may cross line breaks. A line that crosses file splits is read by the RecordReader of the split that contains the beginning of the broken line. 2. Input file splits may cross line breaks. A line that crosses file splits is read by the RecordReaders of both splits containing the broken line. 3. The input file is split exactly at the line breaks, so each RecordReader will read a series of complete lines. 4. Input file splits may cross line breaks. A line that crosses file splits is ignored. 5. Input file splits may cross line breaks. A line that crosses file splits is read by the RecordReader of the split that contains the end of the broken line.
Question : For each intermediate key, each reducer task can emit: 1. As many final key-value pairs as desired. There are no restrictions on the types of those key-value pairs (i.e., they can be heterogeneous). 2. As many final key-value pairs as desired, but they must have the same type as the intermediate key-value pairs. 3. As many final key-value pairs as desired, as long as all the keys have the same type and all the values have the same type. 4. One final key-value pair per value associated with the key; no restrictions on the type. 5. One final key-value pair per key; no restrictions on the type.