Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 MCQs Map Reduce and YARN

INT312 — Big Data Fundamentals 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Review of the Java code required to handle the Mapper class Easy

    Which Hadoop class is commonly extended to create a custom Mapper?

  2. Question 2 of 60 Review of the Java code required to handle the Mapper class Easy

    Which method contains the main processing logic of a Hadoop Mapper?

  3. Question 3 of 60 Review of the Java code required to handle the Mapper class Easy

    Which statement is used to emit a key-value pair from the map() method?

  4. Question 4 of 60 Review of the Java code required to handle the Reducer class Easy

    Which Hadoop class is commonly extended to create a custom Reducer?

  5. Question 5 of 60 Review of the Java code required to handle the Reducer class Easy

    What does the values parameter of a Reducer's reduce() method normally contain?

  6. Question 6 of 60 Review of the Java code required to handle the Reducer class Easy

    Which Java loop is commonly used to process all values received by a Reducer?

  7. Question 7 of 60 Program driver needed to access MapReduce Easy

    Which method usually serves as the entry point of a Java MapReduce driver program?

  8. Question 8 of 60 Program driver needed to access MapReduce Easy

    Which driver method sets the Mapper class for a Hadoop job?

  9. Question 9 of 60 Program driver needed to access MapReduce Easy

    What does job.waitForCompletion(true) do in a MapReduce driver?

  10. Question 10 of 60 YARN model Easy

    What does YARN stand for in Hadoop?

  11. Question 11 of 60 YARN model Easy

    Which YARN component manages resources across the entire cluster?

  12. Question 12 of 60 YARN model Easy

    Which YARN component manages containers on an individual worker machine?

  13. Question 13 of 60 Java code for word count Easy

    In a standard Word Count Mapper, what value is usually emitted for each word occurrence?

  14. Question 14 of 60 Java code for word count Easy

    What operation does a Word Count Reducer perform on the values for each word?

  15. Question 15 of 60 Java code for sum of even numbers Easy

    Which Java condition correctly checks whether an integer n is even?

  16. Question 16 of 60 Java code for sum of even numbers Easy

    What is the sum of the even numbers in the list ?

  17. Question 17 of 60 Java code for palindrome Easy

    Which comparison can confirm that an integer is a palindrome after its digits have been reversed?

  18. Question 18 of 60 Java code for palindrome Easy

    Which number is a palindrome?

  19. Question 19 of 60 Java code for factorial Easy

    What initial value should a factorial accumulator normally have in Java?

  20. Question 20 of 60 Java code for factorial Easy

    What is the value of ?

  21. Question 21 of 60 Review of the Java code required to handle the Mapper class Medium

    A mapper processes a text file using Hadoop's default TextInputFormat. Which declaration correctly represents the mapper's input types?

  22. Question 22 of 60 Review of the Java code required to handle the Mapper class Medium

    A mapper extends Mapper<LongWritable, Text, Text, IntWritable>. Which statement can be used inside its map() method without causing an output type mismatch?

  23. Question 23 of 60 Review of the Java code required to handle the Reducer class Medium

    Which reducer loop correctly adds all IntWritable values associated with a key?

  24. Question 24 of 60 Review of the Java code required to handle the Reducer class Medium

    A reducer must retain values after iterating over Iterable<IntWritable> values. Which approach is safest because Hadoop may reuse value objects?

  25. Question 25 of 60 Program driver needed to access MapReduce Medium

    A mapper emits <Text, IntWritable>, while the reducer emits <Text, LongWritable>. Which driver configuration correctly declares both output pairs?

  26. Question 26 of 60 Program driver needed to access MapReduce Medium

    Which driver statement waits for job completion and returns a conventional process status code?

  27. Question 27 of 60 YARN model Medium

    In YARN, which component negotiates containers for one application and coordinates that application's tasks?

  28. Question 28 of 60 YARN model Medium

    A YARN worker machine must launch containers and report their status and resource usage. Which component performs these duties?

  29. Question 29 of 60 YARN model Medium

    An application requests a YARN container with 4 GB of memory and 2 virtual cores. What does the container primarily represent?

  30. Question 30 of 60 Java code for word count Medium

    A word-count mapper converts tokens to lowercase before emitting them. What output should the complete job produce for the line Data data DATA?

  31. Question 31 of 60 Java code for word count Medium

    Why can the word-count reducer class usually also be registered as a combiner?

  32. Question 32 of 60 Java code for word count Medium

    A mapper declares one reusable Text word = new Text(); field. For each token, it calls word.set(token) followed immediately by context.write(word, one). Why is this normally valid?

  33. Question 33 of 60 Java code for sum of even numbers Medium

    A mapper emits only even integers, and the reducer adds them. What result is produced for the input values ?

  34. Question 34 of 60 Java code for sum of even numbers Medium

    Which mapper condition correctly recognizes both positive and negative even integers in Java?

  35. Question 35 of 60 Java code for palindrome Medium

    A palindrome mapper removes non-letter characters and converts the remaining text to lowercase. How should it classify Never odd or even?

  36. Question 36 of 60 Java code for palindrome Medium

    A MapReduce palindrome job must preserve a separate result for every input line, including duplicate lines. Which mapper output key is most suitable?

  37. Question 37 of 60 Java code for factorial Medium

    If factorials are stored in a Java long, what is the largest nonnegative integer for which fits without overflow?

  38. Question 38 of 60 Java code for factorial Medium

    A mapper sends input numbers 3 and 4 under the same NullWritable key. The reducer initializes product = 1 and multiplies every received number once. What does this job output?

  39. Question 39 of 60 Java code for Armstrong number Medium

    For a -digit number, which expression should Armstrong-number code compute before comparing the result with the original number?

  40. Question 40 of 60 Java code for Armstrong number Medium

    A Java mapper checks 9474 using the four-digit Armstrong rule. Which calculation confirms that it is an Armstrong number?

  41. Question 41 of 60 Review of the Java code required to handle the Mapper class Hard

    A job uses TextInputFormat and declares Mapper<Text, LongWritable, Text, IntWritable>. The mapper's map method has the same declared parameter types. What is the most likely result when the job processes input?

  42. Question 42 of 60 Review of the Java code required to handle the Mapper class Hard

    A mapper creates one Text object as a field, changes its contents for every token, and calls context.write(reusedText, ONE) after each change. Under the normal Hadoop mapper output path, which statement is correct?

  43. Question 43 of 60 Review of the Java code required to handle the Reducer class Hard

    Why can the following reducer logic produce an incorrect list even though the loop visits all values? for (IntWritable v : values) saved.add(v);

  44. Question 44 of 60 Review of the Java code required to handle the Reducer class Hard

    A composite mapper key is (customerId, timestamp). The sort comparator orders both fields, while the grouping comparator compares only customerId. What behavior does the reducer receive?

  45. Question 45 of 60 Program driver needed to access MapReduce Hard

    A mapper emits <Text, IntWritable>, but the reducer emits <Text, LongWritable>. The driver sets only setOutputKeyClass(Text.class) and setOutputValueClass(LongWritable.class). What configuration is missing?

  46. Question 46 of 60 Program driver needed to access MapReduce Hard

    A driver configures job.setNumReduceTasks(0) for a map-only job. Which type constraint now applies to records written by the mapper?

  47. Question 47 of 60 YARN model Hard

    Which YARN component is primarily responsible for negotiating containers for one submitted MapReduce job and coordinating its tasks?

  48. Question 48 of 60 YARN model Hard

    An ApplicationMaster first requests a map container on the node holding an input block, but that node lacks resources. How can YARN improve progress while still considering locality?

  49. Question 49 of 60 YARN model Hard

    A NodeManager stops sending heartbeats after launching several task containers. Which response best matches the YARN execution model?

  50. Question 50 of 60 Java code for word count Hard

    A word-count mapper performs in-mapper combining by storing counts in a HashMap<String, Integer> and emitting them in cleanup. What is the main correctness and scalability requirement?

  51. Question 51 of 60 Java code for word count Hard

    A word-count job uses the ordinary sum reducer as its combiner. Which assumption makes this valid even though Hadoop may invoke the combiner zero, one, or multiple times?

  52. Question 52 of 60 Java code for word count Hard

    Two mapper tasks tokenize "Data" and "data". The reducer must produce one case-insensitive count independent of the workers' default locales. Which mapper normalization is most appropriate?

  53. Question 53 of 60 Java code for sum of even numbers Hard

    A job must exactly sum all even signed 64-bit input values whenever the mathematical result fits in a signed 64-bit integer. Which implementation is appropriate?

  54. Question 54 of 60 Java code for sum of even numbers Hard

    Each mapper emits <NullWritable, partialEvenSum>, and the reducer adds all partial sums. Why is NullWritable a suitable key only when a single global sum is intended?

  55. Question 55 of 60 Java code for palindrome Hard

    A palindrome job should treat "A man, a plan, a canal: Panama" as a palindrome. Which transformation must occur before comparing the text with its reverse?

  56. Question 56 of 60 Java code for palindrome Hard

    A mapper emits <word, 1> only when word is a palindrome, and a reducer sums values by word. What does the final output represent?

  57. Question 57 of 60 Java code for factorial Hard

    A Java mapper calculates factorials using a signed long and must detect overflow before multiplication. For positive i, which check should precede result *= i?

  58. Question 58 of 60 Java code for factorial Hard

    A factorial job replaces long with BigInteger and needs to emit exact results through Hadoop. Which design is valid?

  59. Question 59 of 60 Java code for Armstrong number Hard

    For a nonnegative decimal integer with digits, an Armstrong-number mapper must test whether . Which edge case requires explicit attention when digit counting uses repeated division by 10?

  60. Question 60 of 60 Java code for Armstrong number Hard

    Why is (long) Math.pow(digit, digitCount) potentially unsafe in an exact Armstrong-number test for large inputs?

That's unit 3

Answer a few questions and your score shows up here.