日期:2014-05-16  浏览次数:21039 次

[综合]Apache Hadoop 2.2.0命令行参考手册[翻译]

概述

所有的hadoop命令都是有?bin/hadoop调用执行的,执行hadoop脚本没有任何参数的时候他会输出所有命令的描述信息。

用法:hadoop [--config confdir] [COMMAND] [GENERIC_OPTIONS] [COMMAND_OPTIONS]

hadoop有个输入选项解析框架可以利用在运行class的时候来解析参数

COMMAND_OPTION Description
--config confdir Overwrites the default Configuration directory. Default is?$HADOOP_HOME/conf.
GENERIC_OPTIONS COMMAND_OPTIONS The common set of options supported by multiple commands. Various commands with their options are described in the following sections. The commands have been grouped into User Commands and Administration Commands.

?

通用选项

dfsadmin, fs, fsck, job and fetchdt都支持下属选项所有的。应用程序需要实现Tool接口然后才能支持通用选项解析。

GENERIC_OPTION Description
-conf <configuration file> Specify an application configuration file.
-D <property>=<value> Use value for given property.
-jt <local> or <jobtracker:port> Specify a job tracker. Applies only to job.
-files <comma separated list of files> Specify comma separated files to be copied to the map reduce cluster. Applies only to job.
-libjars <comma seperated list of jars> Specify comma separated jar files to include in the classpath. Applies only to job.
-archives <comma separated list of archives> Specify comma separated archives to be unarchived on the compute machines. Applies only to job.

?