public class CachingHadoopFileSystemFactory extends BasicHadoopFileSystemFactory
FileSystem instances on per-user basis. Doesn't rely on
built-in Hadoop FileSystem caching mechanics. Separate FileSystem instance is created for each
user instead.
This makes cache instance resistant to concurrent calls to FileSystem.close() in other parts of the user
code. On the other hand, this might cause problems on some environments. E.g. if Kerberos is enabled, a call to
FileSystem.get(URI, Configuration, String) will refresh Kerberos token. But this factory implementation
calls this method only once per user what may lead to token expiration. In such cases it makes sense to either
use BasicHadoopFileSystemFactory or implement your own factory.
cfg, cfgPaths, fullUri, uri| Constructor and Description |
|---|
CachingHadoopFileSystemFactory()
Public non-arg constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FileSystem |
get(String usrName)
Gets file system for the given user name.
|
void |
start()
Starts grid component, called on grid start.
|
void |
stop()
Stops grid component, called on grid shutdown.
|
create, get0, getConfigPaths, getUri, readExternal, setConfigPaths, setUri, writeExternalpublic CachingHadoopFileSystemFactory()
public FileSystem get(String usrName) throws IOException
get in interface HadoopFileSystemFactoryget in class BasicHadoopFileSystemFactoryusrName - User nameIOException - In case of error.public void start()
throws IgniteException
start in interface LifecycleAwarestart in class BasicHadoopFileSystemFactoryIgniteException - If failed.public void stop()
throws IgniteException
stop in interface LifecycleAwarestop in class BasicHadoopFileSystemFactoryIgniteException - If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016