hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/jre
export HADOOP_LOG_DIR=/var/log/hadoop
hadoop-env.sh中的JAVA_HOME必须硬编码,要不然找不到JAVA_HOME。
原因:the value is lost as ssh connections to other hosts is made inside the code
core-site.xml
<property>
<name>hadoop.tmp.dir</name>
<value>/var/hadoop/tmp</value>
</property>
机架感知(Rack-aware)
默认不开启。机架感知脚本接收IP返回RackID(例如Rack1)
<property>
<name>topology.script.file.name</name>
<value>/path/to/script</value>
</property>