无法启动hadoop

woobm2wo  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(292)

我遵循了这个步骤post:httphttp://hanslen.me/2018/01/19/how-to-install-hadoop-on-macos-high-sierra/在本地计算机上启动hadoop。但是,我在尝试启动namenode和datanode时遇到了这个错误。我确实尝试设置了中第一个解决方案给出的路径:hdfs\u namenode\u user、hdfs\u datanode\u user和hdfs\u secondarynamenode\u user未定义,但似乎没有帮助。我不断得到以下错误:

  1. Starting namenodes on [localhost]
  2. ERROR: Attempting to operate on hdfs namenode as root
  3. ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation.
  4. Starting datanodes
  5. ERROR: Attempting to operate on hdfs datanode as root
  6. ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.
  7. Starting secondary namenodes [BANL160658074.local]
  8. ERROR: Attempting to operate on hdfs secondarynamenode as root
  9. ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation

有什么建议吗?
编辑:添加core-site.xml和hdfs-site.xml
core-site.xml文件

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
  3. <configuration>
  4. <property>
  5. <name>hadoop.tmp.dir</name>
  6. <value>/usr/local/Cellar/hadoop/hdfs/tmp</value>
  7. <description>A base for other temporary directories.</description>
  8. </property>
  9. <property>
  10. <name>fs.default.name</name>
  11. <value>hdfs://localhost:8020</value>
  12. </property>
  13. </configuration>

hdfs-site.xml文件

  1. <configuration>
  2. <property>
  3. <name>dfs.replication</name>
  4. <value>1</value>
  5. </property>
  6. </configuration>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题