|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.common.cli.CommonCliOptions
public class CommonCliOptions
Reusable code for Hive Cli's.
Basic usage is: create an instance (usually a subclass if you want to all your own options or processing instructions), parse, and then use the resulting information.
See HiveServer
or
HiveMetaStore
for examples of use.
Field Summary | |
---|---|
protected String |
cliname
The name of this cli. |
protected org.apache.commons.cli.CommandLine |
commandLine
|
protected org.apache.commons.cli.Options |
OPTIONS
Options for parsing the command line. |
Constructor Summary | |
---|---|
CommonCliOptions(String cliname,
boolean includeHiveConf)
Create an instance with common options (help, verbose, etc...). |
Method Summary | |
---|---|
Properties |
addHiveconfToSystemProperties()
Add the hiveconf properties to the Java system properties, override anything therein. |
boolean |
isVerbose()
Should the client be verbose. |
void |
parse(String[] args)
Parse the arguments. |
void |
printUsage()
Print usage information for the CLI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.cli.Options OPTIONS
protected org.apache.commons.cli.CommandLine commandLine
protected final String cliname
Constructor Detail |
---|
public CommonCliOptions(String cliname, boolean includeHiveConf)
cliname
- the name of the commandincludeHiveConf
- include "hiveconf" as an option if trueMethod Detail |
---|
public Properties addHiveconfToSystemProperties()
public void printUsage()
public void parse(String[] args)
args
- public boolean isVerbose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |