|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.client.OozieClient
org.apache.oozie.client.XOozieClient
org.apache.oozie.client.AuthOozieClient
public class AuthOozieClient
This subclass of XOozieClient supports Kerberos HTTP SPNEGO and simple authentication.
| Nested Class Summary | |
|---|---|
static class |
AuthOozieClient.AuthType
|
| Nested classes/interfaces inherited from class org.apache.oozie.client.OozieClient |
|---|
OozieClient.ClientCallable<T>, OozieClient.SYSTEM_MODE |
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.apache.oozie.client.XOozieClient |
|---|
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 |
| Constructor Summary | |
|---|---|
AuthOozieClient(String oozieUrl)
Create an instance of the AuthOozieClient. |
|
AuthOozieClient(String oozieUrl,
String authOption)
Create an instance of the AuthOozieClient. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.oozie.client.XOozieClient |
|---|
addArchive, addFile, setLib, submitMapReduce, submitPig, submitScriptLanguage, submitScriptLanguage |
| Methods inherited from class org.apache.oozie.client.OozieClient |
|---|
change, createConfiguration, doAs, dryrun, getBulkInfo, getBundleJobInfo, getBundleJobsInfo, getClientBuildVersion, getCoordActionInfo, getCoordJobInfo, getCoordJobInfo, getCoordJobsInfo, getDebugMode, getHeader, getHeaderNames, getHeaders, getJMSConnectionInfo, getJMSTopicName, getJobDefinition, getJobId, getJobInfo, getJobInfo, getJobLog, getJobLog, getJobsInfo, getJobsInfo, getOozieUrl, getProtocolUrl, getQueueDump, getServerBuildVersion, getSlaInfo, getSystemMode, getWorkflowActionInfo, kill, notEmpty, notNull, removeHeader, reRun, reRunBundle, reRunCoord, resume, run, setDebugMode, setHeader, setSystemMode, start, submit, suspend, validateWSVersion, writeToXml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public 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.
| Constructor Detail |
|---|
public AuthOozieClient(String oozieUrl)
oozieUrl - the Oozie URL
public AuthOozieClient(String oozieUrl,
String authOption)
oozieUrl - the Oozie URLauthOption - the auth option| Method Detail |
|---|
protected 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||