Hadoop namenode 格式:ExitCodeException exitCode=-1073741515:

问题描述

我正在尝试安装 Hadoop 在格式化名称节点时,我收到此错误

Re-format filesystem in Storage Directory root= C:\hadoop\data\namenode; location= null ? (Y or N) Y
2021-01-03 11:30:36,360 INFO namenode.FSImage: Allocated new BlockPoolId: BP-801639091-192.168.218.1-1609655436323
2021-01-03 11:30:36,362 INFO common.Storage: Will remove files: []
2021-01-03 11:30:36,453 WARN namenode.NameNode: Encountered exception during format 
ExitCodeException exitCode=-1073741515:
at org.apache.hadoop.util.Shell.runcommand(Shell.java:1008)                                                             at org.apache.hadoop.util.Shell.run(Shell.java:901)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:1213)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:1307)
at org.apache.hadoop.util.Shell.execCommand(Shell.java:1289)
at org.apache.hadoop.fs.FileUtil.execCommand(FileUtil.java:1341)
at org.apache.hadoop.fs.FileUtil.execSetPermission(FileUtil.java:1332)
at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:1285)
at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:456)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:591)
at org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:613)
at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:188)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1271)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1713)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1821)
2021-01-03 11:30:36,459 ERROR namenode.NameNode: Failed to start namenode.

我参考了很多不同的文章,但都无济于事 我尝试使用另一个版本的 Hadoop,但问题仍然存在 因为我刚刚开始,我不能完全理解这个问题 所以我需要帮助

这些是我的配置

                -For core-site.xml 

<configuration>
 <property>
 <name>fs.defaultFS</name>
 <value>hdfs://localhost:9000</value>
 </property>
</configuration>
    
                - For mapred-site.xml 


<configuration>
 <property>
 <name>mapreduce.framework.name</name>
 <value>yarn</value>
 </property>
</configuration>

                -For yarn-site.xml 

<configuration>
 <property>
 <name>yarn.nodemanager.aux-services</name>
 <value>mapreduce_shuffle</value>
 </property>
 <property>
 <name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
 </property>
</configuration>



                -For hdfs-site.xml


<configuration>
 <property>
<name>dfs.replication</name>
 <value>1</value>
 </property>
 <property>
 <name>dfs.namenode.name.dir</name>
 <value>C:\hadoop\data\namenode</value>
 </property>
 <property>
 <name>dfs.datanode.data.dir</name>
 <value>C:\hadoop\data\datanode</value>
 </property>
</configuration>

请指导我

解决方法

用这个 bin 替换了我的 bin 目录。

我知道您需要在安装后更换它,但是我之前用来更换安装的 bin 的 bin 不起作用。