I've successfully installed hadoop on local by following these steps Step by step hadoop installation on windows 10
Java installed version: 1.8.0_231 Hadoop installed version: Hadoop 3.2.1
But after running command hdfs namenode -format
I'm getting following error
Re-format filesystem in Storage Directory root= C:\hadoop-3.2.1\data\namenode; location= null ? (Y or N) y
2019-10-19 12:34:58,809 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1445655329-172.18.148.177-1571468698797
2019-10-19 12:34:58,809 INFO common.Storage: Will remove files: []
2019-10-19 12:34:58,812 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)
2019-10-19 12:34:58,819 INFO util.ExitUtil: Exiting with status 1: java.lang.UnsupportedOperationException
2019-10-19 12:34:58,823 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at CWT-DST-0051/***.**.***.***
I'm totally new to this, what can be the issue? Thanks in advance
I resolved the issue by installing Hadoop 2.9.1, there was namenode issue in Hadoop 3.2.1 version hdfs namenode issue in 3.2.1
JAVA_HOME
path set as C:\Progra~2\Java\<JDK version>
but it seems to not working.JAVA_HOME
as C:\Progra~1\Java\<JDK version>
.After setting 64-bit Java version as JAVA_HOME
you have to run start-all.cmd
again in cmd
. Then except namenode
, all other deamons were worked. To run namenode
you have to follow these steps.
stop-all.cmd
hadoop namenode –format
start-all.cmd
Hope it will work for you.
Edit-:
Go to your config files of hdfs with following codes (enter it in cmd or powershell)
vim %HADOOP_HOME%\etc\hadoop\hdfs-site.xml
In your config files, you need to use forward slashes and a protocol for the file URI
For example, change
C:\BigData\hadoop-2.9.1\data\namenode
to
file:/C:/BigData/hadoop-2.9.1/data/namenode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With