public class KerberosHadoopFileSystemFactory extends BasicHadoopFileSystemFactory
This factory does not cache any file system instances. If "fs.[prefix].impl.disable.cache" is set
to true, file system instances will be cached by Hadoop.
| Modifier and Type | Field and Description |
|---|---|
static long |
DFLT_RELOGIN_INTERVAL
The default interval used to re-login from the key tab, in milliseconds.
|
cfg, cfgPaths, fullUri, uri| Constructor and Description |
|---|
KerberosHadoopFileSystemFactory()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected FileSystem |
create(String usrName)
Internal file system creation routine, invoked in correct class loader context.
|
FileSystem |
get(String userName)
Gets file system for the given user name.
|
String |
getKeyTab()
Gets the key tab full file name (e.g.
|
String |
getKeyTabPrincipal()
Gets the key tab principal short name (e.g.
|
long |
getReloginInterval()
The interval used to re-login from the key tab, in milliseconds.
|
void |
readExternal(ObjectInput in) |
void |
setKeyTab(String keyTab)
Sets the key tab file name.
|
void |
setKeyTabPrincipal(String keyTabPrincipal)
Set the key tab principal name.
|
void |
setReloginInterval(long reloginInterval)
Sets the relogin interval in milliseconds.
|
void |
start()
Starts grid component, called on grid start.
|
void |
writeExternal(ObjectOutput out) |
get0, getConfigPaths, getUri, setConfigPaths, setUri, stoppublic static final long DFLT_RELOGIN_INTERVAL
public KerberosHadoopFileSystemFactory()
public FileSystem get(String userName) throws IOException
get in interface HadoopFileSystemFactoryget in class BasicHadoopFileSystemFactoryuserName - User nameIOException - In case of error.protected FileSystem create(String usrName) throws IOException, InterruptedException
create in class BasicHadoopFileSystemFactoryusrName - User name.IOException - If failed.InterruptedException - if the current thread is interrupted.@Nullable public String getKeyTabPrincipal()
public void setKeyTabPrincipal(@Nullable
String keyTabPrincipal)
getKeyTabPrincipal() for more information.keyTabPrincipal - The key tab principal name.@Nullable public String getKeyTab()
NOTE! Factory can be serialized and transferred to other machines where instance of
IgniteHadoopFileSystem resides. Corresponding path must exist on these machines as well.
public void setKeyTab(@Nullable
String keyTab)
getKeyTab() for more information.keyTab - The key tab file name.public long getReloginInterval()
0.8 * ticket life time.
Default ticket life time is 1 day (24 hours), so the default re-login interval (10 min)
is obeys this rule well.
Zero value means that re-login should be attempted on each file system operation. Negative values are not allowed.
Note, however, that it does not make sense to make this value small, because Hadoop does not allow to
login if less than UserGroupInformation.MIN_TIME_BEFORE_RELOGIN milliseconds
have passed since the time of the previous login.
See UserGroupInformation.hasSufficientTimeElapsed(long) and its usages for
more detail.
public void setReloginInterval(long reloginInterval)
getReloginInterval() for more information.reloginInterval - The re-login interval, in milliseconds.public void start()
throws IgniteException
start in interface LifecycleAwarestart in class BasicHadoopFileSystemFactoryIgniteException - If failed.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class BasicHadoopFileSystemFactoryIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class BasicHadoopFileSystemFactoryIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016