org.apache.oozie.service
Class KerberosHadoopAccessorService
java.lang.Object
org.apache.oozie.service.HadoopAccessorService
org.apache.oozie.service.KerberosHadoopAccessorService
- All Implemented Interfaces:
- Service
public class KerberosHadoopAccessorService
- extends 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 the
oozie-site.xml using the oozie.service.HadoopAccessorService.accessor.class property.
|
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. |
void |
init(org.apache.hadoop.conf.Configuration serviceConf)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONF_PREFIX
public static final String CONF_PREFIX
- See Also:
- Constant Field Values
KERBEROS_AUTH_ENABLED
public static final String KERBEROS_AUTH_ENABLED
- See Also:
- Constant Field Values
KERBEROS_KEYTAB
public static final String KERBEROS_KEYTAB
- See Also:
- Constant Field Values
KERBEROS_PRINCIPAL
public static final String KERBEROS_PRINCIPAL
- See Also:
- Constant Field Values
KerberosHadoopAccessorService
public KerberosHadoopAccessorService()
init
public void init(org.apache.hadoop.conf.Configuration serviceConf)
throws ServiceException
- Overrides:
init in class HadoopAccessorService
- Throws:
ServiceException
destroy
public void destroy()
- Description copied from interface:
Service
- Destroy the service. Invoked by the
Service singleton at shutdown time.
- Specified by:
destroy in interface Service- Overrides:
destroy in class HadoopAccessorService
createJobClient
public org.apache.hadoop.mapred.JobClient createJobClient(String user,
String group,
org.apache.hadoop.mapred.JobConf conf)
throws HadoopAccessorException
- Return a JobClient created with the provided user/group.
- Overrides:
createJobClient in class HadoopAccessorService
- Parameters:
conf - JobConf with all necessary information to create the JobClient.
- Returns:
- JobClient created with the provided user/group.
- Throws:
HadoopAccessorException - if the client could not be created.
createFileSystem
public org.apache.hadoop.fs.FileSystem createFileSystem(String user,
String group,
org.apache.hadoop.conf.Configuration conf)
throws HadoopAccessorException
- Return a FileSystem created with the provided user/group.
- Overrides:
createFileSystem in class HadoopAccessorService
- Parameters:
conf - Configuration with all necessary information to create the FileSystem.
- Returns:
- FileSystem created with the provided user/group.
- Throws:
HadoopAccessorException - if the filesystem could not be created.
createFileSystem
public org.apache.hadoop.fs.FileSystem createFileSystem(String user,
String group,
URI uri,
org.apache.hadoop.conf.Configuration conf)
throws HadoopAccessorException
- Return a FileSystem created with the provided user/group for the specified URI.
- Overrides:
createFileSystem in class HadoopAccessorService
- Parameters:
uri - file system URI.conf - Configuration with all necessary information to create the FileSystem.
- Returns:
- FileSystem created with the provided user/group.
- Throws:
HadoopAccessorException - if the filesystem could not be created.
addFileToClassPath
public void addFileToClassPath(String user,
String group,
org.apache.hadoop.fs.Path file,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Description copied from class:
HadoopAccessorService
- Add a file to the ClassPath via the DistributedCache.
- Overrides:
addFileToClassPath in class HadoopAccessorService
- Throws:
IOException
Copyright © 2012 Apache Software Foundation. All Rights Reserved.