Constructor and Description |
---|
OozieCLI()
Create an Oozie CLI instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAuthOptions(org.apache.commons.cli.Options options)
Add authentication specific options to oozie cli
|
protected void |
addHeader(OozieClient wc) |
protected org.apache.commons.cli.Options |
createAdminOptions()
Create option for command line option 'admin'
|
protected org.apache.commons.cli.Options |
createInfoOptions()
Create option for command line option 'info'
|
protected org.apache.commons.cli.Options |
createJobOptions()
Create option for command line option 'job'
|
protected org.apache.commons.cli.Options |
createJobsOptions()
Create option for command line option 'jobs'
|
protected org.apache.commons.cli.Options |
createMROptions()
Create option for command line option 'mapreduce'
|
protected OozieClient |
createOozieClient(org.apache.commons.cli.CommandLine commandLine)
Create a OozieClient.
|
protected org.apache.commons.cli.Options |
createScriptLanguageOptions(String jobType)
Create option for command line option 'pig' or 'hive'
|
protected org.apache.commons.cli.Options |
createSlaOptions()
Create option for command line option 'sla'
|
protected org.apache.commons.cli.Options |
createSqoopCLIOptions()
Create option for command line option 'sqoop'
|
protected org.apache.commons.cli.Options |
createValidateOptions()
Create option for command line option 'validate'
|
protected XOozieClient |
createXOozieClient(org.apache.commons.cli.CommandLine commandLine)
Create a XOozieClient.
|
protected String |
getAuthOption(org.apache.commons.cli.CommandLine commandLine)
Get auth option from command line
|
protected String[] |
getCLIHelp()
Return Oozie CLI top help lines.
|
CLIParser |
getCLIParser() |
protected String |
getOozieUrl(org.apache.commons.cli.CommandLine commandLine) |
static void |
main(String[] args)
Entry point for the Oozie CLI when invoked from the command line.
|
void |
processCommand(CLIParser parser,
CLIParser.Command command) |
int |
run(String[] args)
Run a CLI programmatically.
|
protected void |
setDebugMode(OozieClient wc,
boolean debugOpt) |
protected void |
setRetryCount(OozieClient wc) |
public static final String ENV_OOZIE_URL
public static final String ENV_OOZIE_DEBUG
public static final String ENV_OOZIE_TIME_ZONE
public static final String ENV_OOZIE_AUTH
public static final String OOZIE_RETRY_COUNT
public static final String WS_HEADER_PREFIX
public static final String HELP_CMD
public static final String VERSION_CMD
public static final String JOB_CMD
public static final String JOBS_CMD
public static final String ADMIN_CMD
public static final String VALIDATE_CMD
public static final String SLA_CMD
public static final String PIG_CMD
public static final String HIVE_CMD
public static final String SQOOP_CMD
public static final String MR_CMD
public static final String INFO_CMD
public static final String OOZIE_OPTION
public static final String CONFIG_OPTION
public static final String SUBMIT_OPTION
public static final String OFFSET_OPTION
public static final String START_OPTION
public static final String RUN_OPTION
public static final String DRYRUN_OPTION
public static final String SUSPEND_OPTION
public static final String RESUME_OPTION
public static final String KILL_OPTION
public static final String CHANGE_OPTION
public static final String CHANGE_VALUE_OPTION
public static final String RERUN_OPTION
public static final String INFO_OPTION
public static final String LOG_OPTION
public static final String ERROR_LOG_OPTION
public static final String AUDIT_LOG_OPTION
public static final String VALIDATE_JAR_OPTION
public static final String SUBMIT_JAR_OPTION
public static final String RUN_JAR_OPTION
public static final String ACTION_OPTION
public static final String DEFINITION_OPTION
public static final String CONFIG_CONTENT_OPTION
public static final String SQOOP_COMMAND_OPTION
public static final String SHOWDIFF_OPTION
public static final String UPDATE_OPTION
public static final String IGNORE_OPTION
public static final String POLL_OPTION
public static final String TIMEOUT_OPTION
public static final String INTERVAL_OPTION
public static final String DO_AS_OPTION
public static final String LEN_OPTION
public static final String FILTER_OPTION
public static final String JOBTYPE_OPTION
public static final String SYSTEM_MODE_OPTION
public static final String VERSION_OPTION
public static final String STATUS_OPTION
public static final String LOCAL_TIME_OPTION
public static final String TIME_ZONE_OPTION
public static final String QUEUE_DUMP_OPTION
public static final String DATE_OPTION
public static final String RERUN_REFRESH_OPTION
public static final String RERUN_NOCLEANUP_OPTION
public static final String RERUN_FAILED_OPTION
public static final String ORDER_OPTION
public static final String COORD_OPTION
public static final String UPDATE_SHARELIB_OPTION
public static final String LIST_SHARELIB_LIB_OPTION
public static final String PURGE_OPTION
public static final String SLA_DISABLE_ALERT
public static final String SLA_ENABLE_ALERT
public static final String SLA_CHANGE
public static final String SERVER_CONFIGURATION_OPTION
public static final String SERVER_OS_ENV_OPTION
public static final String SERVER_JAVA_SYSTEM_PROPERTIES_OPTION
public static final String METRICS_OPTION
public static final String INSTRUMENTATION_OPTION
public static final String AUTH_OPTION
public static final String VERBOSE_OPTION
public static final String VERBOSE_DELIMITER
public static final String DEBUG_OPTION
public static final String SCRIPTFILE_OPTION
public static final String INFO_TIME_ZONES_OPTION
public static final String BULK_OPTION
public static final String AVAILABLE_SERVERS_OPTION
public static final String ALL_WORKFLOWS_FOR_COORD_ACTION
public static final String WORKFLOW_ACTIONS_RETRIES
public static final String COORD_ACTION_MISSING_DEPENDENCIES
public OozieCLI()
public static void main(String[] args)
Upon completion this method exits the JVM with '0' (success) or '-1' (failure).
args
- options and arguments for the Oozie CLI.protected String[] getCLIHelp()
protected void addAuthOptions(org.apache.commons.cli.Options options)
options
- the collection of options to add auth optionsprotected org.apache.commons.cli.Options createAdminOptions()
protected org.apache.commons.cli.Options createJobOptions()
protected org.apache.commons.cli.Options createJobsOptions()
protected org.apache.commons.cli.Options createSlaOptions()
protected org.apache.commons.cli.Options createValidateOptions()
protected org.apache.commons.cli.Options createScriptLanguageOptions(String jobType)
jobType
- type of job - pig or hiveprotected org.apache.commons.cli.Options createSqoopCLIOptions()
protected org.apache.commons.cli.Options createInfoOptions()
protected org.apache.commons.cli.Options createMROptions()
public int run(String[] args)
It does not exit the JVM.
A CLI instance can be used only once.
args
- options and arguments for the Oozie CLI.public CLIParser getCLIParser()
public void processCommand(CLIParser parser, CLIParser.Command command) throws Exception
Exception
protected String getOozieUrl(org.apache.commons.cli.CommandLine commandLine)
protected void addHeader(OozieClient wc)
protected String getAuthOption(org.apache.commons.cli.CommandLine commandLine)
commandLine
- the command line objectprotected OozieClient createOozieClient(org.apache.commons.cli.CommandLine commandLine) throws OozieCLIException
It injects any '-Dheader:' as header to the the OozieClient
.
commandLine
- the parsed command line options.OozieCLIException
- thrown if the OozieClient could not be configured.protected XOozieClient createXOozieClient(org.apache.commons.cli.CommandLine commandLine) throws OozieCLIException
It injects any '-Dheader:' as header to the the OozieClient
.
commandLine
- the parsed command line options.OozieCLIException
- thrown if the XOozieClient could not be configured.protected void setDebugMode(OozieClient wc, boolean debugOpt)
protected void setRetryCount(OozieClient wc)
Copyright © 2019 Apache Software Foundation. All rights reserved.