Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop -mkdir : - Could not create the Java Virtual Machine

Tags:

hadoop

hdfs

I have configured the Hadoop 1.0.4 and started the following without any issue:

1. $ start-dfs.sh : -Works fine

2. $ start-mapred.sh : - Work fine

3. $ jps  (Output is below)

Out put:

rahul@rahul-Inspiron-N4010:/usr/local/hadoop-1.0.4/bin$ jps

6964 DataNode

7147 SecondaryNameNode

6808 NameNode

7836 Jps

7254 JobTracker

7418 TaskTracker

But facing issue: While issuing command

rahul@rahul-Inspiron-N4010:/usr/local/hadoop-1.0.4/bin$ hadoop -mkdir /user

Getting following error

Unrecognized option: -mkdir
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I applied the patch : HDFS-1943.patch but not use full

like image 777
Rahul Wagh Avatar asked Jan 10 '23 03:01

Rahul Wagh


2 Answers

Should be: hdfs dfs -mkdir /user

Consult documentation at http://hadoop.apache.org/docs/r1.0.4/file_system_shell.html

like image 123
user3810043 Avatar answered Jan 17 '23 16:01

user3810043


fs option is missing

hadoop fs -mkdir /user

like image 43
SachinJ Avatar answered Jan 17 '23 16:01

SachinJ