hdfs-site.xml added:
1 <property> 2 <name>dfs.client.read.shortcircuit</name> 3 <value>true</value> 4 </property> 5 <property> 6 <name>dfs.domain.socket.path</name> 7 <value>/var/lib/hadoop-hdfs/dn_socket</value> 8 </property>
C++运行程序主目录
hdfs.client.xml
配置
<configuration> <property> <name>dfs.client.read.shortcircuit</name> <value>true</value> </property> <property> <name>dfs.domain.socket.path</name> <value>/var/lib/hadoop-hdfs/dn_socket</value> </property> </configuration>
参考:
https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html
https://hadoop.apache.org/docs/r2.6.0/hadoop-project-dist/hadoop-hdfs/ShortCircuitLocalReads.html
时间: 2024-11-09 11:33:07