[root@hadoop0 hadoop]# hadoop
/usr/app/hadoop/bin/hadoop: line 20: which: command not found
dirname: missing operand
Try 'dirname --help' for more information.
/usr/app/hadoop/bin/hadoop: line 27: /usr/app/hadoop/../libexec/hadoop-config.sh: No such fileor directory
Usage: hadoop [--config confdir] [COMMAND | CLASSNAME]
CLASSNAME runtheclass named CLASSNAME
orwhere COMMAND is one of:
fs run a generic filesystem user client
version print theversion
jar <jar> run a jar file
note: please use "yarn jar"tolaunch
YARN applications, not this command.
checknative [-a|-h] check native hadoop and compression libraries availability
distcp <srcurl> <desturl> copyfileor directories recursively
archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
classpath prints theclass path needed togetthe
credential interact with credential providers
Hadoop jar andthe required libraries
daemonlog get/setthelog level for each daemon
trace view and modify Hadoop tracing settings
Most commands print help when invoked w/o parameters.
出现which命令无法识别,那么安装一下which就可以;
[root@hadoop0 bin]# yum install which
[root@hadoop0 bin]# hadoop
Usage: hadoop [--config confdir] [COMMAND | CLASSNAME]
CLASSNAME runtheclass named CLASSNAME
orwhere COMMAND is one of:
fs run a generic filesystem user client
version print theversion
jar <jar> run a jar file
note: please use "yarn jar"tolaunch
YARN applications, not this command.
checknative [-a|-h] check native hadoop and compression libraries availability
distcp <srcurl> <desturl> copyfileor directories recursively
archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
classpath prints theclass path needed togetthe
credential interact with credential providers
Hadoop jar andthe required libraries
daemonlog get/setthelog level for each daemon
trace view and modify Hadoop tracing settings
Most commands print help when invoked w/o parameters.