org.apache.hadoop.dfs.SafeModeException: Cannot delete/user/hadoop/input. Name node is in safe mode…
此错误是因为hadoop进入了安全模式
暂时退出安全模式
hadoop dfsadmin -safemode leave
永久退出安全模式
在 hdfs-site.xml 文件中加入
<property>
<name>dfs.safemode.threshold.pct</name>
<value>1</value>
<description>
Specifies the percentage of blocks that should satisfy
the minimal replication requirement defined by dfs.replication.min.
Values less than or equal to 0 mean not to wait for any particular
percentage of blocks before exiting safemode.
Values greater than 1 will make safe mode permanent.
</description>
</property>
配置后重启hadoop即可