public class IgniteHadoopIgfsSecondaryFileSystem extends Object implements IgfsSecondaryFileSystem, LifecycleAware
org.apache.hadoop.fs.FileSystem.
Target FileSystem's are created on per-user basis using passed HadoopFileSystemFactory.
| Constructor and Description |
|---|
IgniteHadoopIgfsSecondaryFileSystem()
Default constructor for Spring.
|
IgniteHadoopIgfsSecondaryFileSystem(String uri)
Deprecated.
Use
getFileSystemFactory() instead. |
IgniteHadoopIgfsSecondaryFileSystem(String uri,
String cfgPath)
Deprecated.
Use
getFileSystemFactory() instead. |
IgniteHadoopIgfsSecondaryFileSystem(String uri,
String cfgPath,
String userName)
Deprecated.
Use
getFileSystemFactory() instead. |
public IgniteHadoopIgfsSecondaryFileSystem()
@Deprecated public IgniteHadoopIgfsSecondaryFileSystem(String uri) throws IgniteCheckedException
getFileSystemFactory() instead.uri - URI of file system.IgniteCheckedException - In case of error.@Deprecated public IgniteHadoopIgfsSecondaryFileSystem(@Nullable String uri, @Nullable String cfgPath) throws IgniteCheckedException
getFileSystemFactory() instead.uri - URI of file system.cfgPath - Additional path to Hadoop configuration.IgniteCheckedException - In case of error.@Deprecated public IgniteHadoopIgfsSecondaryFileSystem(@Nullable String uri, @Nullable String cfgPath, @Nullable String userName) throws IgniteCheckedException
getFileSystemFactory() instead.uri - URI of file system.cfgPath - Additional path to Hadoop configuration.userName - User name.IgniteCheckedException - In case of error.@Nullable public String getDefaultUserName()
Defines user name which will be used during file system invocation in case no user name is defined explicitly
through FileSystem.get(URI, Configuration, String).
Also this name will be used if you manipulate IgniteFileSystem directly and do not set user name
explicitly using IgfsUserContext.doAs(String, IgniteOutClosure) or
IgfsUserContext.doAs(String, Callable) methods.
If not set value of system property "user.name" will be used. If this property is not set either,
"anonymous" will be used.
public IgniteHadoopIgfsSecondaryFileSystem setDefaultUserName(@Nullable String dfltUsrName)
getDefaultUserName() for details.dfltUsrName - Default user name.this for chaining.public HadoopFileSystemFactory getFileSystemFactory()
This factory will be used whenever a call to a target FileSystem is required.
If not set, CachingHadoopFileSystemFactory will be used.
public IgniteHadoopIgfsSecondaryFileSystem setFileSystemFactory(HadoopFileSystemFactory factory)
getFileSystemFactory() for details.factory - Secondary file system factory.this for chaining.public boolean exists(IgfsPath path)
exists in interface IgfsSecondaryFileSystem@Nullable public IgfsFile update(IgfsPath path, Map<String,String> props)
update in interface IgfsSecondaryFileSystempublic void rename(IgfsPath src, IgfsPath dest)
rename in interface IgfsSecondaryFileSystempublic boolean delete(IgfsPath path, boolean recursive)
delete in interface IgfsSecondaryFileSystempublic void mkdirs(IgfsPath path)
mkdirs in interface IgfsSecondaryFileSystempublic void mkdirs(IgfsPath path, @Nullable Map<String,String> props)
mkdirs in interface IgfsSecondaryFileSystempublic Collection<IgfsPath> listPaths(IgfsPath path)
listPaths in interface IgfsSecondaryFileSystempublic Collection<IgfsFile> listFiles(IgfsPath path)
listFiles in interface IgfsSecondaryFileSystempublic IgfsSecondaryFileSystemPositionedReadable open(IgfsPath path, int bufSize)
open in interface IgfsSecondaryFileSystempublic OutputStream create(IgfsPath path, boolean overwrite)
create in interface IgfsSecondaryFileSystempublic OutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, @Nullable Map<String,String> props)
create in interface IgfsSecondaryFileSystempublic OutputStream append(IgfsPath path, int bufSize, boolean create, @Nullable Map<String,String> props)
append in interface IgfsSecondaryFileSystempublic IgfsFile info(IgfsPath path)
info in interface IgfsSecondaryFileSystempublic long usedSpaceSize()
usedSpaceSize in interface IgfsSecondaryFileSystempublic void setTimes(IgfsPath path, long modificationTime, long accessTime) throws IgniteException
setTimes in interface IgfsSecondaryFileSystemIgniteExceptionpublic Collection<IgfsBlockLocation> affinity(IgfsPath path, long start, long len, long maxLen) throws IgniteException
affinity in interface IgfsSecondaryFileSystemIgniteException@IgniteInstanceResource public void setIgniteInstance(IgniteEx ignite)
ignite - Ignite instance.public void start()
throws IgniteException
start in interface LifecycleAwareIgniteExceptionpublic void stop()
throws IgniteException
stop in interface LifecycleAwareIgniteException
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.1-p166 Release Date : September 3 2019