我正在尝试首次安装并运行Hadoop
。格式化namenode
时出现以下错误。
java.lang.IllegalArgumentException: URI has an authority component at
java.io.File.<init>(File.java:423) at
org.apache.hadoop.hdfs.server.namenode.NNStorage.getStorageDirectory(NNStorage.java:329)
at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java:270)
at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:241)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:938)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1382)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1507)
16/04/12 17:15:35 INFO util.ExitUtil: Exiting with status 1 16/04/12
17:15:35 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at
psubuntu-Inspiron-5520/127.0.1.1
************************************************************/**
答案 0 :(得分:0)
好像你没有正确设置.xml文件。 编辑〜/ hadoop / etc / hadoop文件夹中的文件 core-site.xml - &gt;
<!-- core-site.xml -->
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost/</value>
</property>
</configuration>
表示hdfs-site.xml
<!-- hdfs-site.xml -->
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
用于mapred-site.xml
<!-- mapred-site.xml -->
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
for yarn-site.xml
<!-- yarn-site.xml -->
<configuration>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>localhost</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>