public class AuthOozieClient extends XOozieClient
XOozieClient supports Kerberos HTTP SPNEGO and simple authentication.| Modifier and Type | Class and Description |
|---|---|
static class |
AuthOozieClient.AuthType |
OozieClient.ClientCallable<T>, OozieClient.SYSTEM_MODE| Modifier and Type | Field and Description |
|---|---|
static File |
AUTH_TOKEN_CACHE_FILE
File constant that defines the location of the authentication token cache file.
|
static String |
AUTHENTICATOR_CLASS_SYS_PROP
Java system property to specify a custom Authenticator implementation.
|
static String |
USE_AUTH_TOKEN_CACHE_SYS_PROP
Java system property that, if set the authentication token will be cached in the user home directory in a hidden
file
.oozie-auth-token with user read/write permissions only. |
ARCHIVES, FILES, HIVE_OPTIONS, HIVE_SCRIPT, HIVE_SCRIPT_PARAMS, IS_PROXY_SUBMISSION, JT, JT_2, JT_PRINCIPAL, NN, NN_2, NN_PRINCIPAL, PIG_OPTIONS, PIG_SCRIPT, PIG_SCRIPT_PARAMS, SQOOP_COMMAND, SQOOP_OPTIONSACTION_MAX_RETRIES, ACTION_NOTIFICATION_URL, ACTION_RETRY_INTERVAL, APP_PATH, BUNDLE_APP_PATH, BUNDLE_ID, CHANGE_VALUE_CONCURRENCY, CHANGE_VALUE_ENDTIME, CHANGE_VALUE_PAUSETIME, CHANGE_VALUE_STATUS, COORD_ACTION_NOTIFICATION_URL, COORDINATOR_APP_PATH, debugMode, EXTERNAL_ID, FILTER_APPNAME, FILTER_FREQUENCY, FILTER_GROUP, FILTER_ID, FILTER_JOBID, FILTER_NAME, FILTER_NOMINAL_TIME, FILTER_SLA_APPNAME, FILTER_SLA_ID, FILTER_SLA_NOMINAL_END, FILTER_SLA_NOMINAL_START, FILTER_SLA_PARENT_ID, FILTER_STATUS, FILTER_UNIT, FILTER_USER, GROUP_NAME, JOB_ACL, LIBPATH, LOG_TOKEN, OOZIE_SUSPEND_ON_NODES, RERUN_FAIL_NODES, RERUN_SKIP_NODES, USE_SYSTEM_LIBPATH, USER_NAME, WORKFLOW_NOTIFICATION_URL, WS_PROTOCOL_VERSION, WS_PROTOCOL_VERSION_0, WS_PROTOCOL_VERSION_1| Constructor and Description |
|---|
AuthOozieClient(String oozieUrl)
Create an instance of the AuthOozieClient.
|
AuthOozieClient(String oozieUrl,
String authOption)
Create an instance of the AuthOozieClient.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpURLConnection |
createConnection(URL url,
String method)
Create an authenticated connection to the Oozie server.
|
protected org.apache.hadoop.security.authentication.client.Authenticator |
getAuthenticator()
Return the Hadoop-auth Authenticator to use.
|
protected Map<String,Class<? extends org.apache.hadoop.security.authentication.client.Authenticator>> |
getAuthenticators()
Get the map for classes of Authenticator.
|
String |
getAuthOption()
Get authOption
|
protected org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token |
readAuthToken()
Read a authentication token cached in the user home directory.
|
protected void |
writeAuthToken(org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token authToken)
Write the current authentication token to the user home directory.authOption
The file is written with user only read/write permissions.
|
addArchive, addFile, setLib, submitMapReduce, submitPig, submitScriptLanguage, submitScriptLanguage, submitSqoopchange, createConfiguration, createRetryableConnection, doAs, dryrun, getAvailableOozieServers, getBulkInfo, getBundleJobInfo, getBundleJobsInfo, getClientBuildVersion, getCoordActionInfo, getCoordJobInfo, getCoordJobInfo, getCoordJobInfo, getCoordJobsInfo, getDebugMode, getHeader, getHeaderNames, getHeaders, getJMSConnectionInfo, getJMSTopicName, getJobDefinition, getJobId, getJobInfo, getJobInfo, getJobLog, getJobLog, getJobLog, getJobsInfo, getJobsInfo, getOozieUrl, getProtocolUrl, getQueueDump, getRetryCount, getServerBuildVersion, getSlaInfo, getSystemMode, getWfsForCoordAction, getWorkflowActionInfo, ignore, kill, kill, listShareLib, notEmpty, notNull, removeHeader, reRun, reRunBundle, reRunCoord, resume, run, setDebugMode, setHeader, setRetryCount, setSystemMode, start, submit, suspend, updateCoord, updateCoord, updateShareLib, validateWSVersion, writeToXmlpublic static final String AUTHENTICATOR_CLASS_SYS_PROP
public static final String USE_AUTH_TOKEN_CACHE_SYS_PROP
.oozie-auth-token with user read/write permissions only.public static final File AUTH_TOKEN_CACHE_FILE
${user.home}/.oozie-auth-token.public AuthOozieClient(String oozieUrl)
oozieUrl - the Oozie URLpublic AuthOozieClient(String oozieUrl, String authOption)
oozieUrl - the Oozie URLauthOption - the auth optionprotected HttpURLConnection createConnection(URL url, String method) throws IOException, OozieClientException
USE_AUTH_TOKEN_CACHE_SYS_PROP is set to true Hadoop-auth
authentication token will be cached/used in/from the '.oozie-auth-token' file in the user
home directory.createConnection in class OozieClienturl - the URL to open a HTTP connection to.method - the HTTP method for the HTTP connection.IOException - if an IO error occurred.OozieClientException - if an oozie client error occurred.protected org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token readAuthToken()
protected void writeAuthToken(org.apache.hadoop.security.authentication.client.AuthenticatedURL.Token authToken)
authToken - the authentication token to cache.protected org.apache.hadoop.security.authentication.client.Authenticator getAuthenticator() throws OozieClientException
AUTHENTICATOR_CLASS_SYS_PROP Java system property for Authenticator.
It the value of the AUTHENTICATOR_CLASS_SYS_PROP is not set it uses
Hadoop-auth KerberosAuthenticator which supports both Kerberos HTTP SPNEGO and Pseudo/simple
authentication.NULL if none.OozieClientException - thrown if the authenticator could not be instantiated.protected Map<String,Class<? extends org.apache.hadoop.security.authentication.client.Authenticator>> getAuthenticators()
OozieClientExceptionpublic String getAuthOption()
Copyright © 2014 Apache Software Foundation. All Rights Reserved.