更改core-site.xml文件
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>file:/home/hadoop/app/hadoop/tmp</value>
<description>Abase for other temporary directories.</description>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
把这一行 <value>hdfs://localhost:9000</value>改为<value>hdfs://localhost:8020</value>