3

I'm using the following sites to install and configure Hadoop in Ubuntu 10.10 http://arifn.web.id/blog/2010/07/29/running-hadoop-single-cluster.html

However, when I try to format the Hadoop file-system, I get the following errors.

amathew@amathew-Dimension-3000:~$ cd /usr/local/hadoop
amathew@amathew-Dimension-3000:/usr/local/hadoop$ bin/hadoop namenode -format
11/04/16 21:23:07 INFO namenode.NameNode: STARTUP_MSG: 
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = amathew-Dimension-3000/192.168.1.66
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 0.20.2
STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by 'chrisdo' on Fri Feb 19 08:07:34 UTC 2010
************************************************************/
11/04/16 21:23:08 INFO namenode.FSNamesystem: fsOwner=amathew,amathew,adm,dialout,cdrom,plugdev,lpadmin,admin,sambashare
11/04/16 21:23:08 INFO namenode.FSNamesystem: supergroup=supergroup
11/04/16 21:23:08 INFO namenode.FSNamesystem: isPermissionEnabled=true
11/04/16 21:23:08 ERROR namenode.NameNode: java.io.IOException: Cannot create directory /usr/local/hadoop-datastore/hadoop/dfs/name/current
    at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:295)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1086)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:1110)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:856)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:948)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:965)

11/04/16 21:23:08 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at amathew-Dimension-3000/192.168.1.66
************************************************************/

Can anyone help with these error messages, namely ERROR namenode.NameNode: java.io.IOException: Cannot create directory /usr/local/hadoop-datastore/hadoop/dfs/name/current.

$ sudo mkdir /usr/local/hadoop/datastore
$ sudo chown  hadoop:hadoop /usr/local/hadoop/datastore
$ sudo chmod 750 /usr/local/hadoop/datastore
1
  • You aren't creating the directory hadoop-datastore. Either that, or you made a typo in the last three commands, typing /usr/local/hadoop/datastoreinstead of /usr/local/hadoop-datastore Apr 17, 2011 at 2:51

3 Answers 3

7

Hadoop cannot create /usr/local/hadoop-datastore/hadoop/dfs/name/current directory.

Try running this:

sudo bin/hadoop namenode -format

Running Hadoop executable using sudo.I'm not sure, but I think it didn't work for me when I installed Hadoop. If so do this:

sudo su

then:

bin/hadoop namenode -format
1

Assuming hadoop is installed in $HADOOP_HOME, we have to modify the directory name in /$HADOOP_HOME/conf/core-site.xml

/$HOME/tmp/hadoop/hadoop-${user.name}

$HOME has read, write permissions and hence the directories can be created.

1

This is failing because of a permission's issue.

Use below:

chmod -R 777 [tmp folder-name specified in core-site.xml]

then format namenode:

hadoop namenode -format 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .