@ SuppressWarnings ( "static-access" ) private static Options buildGeneralOptions ( Options opts ) { Option fs = OptionBuilder . withArgName ( "local|namenode:port" ) . hasArg ( ) . withDescription ( "specify a namenode" ) . create ( "fs" ) ; Option jt = OptionBuilder . withArgName ( "local|jobtracker:port" ) . hasArg ( ) . withDescription ( "specify a job tracker" ) . create ( "jt" ) ; Option oconf = OptionBuilder . withArgName ( "configuration file" ) . hasArg ( ) . withDescription ( "specify an application configuration file" ) . create ( "conf" ) ; Option property = OptionBuilder . withArgName ( "property=value" ) . hasArg ( ) . withDescription ( "use value for given property" ) . create ( ' ' ) ; Option libjars = OptionBuilder . withArgName ( "paths" ) . hasArg ( ) . withDescription ( "comma separated jar files to include in the classpath." ) . create ( "libjars" ) ; Option files = OptionBuilder . withArgName ( "paths" ) . hasArg ( ) . withDescription ( "comma separated files to be copied to the " + "map reduce cluster" ) . create ( "files" ) ; Option archives = OptionBuilder . withArgName ( "paths" ) . hasArg ( ) . withDescription ( "comma separated archives to be unarchived" + " on the compute machines." ) . create ( "archives" ) ; opts . addOption ( fs ) ; opts . addOption ( jt ) ; opts . addOption ( oconf ) ; opts . addOption ( property ) ; opts . addOption ( libjars ) ; opts . addOption ( files ) ; opts . addOption ( archives ) ; return opts ; }
Specify properties of each generic option