Hadoop -mkdir: - 无法创建Java虚拟机

时间:2014-07-27 10:49:20

标签: hadoop hdfs

我已经配置了Hadoop 1.0.4并且没有任何问题地启动了以下内容:

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

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

3. $ jps  (Output is below)

外线:

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

6964 DataNode

7147 SecondaryNameNode

6808 NameNode

7836 Jps

7254 JobTracker

7418 TaskTracker

但面临问题:发出命令

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

获得以下错误

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

我应用了补丁: HDFS-1943.patch 但未使用完整

2 个答案:

答案 0 :(得分:4)

应该是:hdfs dfs -mkdir /user

请参阅http://hadoop.apache.org/docs/r1.0.4/file_system_shell.html

上的文档

答案 1 :(得分:4)

缺少

fs选项

hadoop fs -mkdir /user