|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 ileSystem instances. The HadoopAccess class to use can be configured in theoozie-site.xml using the oozie.service.HadoopAccessorService.accessor.class property.
| Field Summary | |
|---|---|
static String |
ACTION_CONFS
|
static String |
CONF_PREFIX
|
static String |
HADOOP_CONFS
|
static String |
JOB_TRACKER_WHITELIST
|
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
|
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. |
static org.apache.hadoop.io.Text |
getMRDelegationTokenRenewer(org.apache.hadoop.mapred.JobConf jobConf)
|
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
public static final String SUPPORTED_FILESYSTEMS
| Constructor Detail |
|---|
public HadoopAccessorService()
| Method Detail |
|---|
public void init(Services services)
throws ServiceException
ServiceService singleton at start up time.
init in interface Serviceservices - services singleton initializing the service.
ServiceException - thrown if the service could not initialize.
public void init(org.apache.hadoop.conf.Configuration conf)
throws ServiceException
ServiceExceptionpublic void destroy()
ServiceService singleton at shutdown time.
destroy in interface Servicepublic Class<? extends Service> getInterface()
Service
getInterface in interface Servicepublic 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 static 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||