获取错误文件:///没有权限

时间:2019-05-03 12:15:27

标签: hadoop

我正在尝试在单个节点上的Windows 7系统上安装hadoop。以下是我得到的错误:打开4个命令窗口后,每个窗口的最后一行是关闭。我在做什么错以及如何让hadoop在Windows机器上运行?

2019-05-03 17:32:02,555 INFO namenode.NameNode: createNameNode []
2019-05-03 17:32:02,838 INFO impl.MetricsConfig: loaded properties from hadoop-m
etrics2.properties
2019-05-03 17:32:03,226 INFO impl.MetricsSystemImpl: Scheduled Metric snapshot p
eriod at 10 second(s).
2019-05-03 17:32:03,230 INFO impl.MetricsSystemImpl: NameNode metrics system sta
rted
2019-05-03 17:32:03,351 INFO namenode.NameNodeUtils: fs.defaultFS is file:///
2019-05-03 17:32:03,685 ERROR namenode.NameNode: Failed to start namenode.
java.lang.IllegalArgumentException: Invalid URI for NameNode address (check fs.d
efaultFS): file:/// has no authority.

我的core-site.xml

<configuration>
<property>
    <name>fs.DefaultFS</name><value>hdfs://192.168.1.102:9000</value>
</property>
</configuration>

mapred-site.xml

configuration>
<property>
      <name>mapreduce.job.user.name</name>
      <value>%USERNAME%</value>
   </property>
   <property>
      <name>mapreduce.framework.name</name>
      <value>yarn</value>
   </property>
   <property>
      <name>yarn.apps.stagingDir</name>
      <value>/user/%USERNAME%/staging</value>
   </property>
   <property>
      <name>mapreduce.jobtracker.address</name>
      <value>local</value>
   </property>
</configuration>

hdfs-site.xml

<configuration>
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
<property>
    <name>dfs.namenode.name.dir</name><value>file///c:/hadoop-3.1.2/data/namenode</value>
</property>
<property>
    <name>dfs.datanode.data.dir</name><value>file///c:/hadoop-3.1.2/data/datanode</value>
    </property>
<property>
<name>dfs.permission</name><value>false</value>
</property>
</configuration>

yarn-site.xml

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

hadoop-eng.cmd 我只是将这一行设置为java所在的路径

set JAVA_HOME=C:\Progra~1\Java\jdk-12.0.1

0 个答案:

没有答案