PrepAway - Latest Free Exam Questions & Answers

Which of the following describes how a client reads a file from HDFS?

Which of the following describes how a client reads a file from HDFS?

PrepAway - Latest Free Exam Questions & Answers

A.
The client queries the NameNode for the block location(s). The NameNode returns the block
location(s) to the client. The client reads the data directly off the DataNode(s).

B.
The client queries all DataNodes in parallel. The DataNode that contains the requested data
responds directly to the client. The client reads the data directly off the DataNode.

C.
The client contacts the NameNode for the block location(s). The NameNode then queries the
DataNodes for block locations. The DataNodes respond to the NameNode, and the NameNode
redirects the client to the DataNode that holds the requested data block(s). The client then reads
the data directly off the DataNode.

D.
The client contacts the NameNode for the block location(s). The NameNode contacts
theDataNode that holds the requested data block. Data is transferred from the DataNode to the
NameNode, and then from the NameNode to the client.

Explanation:
The Client communication to HDFS happens using Hadoop HDFS API. Client
applications talk to the NameNode whenever they wish to locate a file, or when they want to
add/copy/move/delete a file on HDFS. The NameNode responds the successful requests by
returning a list of relevant DataNode servers where the data lives. Client applications can talk
directly to a DataNode, once the NameNode has provided the location of the data.
Reference: 24 Interview Questions & Answers for Hadoop MapReduce developers,How the Client
communicates with HDFS?

5 Comments on “Which of the following describes how a client reads a file from HDFS?

  1. Ramesh Hiremath says:

    A.
    The client queries the NameNode for the block location(s). The NameNode returns the block
    location(s) to the client. The client reads the data directly off the DataNode(s).




    0



    0

Leave a Reply to Anand Cancel reply

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