我是hadoop的新手,正在尝试在Windows7上运行它。每当我尝试运行hadoop bash脚本时,都会出现以下错误:
'-Xmx32m' is not recognized as an internal or external command,
operable program or batch file.
Usage: hadoop [--config confdir] COMMAND
where COMMAND is one of:
fs run a generic filesystem user client
version print the version
jar <jar> run a jar file
checknative [-a|-h] check native hadoop and compression libraries availability
distcp <srcurl> <desturl> copy file or directories recursively
archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
classpath prints the class path needed to get the
Hadoop jar and the required libraries
credential interact with credential providers
key manage keys via the KeyProvider
daemonlog get/set the log level for each daemon
or
CLASSNAME run the class named CLASSNAME
Most commands print help when invoked w/o parameters.
另外,当我运行hdfs命令时,会出现以下错误:
-Xms1000m is not recognized as in internal or external command.
当我尝试传递-xmx和-xms参数时,得到以下消息:
Error occurred during initialization of VM
Could not reserve enough space for object heap
有人能帮我吗?
1条答案
按热度按时间p8h8hvxi1#
错误消息
未被识别为内部或外部命令
表示您试图从命令行运行windows无法识别的程序。这可能与-xms和-xmx无关。问题是windows找不到java。
确保你能跑
java -version
无论当前文件夹是什么。如果不能,则需要在path环境变量中添加java。这也可能是在路径中有空格的文件夹中安装java或hadoop的问题。
C:\Program Files
文件夹中有空间,这可能是个问题。如果是这个原因,那么就把java和hadoop安装在一个不同的文件夹中,路径中没有空格。