Hadoop namenode formatting windows - java.lang.UnsupportedOperationException

假如想象 提交于 2020-05-15 09:27:05

问题


I am in a databasing class at school and my professor is having us work with hadoop v3.2.1. In following a youtube tutorial to install on windows, I am stuck on the formatting namenode part. this is what comes up in cmd:

2020-03-15 15:38:05,819 INFO util.GSet: Computing capacity for map NameNodeRetryCache
2020-03-15 15:38:05,819 INFO util.GSet: VM type       = 64-bit
2020-03-15 15:38:05,820 INFO util.GSet: 0.029999999329447746% max memory 889 MB = 273.1 KB
2020-03-15 15:38:05,820 INFO util.GSet: capacity      = 2^15 = 32768 entries
2020-03-15 15:38:05,883 INFO namenode.FSImage: Allocated new BlockPoolId: BP-381120843-10.0.0.230-1584301085876
2020-03-15 15:38:05,884 ERROR namenode.NameNode: Failed to start namenode.
java.lang.UnsupportedOperationException
        at java.nio.file.Files.setPosixFilePermissions(Files.java:2044)
        at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:452)
        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:1206)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1649)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1759)
2020-03-15 15:38:05,887 INFO util.ExitUtil: Exiting with status 1: java.lang.UnsupportedOperationException
2020-03-15 15:38:05,889 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at DrStrange/10.0.0.230
************************************************************/

and here are my properties:

core-site.xml:

<configuration>
  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
  </property>
</configuration>

mapred-site.xml

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

hdfs-site.xml

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

yarn-site.xml:

<configuration>
<!-- Site specific YARN configuration properties -->
  <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>

and i was following this tutorial: How to Install Hadoop on Windows until about halfway through when i realized it was too old and then switched to this one: How to Install Hadoop 3.2.0 in Windows10

Also, I have no idea if this is related to my current problem, so I will say this. When I skip to the next step and type start-all, resource manager and node manager both error out. Figured I'd stuff it all into one question.


回答1:


It is well known apparently that hadoop 3.2.1 doesn't work on windows 10 properly. I installed 3.2.0 and am now making progress.




回答2:


The following error is a Bug in Hadoop 3.2.1.

This issue will be solved within the next release. For now, you can fix it temporarily using the following steps:

  1. Download hadoop-hdfs-3.2.1.jar file from the following link.
  2. Rename the file name hadoop-hdfs-3.2.1.jar to hadoop-hdfs-3.2.1.bak in folder %HADOOP_HOME%\share\hadoop\hdfs
  3. Copy the downloaded hadoop-hdfs-3.2.1.jar to folder %HADOOP_HOME%\share\hadoop\hdfs

References

  • Installing Hadoop 3.2.1 Single node cluster on Windows 10
  • Install Hadoop 3.2.1 on Windows 10 Step by Step Guide


来源:https://stackoverflow.com/questions/60697054/hadoop-namenode-formatting-windows-java-lang-unsupportedoperationexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!