Java – failed to start namenode in Hadoop?
I configure Hadoop in Windows 7 from tutorial
16/01/19 15:18:58 WARN namenode. Fseditlog: class not configured for C, DFS namenode. edits. journal-plugin. C is empty 16 / 01 / 19 15:18:58 error namenode Namenode: unable to start namenode java. Lang. illegalargumentexception: at org apache. hadoop. hdfs. server. namenode. FSEditLog. Org. On createjournal apache. hadoop. hdfs. server. namenode. FSEditLog. Getjournalclass (fseditlog. Java: 1615) does not have the C class (fseditlog. Java: 1629) configured in org. Org apache. hadoop. hdfs. server. namenode. FSEditLog. Org. On initjournalsforwrite (fseditlog. Java) apache. hadoop. hdfs. server. namenode. FSEditLog. Initjournals (fseditlog. Java: 282): 247) at org apache. hadoop. hdfs. server. namenode. NameNode. Createnamenode (namenode. Java: 1429) is located at org. Org apache. hadoop. hdfs. server. namenode. NameNode. format(NameNode.java:985)at org. apache. hadoop. hdfs. server. namenode. NameNode. main(NameNode.java:1554)16/01/19 15:18:58 INFO util. Exitutil: exit with status s 1 16 / 01 / 19 15:18:58 info namenode NameNode:SHUTDOWN_ MSG:/ **************************** ******************************
Core site xml
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> </configuration>
HDFS-site. In XML
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>C:/hadoop/data/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>C:/hadoop/data/datanode</value> </property> </configuration>
mapred-site. In XML
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</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>
Solution
Change the following properties from the following properties:
<property> <name>dfs.namenode.name.dir</name> <value>C:/hadoop/data/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>C:/hadoop/data/datanode</value> </property>
To:
<property> <name>dfs.namenode.name.dir</name> <value>/hadoop/data/namenode</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/hadoop/data/datanode</value> </property>