Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
    
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 –  theTuxRacer Apr 17 '11 at 2:51

2 Answers 2

up vote 4 down vote accepted

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

Try runinng this:

sudo bin/hadoop namenode -format

Running the 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
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.