hbase對HDFS開啟短路讀功能

bck1453925668發表於2020-10-28

1.增加短路讀路徑

mkdir /var/lib/hadoop-hdfs  
chmod 775 /var/lib/hadoop-hdfs
chown hdfs:root -R /var/lib/hadoop-hdfs

2.開啟datanode 短路讀(${HADOOP_HOME}/etc/hadoop/hdfs-site.xml)

新增配置
  <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>

並重啟dn

3.開啟HBASE客戶端短路讀

<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>

相關文章