@Deprecated public class GuaguaOptionsParser extends Object
Add other parameter support like -w, -m ...
Tool,
ToolRunner| Constructor and Description |
|---|
GuaguaOptionsParser(org.apache.hadoop.conf.Configuration conf,
org.apache.commons.cli.Options options,
String[] args)
Deprecated.
Create a
GuaguaOptionsParser to parse given options as well as generic Hadoop options. |
GuaguaOptionsParser(org.apache.hadoop.conf.Configuration conf,
String[] args)
Deprecated.
Create a
GuaguaOptionsParser |
GuaguaOptionsParser(org.apache.commons.cli.Options opts,
String[] args)
Deprecated.
Create an options parser with the given options to parse the args.
|
GuaguaOptionsParser(String[] args)
Deprecated.
Create an options parser to parse the args.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.cli.CommandLine |
getCommandLine()
Deprecated.
Returns the commons-cli
CommandLine object to process the parsed arguments. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Deprecated.
Get the modified configuration
|
static URL[] |
getLibJars(org.apache.hadoop.conf.Configuration conf)
Deprecated.
If libjars are set in the conf, parse the libjars.
|
String[] |
getRemainingArgs()
Deprecated.
Returns an array of Strings containing only application-specific arguments.
|
static void |
printGenericCommandUsage(PrintStream out)
Deprecated.
Print the usage message for generic command-line options supported.
|
public GuaguaOptionsParser(org.apache.commons.cli.Options opts,
String[] args)
throws IOException
opts - the optionsargs - the command line argumentsIOExceptionpublic GuaguaOptionsParser(String[] args) throws IOException
args - the command line argumentsIOExceptionpublic GuaguaOptionsParser(org.apache.hadoop.conf.Configuration conf,
String[] args)
throws IOException
GuaguaOptionsParser to parse only the generic Hadoop arguments.
The array of string arguments other than the generic arguments can be obtained by getRemainingArgs().conf - the Configuration to modify.args - command-line arguments.IOExceptionpublic GuaguaOptionsParser(org.apache.hadoop.conf.Configuration conf,
org.apache.commons.cli.Options options,
String[] args)
throws IOException
GuaguaOptionsParser to parse given options as well as generic Hadoop options.
The resulting CommandLine object can be obtained by getCommandLine().conf - the configuration to modifyoptions - options built by the callerargs - User-specified argumentsIOExceptionpublic String[] getRemainingArgs()
Strings containing the un-parsed arguments or empty array if
commandLine was not defined.public org.apache.hadoop.conf.Configuration getConfiguration()
public org.apache.commons.cli.CommandLine getCommandLine()
CommandLine object to process the parsed arguments.
Note: If the object is created with GuaguaOptionsParser(Configuration, String[]), then returned object
will only contain parsed generic options.CommandLine representing list of arguments parsed against Options descriptor.public static URL[] getLibJars(org.apache.hadoop.conf.Configuration conf) throws IOException
IOExceptionpublic static void printGenericCommandUsage(PrintStream out)
out - stream to print the usage message to.Copyright © 2019. All Rights Reserved.