@InterfaceAudience.Private public class FileSystemAccessService extends BaseService implements FileSystemAccess
FileSystemAccess.FileSystemExecutor<T>| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHENTICATION_TYPE |
static String |
FS_CACHE_PURGE_FREQUENCY |
static String |
FS_CACHE_PURGE_TIMEOUT |
static String |
HADOOP_CONF_DIR |
static String |
KERBEROS_KEYTAB |
static String |
KERBEROS_PRINCIPAL |
static String |
NAME_NODE_WHITELIST |
static String |
PREFIX |
| Constructor and Description |
|---|
FileSystemAccessService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkNameNodeHealth(FileSystem fileSystem) |
protected void |
closeFileSystem(FileSystem fs) |
protected FileSystem |
createFileSystem(Configuration namenodeConf) |
FileSystem |
createFileSystem(String user,
Configuration conf) |
FileSystem |
createFileSystemInternal(String user,
Configuration conf) |
<T> T |
execute(String user,
Configuration conf,
FileSystemAccess.FileSystemExecutor<T> executor) |
Configuration |
getFileSystemConfiguration() |
Class |
getInterface()
Returns the interface implemented by this service.
|
Class[] |
getServiceDependencies()
Returns the service dependencies of this service.
|
protected UserGroupInformation |
getUGI(String user) |
protected void |
init()
Initializes the server.
|
void |
postInit()
Post initializes the service.
|
void |
releaseFileSystem(FileSystem fs) |
protected void |
setRequiredServiceHadoopConf(Configuration conf) |
protected void |
validateNamenode(String namenode) |
destroy, getPrefix, getPrefixedName, getServer, getServiceConfig, init, serverStatusChangepublic static final String PREFIX
public static final String AUTHENTICATION_TYPE
public static final String KERBEROS_KEYTAB
public static final String KERBEROS_PRINCIPAL
public static final String FS_CACHE_PURGE_FREQUENCY
public static final String FS_CACHE_PURGE_TIMEOUT
public static final String NAME_NODE_WHITELIST
public static final String HADOOP_CONF_DIR
protected void init()
throws ServiceException
BaseService
This method is called by BaseService.init(Server) after all service properties
(properties prefixed with
init in class BaseServiceServiceException - thrown if the service could not be initialized.public void postInit()
throws ServiceException
BaseServiceServer after all services of the server have been initialized.
This method does a NOP.
postInit in interface ServicepostInit in class BaseServiceServiceException - thrown if the service could not be
post-initialized.public Class getInterface()
ServiceServer when the Server.get(Class) method is used to
retrieve a service.getInterface in interface Servicepublic Class[] getServiceDependencies()
BaseServiceThis method returns an empty array (size 0)
getServiceDependencies in interface ServicegetServiceDependencies in class BaseServiceprotected UserGroupInformation getUGI(String user) throws IOException
IOExceptionprotected void setRequiredServiceHadoopConf(Configuration conf)
protected FileSystem createFileSystem(Configuration namenodeConf) throws IOException
IOExceptionprotected void closeFileSystem(FileSystem fs) throws IOException
IOExceptionprotected void validateNamenode(String namenode) throws FileSystemAccessException
FileSystemAccessExceptionprotected void checkNameNodeHealth(FileSystem fileSystem) throws FileSystemAccessException
FileSystemAccessExceptionpublic <T> T execute(String user, Configuration conf, FileSystemAccess.FileSystemExecutor<T> executor) throws FileSystemAccessException
execute in interface FileSystemAccessFileSystemAccessExceptionpublic FileSystem createFileSystemInternal(String user, Configuration conf) throws IOException, FileSystemAccessException
IOExceptionFileSystemAccessExceptionpublic FileSystem createFileSystem(String user, Configuration conf) throws IOException, FileSystemAccessException
createFileSystem in interface FileSystemAccessIOExceptionFileSystemAccessExceptionpublic void releaseFileSystem(FileSystem fs) throws IOException
releaseFileSystem in interface FileSystemAccessIOExceptionpublic Configuration getFileSystemConfiguration()
getFileSystemConfiguration in interface FileSystemAccessCopyright © 2018 CERN. All Rights Reserved.