|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.service.HadoopAccessorService
public class HadoopAccessorService
The HadoopAccessorService returns HadoopAccessor instances configured to work on behalf of a user-group.
The default accessor used is the base accessor which just injects the UGI into the configuration instance used to create/obtain JobClient and FileSystem instances.
Field Summary | |
---|---|
static String |
ACTION_CONFS
|
static String |
CONF_PREFIX
|
static String[] |
DEFAULT_SUPPORTED_SCHEMES
|
static String |
HADOOP_CONFS
|
protected static String |
HADOOP_JOB_TRACKER
|
protected static String |
HADOOP_JOB_TRACKER_2
|
protected static String |
HADOOP_YARN_RM
|
static String |
JOB_TRACKER_WHITELIST
|
protected static String |
JT_PRINCIPAL
The Kerberos principal for the job tracker. |
static String |
KERBEROS_AUTH_ENABLED
|
static String |
KERBEROS_KEYTAB
|
static String |
KERBEROS_PRINCIPAL
|
static org.apache.hadoop.io.Text |
MR_TOKEN_ALIAS
|
static String |
NAME_NODE_WHITELIST
|
protected static String |
OOZIE_HADOOP_ACCESSOR_SERVICE_CREATED
|
protected static String |
RM_PRINCIPAL
The Kerberos principal for the resource manager. |
static String |
SUPPORTED_FILESYSTEMS
Supported filesystem schemes for namespace federation |
Fields inherited from interface org.apache.oozie.service.Service |
---|
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND |
Constructor Summary | |
---|---|
HadoopAccessorService()
|
Method Summary | |
---|---|
void |
addFileToClassPath(String user,
org.apache.hadoop.fs.Path file,
org.apache.hadoop.conf.Configuration conf)
|
void |
checkSupportedFilesystem(URI uri)
checks configuration parameter if filesystem scheme is among the list of supported ones this makes system robust to filesystems other than HDFS also |
XConfiguration |
createActionDefaultConf(String hostPort,
String action)
Returns a Configuration containing any defaults for an action for a particular cluster. |
org.apache.hadoop.fs.FileSystem |
createFileSystem(String user,
URI uri,
org.apache.hadoop.conf.Configuration conf)
Return a FileSystem created with the provided user for the specified URI. |
org.apache.hadoop.mapred.JobClient |
createJobClient(String user,
org.apache.hadoop.mapred.JobConf conf)
Return a JobClient created with the provided user/group. |
org.apache.hadoop.mapred.JobConf |
createJobConf(String hostPort)
Creates a JobConf using the site configuration for the specified hostname:port. |
void |
destroy()
Destroy the service. |
Class<? extends Service> |
getInterface()
Return the public interface of the service. |
org.apache.hadoop.io.Text |
getMRDelegationTokenRenewer(org.apache.hadoop.mapred.JobConf jobConf)
|
Set<String> |
getSupportedSchemes()
|
void |
init(org.apache.hadoop.conf.Configuration conf)
|
void |
init(Services services)
Initialize the service. |
protected void |
validateJobTracker(String jobTrackerUri)
Validate Job tracker |
protected void |
validateNameNode(String nameNodeUri)
Validate Namenode list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONF_PREFIX
public static final String JOB_TRACKER_WHITELIST
public static final String NAME_NODE_WHITELIST
public static final String HADOOP_CONFS
public static final String ACTION_CONFS
public static final String KERBEROS_AUTH_ENABLED
public static final String KERBEROS_KEYTAB
public static final String KERBEROS_PRINCIPAL
public static final org.apache.hadoop.io.Text MR_TOKEN_ALIAS
protected static final String OOZIE_HADOOP_ACCESSOR_SERVICE_CREATED
protected static final String JT_PRINCIPAL
protected static final String RM_PRINCIPAL
protected static final String HADOOP_JOB_TRACKER
protected static final String HADOOP_JOB_TRACKER_2
protected static final String HADOOP_YARN_RM
public static final String SUPPORTED_FILESYSTEMS
public static final String[] DEFAULT_SUPPORTED_SCHEMES
Constructor Detail |
---|
public HadoopAccessorService()
Method Detail |
---|
public void init(Services services) throws ServiceException
Service
Service
singleton at start up time.
init
in interface Service
services
- services singleton initializing the service.
ServiceException
- thrown if the service could not initialize.public void init(org.apache.hadoop.conf.Configuration conf) throws ServiceException
ServiceException
public void destroy()
Service
Service
singleton at shutdown time.
destroy
in interface Service
public Class<? extends Service> getInterface()
Service
getInterface
in interface Service
public org.apache.hadoop.mapred.JobConf createJobConf(String hostPort)
hostPort
- hostname:port to lookup Hadoop site configuration.
public XConfiguration createActionDefaultConf(String hostPort, String action)
hostPort
- hostname"port to lookup the action default confiugration.action
- action name.
public org.apache.hadoop.mapred.JobClient createJobClient(String user, org.apache.hadoop.mapred.JobConf conf) throws HadoopAccessorException
conf
- JobConf with all necessary information to create the
JobClient.
HadoopAccessorException
- if the client could not be created.public org.apache.hadoop.fs.FileSystem createFileSystem(String user, URI uri, org.apache.hadoop.conf.Configuration conf) throws HadoopAccessorException
uri
- file system URI.conf
- Configuration with all necessary information to create the FileSystem.
HadoopAccessorException
- if the filesystem could not be created.protected void validateJobTracker(String jobTrackerUri) throws HadoopAccessorException
jobTrackerUri
-
HadoopAccessorException
protected void validateNameNode(String nameNodeUri) throws HadoopAccessorException
nameNodeUri
-
HadoopAccessorException
public org.apache.hadoop.io.Text getMRDelegationTokenRenewer(org.apache.hadoop.mapred.JobConf jobConf) throws IOException
IOException
public void addFileToClassPath(String user, org.apache.hadoop.fs.Path file, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public void checkSupportedFilesystem(URI uri) throws HadoopAccessorException
HadoopAccessorException
public Set<String> getSupportedSchemes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |