Short circuit reads
We walked through the HDFS read steps in the previous sections and have seen how DataNode is involved in the read operation. In short, the HDFS client receives block details from the NameNode and asks the DataNode to read a file. The DataNode reads the file and sends the data to the client using TCP sockets. In a short circuit read, the DataNode is not involved and the HDFS client reads the file directly. However, this is only possible when the client is on the same machine where the data is being kept. Earlier, even if the client was on the same machine where the data was, DataNode was used to read data and serve packets using TCP sockets. This involved having an overhead of threads and other processing resources. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access