Question

In: Computer Science

For each of the following statements, state whether the statement is true or false AND justify...

For each of the following statements, state whether the statement is true or false AND justify your answer.

    1. When a map-reduce job is running on Hadoop, the number of map tasks must be equal to the number of reduce tasks because each map task feeds its output to a specific reduce task.
    1. In order to guarantee the scalability of the system, each file block is replicated three times in Hadoop distributed file system (HDFS).
    1. When a map-reduce job is submitted to Hadoop, the first step is to shuffle and sort the input key/value pairs so that each input key is assigned to a map task.

Solutions

Expert Solution

Answer:

1. When a map-reduce job is running on Hadoop, the number of map tasks must be equal to the number of reduce tasks because each map task feeds its output to a specific reduce task.

This statement is False.

Explanation:

Basically, hadoop does not allow you to specify the number of map task and is governed by the number of input splits. The number that you pass using mapred.tasks.parameter just gives a suggestion to hadoop framework about the number of maps. Hence, in any MR job regardless of the number of map task specified, a map task will always be spawned for each input split and eventually, the number of map tasks is equal to the number of input splits. The number of partitions is equal to the total number of reduce jobs for the process.

2. In order to guarantee the scalability of the system, each file block is replicated three times in Hadoop distributed file system (HDFS).

This statement is True.

Explanation:

This can be justified by the following example:

Default block size in Hadoop 2.x is 128 MB. So, a file of size 514 MB will be divided into 5 blocks ( 514 MB/128 MB) where the first four blocks will be of 128 MB and the last block will be of 2 MB only. Since, we are using the default replication factor i.e. 3, each block will be replicated thrice. Therefore, we will have 15 blocks in total where 12 blocks will be of size 128 MB each and 3 blocks of size 2 MB each.

3. When a map-reduce job is submitted to Hadoop, the first step is to shuffle and sort the input key/value pairs so that each input key is assigned to a map task.

This statement is False.

Explanation:

The process goes through four phases of execution namely, splitting, mapping, shuffling, and reducing. So first step is splitting. A MapReduce job usually splits the input data-set into independent chunks which are processed by the map tasks in a completely parallel manner. The framework sorts the outputs of the maps, which are then input to the reduce tasks. Typically both the input and the output of the job are stored in a file-system.

Please give thumbsup, if you like it. Thanks.


Related Solutions

For each of the following statements, state whether you think the statement is true, false, or...
For each of the following statements, state whether you think the statement is true, false, or uncertain; and explain your answer. If an individual holds a whole-life insurance policy, it is not necessary to monitor the policy periodically. If the stock market is efficient, the best strategy is buy and hold for the long term. A young person should always buy term insurance and not whole-life insurance.
State whether each of the following is true or false. Justify your answer! a. There are...
State whether each of the following is true or false. Justify your answer! a. There are infinitely many finite languages. b. Union of any two languages over alphabet {0, 1} is always regular. c. The value of n3 +6n2 +5n is divisible by 6 for any integer n>0. Provide a proof. d. Single state NFA can recognize only finite languages (languages with finitely many strings) e. Intersection of any language and its complement is always regular.
For each of the following statements, determine whether it is true or false and justify your...
For each of the following statements, determine whether it is true or false and justify your answer. a. Every function f : [0, 1] ~ lR has a maximum. b. Every continuous function f :[a, b] ~ lR has a minimum. c. Every continuous function f : (0, 1) ~ lR has a maximum. d. Every continuous function f : (0, 1) ~ lR has a bounded image. e. If the image of the continuous function f: (0, 1) ~...
For each of the following statements, determine whether it is true or false and justify your...
For each of the following statements, determine whether it is true or false and justify your answer. a. If the function f + g: IR --> IR is continuous, then the functions f :IR --> IR and g :IR --> IR also are continuous. b. If the function f^2 : IR --> R is continuous, then so is the function f :R --> IR. c. If the functions f + g: IR and g: IR --> IR are continuous, then...
Determine whether each of the following statements is true or false. If the statement is false,...
Determine whether each of the following statements is true or false. If the statement is false, modify and rewrite it so that it is a true statement. a. When a molecule has two, degenerate, “infrared active”, vibrational modes, the two vibrational modes will show absorptions at different frequencies in the infrared spectrum. b. For a given substance, strong intermolecular forces between molecules of the substance can cause peak broadening of some of the absorptions in the infrared spectrum of the...
State whether EACH of the following statements are true or false. A. A fraction A of...
State whether EACH of the following statements are true or false. A. A fraction A of the Sun’s radiation gets reflected off the atmosphere. (T/F) B. The Earth surface radiates both visible and infrared radiation. (T/F)                            [ C. Most of the visible radiation from the sun is absorbed by the atmosphere. (T/F)             D. The atmosphere emits thermal infrared radiation. (T/F) E. The greenhouse effect is due to the thermal...
Determine whether each of the following statements is TRUE or FALSE. Justify all the answers in...
Determine whether each of the following statements is TRUE or FALSE. Justify all the answers in few sentences. 1. In the Ricardian model with 2 goods (Wine and Cheese) and 2 countries (Home and Foreign) and (except otherwise noted) identical preferences between countries: (a) If both countries have the same number of workers and Home has absolute advantages in both goods then Home must have a higher wage. (b) The Home country is never made worse off by productivity growth...
Determine whether each of the following statements is TRUE or FALSE. Justify all the answers in...
Determine whether each of the following statements is TRUE or FALSE. Justify all the answers in few sentences. 1. In the Ricardian model with 2 goods (Wine and Cheese) and 2 countries (Home and Foreign) and (except otherwise noted) identical preferences between countries: (a) If both countries have the same number of workers and Home has absolute advantages in both goods then Home must have a higher wage. (b) The Home country is never made worse off by productivity growth...
State whether the following statements are TRUE or FALSE. Give the reason, If a statement is...
State whether the following statements are TRUE or FALSE. Give the reason, If a statement is true, explain why; if it is false, identify the mistake and try to correct it. Use the diagram for explanation if needed. (NOTE: Marks are based on your reasoning, not only for T/F marking) (i). Change in quantity demanded and change in demand are the same things. (ii). If the demand curve for good A is flatter, and if the demand curve for good...
1.Below are three statements. For each statement: (i) State whether the statement is true or false....
1.Below are three statements. For each statement: (i) State whether the statement is true or false. (ii) Explain your reasoning. A. In an additive relationship, Z defines a large compositional difference across values of X. B. Field experiments have lower external validity than do laboratory experiments. C. Random assignment neutralizes rival explanations.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT