PrepAway - Latest Free Exam Questions & Answers

What do you have to do on the cluster to allow the worker node to join, and start storing HDFS blocks?

You have installed a cluster running HDFS and MapReduce version 2 (MRv2) on YARN. You have
no afs.hosts entry()ies in your hdfs-alte.xml configuration file. You configure a new worker node by
setting fs.default.name in its configuration files to point to the NameNode on your cluster, and you
start the DataNode daemon on that worker node.
What do you have to do on the cluster to allow the worker node to join, and start storing HDFS
blocks?

PrepAway - Latest Free Exam Questions & Answers

A.
Nothing; the worker node will automatically join the cluster when the DataNode daemon is
started.

B.
Without creating a dfs.hosts file or making any entries, run the command hadoop dfsadmin
–refreshHadoop on the NameNode

C.
Create a dfs.hosts file on the NameNode, add the worker node’s name to it, then issue the
command hadoop dfsadmin –refreshNodes on the NameNode

D.
Restart the NameNode

6 Comments on “What do you have to do on the cluster to allow the worker node to join, and start storing HDFS blocks?

  1. Bhavan says:

    correct answer is B …. you dont need to restart namenode and also since you dont have dfs.hosts file, you can only run hadoop dfsadmin -refreshnodes to make new node member of cluster.




    0



    0
  2. Dev says:

    A is the correct answer. Refresh Name Node is only when you use dfs.hosts file.

    Adding a Datanode

    host must be added to the include file, but the list of hosts can be dynamically refreshed without restarting the namenode:
    1. Add the IP address of the datanode to the file specified by the dfs.hosts parameter.
    Each entry should be separated by a newline character.
    2. Execute the command hadoop dfsadmin -refreshNodes as the HDFS superuser or
    a user with equivalent privileges.
    3. If using rack awareness, update any rack information necessary for the new host.
    4. Start the datanode process.
    5. Check the namenode web UI or the output of hadoop dfsadmin -report to confirm
    that the new host is connected.

    ***** Steps 1 and 2 are required only if you are using the HDFS host include functionality. *****




    0



    0
  3. abc says:

    C is wrong here. More appropriate answer is A.

    If you have no entries in dfs.hosts file or if u don’t have this file that means any node can connect to the cluster.

    Ref: Hadoop Definitive Guide 4th Edition
    An unspecified or empty include file is taken to mean that all nodes are in the
    include file.




    0



    0

Leave a Reply

Your email address will not be published. Required fields are marked *