|
||||||||||
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 |
CONF_PREFIX
|
static String |
JOB_TRACKER_WHITELIST
|
static String |
NAME_NODE_WHITELIST
|
Fields inherited from interface org.apache.oozie.service.Service |
---|
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND |
Constructor Summary | |
---|---|
HadoopAccessorService()
|
Method Summary | |
---|---|
void |
addFileToClassPath(String user,
String group,
org.apache.hadoop.fs.Path file,
org.apache.hadoop.conf.Configuration conf)
Add a file to the ClassPath via the DistributedCache. |
org.apache.hadoop.fs.FileSystem |
createFileSystem(String user,
String group,
org.apache.hadoop.conf.Configuration conf)
Return a FileSystem created with the provided user/group. |
org.apache.hadoop.fs.FileSystem |
createFileSystem(String user,
String group,
URI uri,
org.apache.hadoop.conf.Configuration conf)
Return a FileSystem created with the provided user/group for the specified URI. |
org.apache.hadoop.mapred.JobClient |
createJobClient(String user,
String group,
org.apache.hadoop.mapred.JobConf conf)
Return a JobClient created with the provided user/group. |
void |
destroy()
Destroy the service. |
Class<? extends Service> |
getInterface()
Return the public interface of the service. |
void |
init(org.apache.hadoop.conf.Configuration serviceConf)
|
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
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 serviceConf) 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.JobClient createJobClient(String user, String group, 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, String group, org.apache.hadoop.conf.Configuration conf) throws HadoopAccessorException
conf
- Configuration with all necessary information to create the
FileSystem.
HadoopAccessorException
- if the filesystem could not be created.public org.apache.hadoop.fs.FileSystem createFileSystem(String user, String group, 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 void addFileToClassPath(String user, String group, org.apache.hadoop.fs.Path file, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |