@InterfaceAudience.Public @InterfaceStability.Unstable public class CommandLineParser extends Object
GenericOptionsParser
can simply be passed:
-Dmaster.address=ADDRESS
in order to specify where the master is.
Use getHelpSnippet()
to provide usage text for the configurations
managed by this class.Modifier and Type | Field and Description |
---|---|
static String |
ADMIN_OPERATION_TIMEOUT_MS_KEY |
static String |
MASTER_ADDRESSES_DEFAULT |
static String |
MASTER_ADDRESSES_KEY |
static int |
NUM_REPLICAS_DEFAULT |
static String |
NUM_REPLICAS_KEY |
static long |
OPERATION_TIMEOUT_MS_DEFAULT |
static String |
OPERATION_TIMEOUT_MS_KEY |
static long |
SOCKET_READ_TIMEOUT_MS_DEFAULT |
static String |
SOCKET_READ_TIMEOUT_MS_KEY |
Constructor and Description |
---|
CommandLineParser(org.apache.hadoop.conf.Configuration conf)
Constructor that uses a Configuration that has already been through
GenericOptionsParser 's command line parsing. |
Modifier and Type | Method and Description |
---|---|
long |
getAdminOperationTimeoutMs()
Get the configured timeout for admin operations.
|
AsyncKuduClient |
getAsyncClient()
Get an async client connected to the configured Master(s).
|
KuduClient |
getClient()
Get a client connected to the configured Master(s).
|
static String |
getHelpSnippet()
This method returns a single multi-line string that contains the help snippet to append to
the tail of a usage() or help() type of method.
|
String |
getMasterAddresses()
Get the configured master's config.
|
int |
getNumReplicas()
Get the number of replicas to use when configuring a new table.
|
long |
getOperationTimeoutMs()
Get the configured timeout for operations on sessions and scanners.
|
long |
getSocketReadTimeoutMs()
Get the configured timeout for socket reads.
|
public static final String MASTER_ADDRESSES_KEY
public static final String MASTER_ADDRESSES_DEFAULT
public static final String OPERATION_TIMEOUT_MS_KEY
public static final long OPERATION_TIMEOUT_MS_DEFAULT
public static final String ADMIN_OPERATION_TIMEOUT_MS_KEY
public static final String SOCKET_READ_TIMEOUT_MS_KEY
public static final long SOCKET_READ_TIMEOUT_MS_DEFAULT
public static final String NUM_REPLICAS_KEY
public static final int NUM_REPLICAS_DEFAULT
public CommandLineParser(org.apache.hadoop.conf.Configuration conf)
GenericOptionsParser
's command line parsing.conf
- the configuration from which job configurations will be extractedpublic String getMasterAddresses()
public long getOperationTimeoutMs()
public long getAdminOperationTimeoutMs()
public long getSocketReadTimeoutMs()
public int getNumReplicas()
public AsyncKuduClient getAsyncClient()
public KuduClient getClient()
public static String getHelpSnippet()
Copyright © 2018 The Apache Software Foundation. All rights reserved.