Database Reference
In-Depth Information
Short-circuit local reads
When reading a file from HDFS, the client contacts the datanode and the data is sent to
the client via a TCP connection. If the block being read is on the same node as the client,
then it is more efficient for the client to bypass the network and read the block data direc-
tly from the disk. This is termed a short-circuit local read , and can make applications like
HBase perform better.
You can enable short-circuit local reads by setting
dfs.client.read.shortcircuit to true . Short-circuit local reads are imple-
mented using Unix domain sockets, which use a local path for client-datanode communic-
ation. The path is set using the property dfs.domain.socket.path , and must be a
path that only the datanode user (typically hdfs ) or root can create, such as /var/run/
hadoop-hdfs/dn_socket .
Search WWH ::




Custom Search