IGFS_SCHEME, PROP_PREFER_LOCAL_WRITESPROP_GROUP_NAME, PROP_PERMISSION, PROP_USER_NAME| Modifier and Type | Method and Description |
|---|---|
Collection<IgfsBlockLocation> |
affinity(IgfsPath path,
long start,
long len)
Gets affinity block locations for data blocks of the file, i.e. the nodes, on which the blocks
are stored.
|
Collection<IgfsBlockLocation> |
affinity(IgfsPath path,
long start,
long len,
long maxLen)
Get affinity block locations for data blocks of the file.
|
IgfsOutputStream |
append(IgfsPath path,
boolean create)
Opens an output stream to an existing file for appending data.
|
IgfsOutputStream |
append(IgfsPath path,
int bufSize,
boolean create,
Map<String,String> props)
Opens an output stream to an existing file for appending data.
|
IgniteInternalFuture<?> |
awaitDeletesAsync()
Asynchronously await for all entries existing in trash to be removed.
|
String |
clientLogDirectory()
Gets client file system log directory.
|
void |
clientLogDirectory(String logDir)
Sets client file system log directory.
|
IgfsConfiguration |
configuration()
Gets IGFS configuration.
|
IgfsContext |
context() |
IgfsOutputStream |
create(IgfsPath path,
boolean overwrite)
Creates a file and opens it for writing.
|
IgfsOutputStream |
create(IgfsPath path,
int bufSize,
boolean overwrite,
IgniteUuid affKey,
int replication,
long blockSize,
Map<String,String> props)
Creates a file and opens it for writing.
|
IgfsOutputStream |
create(IgfsPath path,
int bufSize,
boolean overwrite,
int replication,
long blockSize,
Map<String,String> props)
Creates a file and opens it for writing.
|
boolean |
delete(IgfsPath path,
boolean recursive)
Deletes file.
|
boolean |
evictExclude(IgfsPath path,
boolean primary)
Whether this path is excluded from evictions.
|
<T,R> R |
execute(Class<? extends IgfsTask<T,R>> taskCls,
IgfsRecordResolver rslvr,
Collection<IgfsPath> paths,
boolean skipNonExistentFiles,
long maxRangeSize,
T arg)
Executes IGFS task with overridden maximum range length (see
IgfsConfiguration.getMaximumTaskRangeLength() for more information). |
<T,R> R |
execute(Class<? extends IgfsTask<T,R>> taskCls,
IgfsRecordResolver rslvr,
Collection<IgfsPath> paths,
T arg)
Executes IGFS task.
|
<T,R> R |
execute(IgfsTask<T,R> task,
IgfsRecordResolver rslvr,
Collection<IgfsPath> paths,
boolean skipNonExistentFiles,
long maxRangeLen,
T arg)
Executes IGFS task with overridden maximum range length (see
IgfsConfiguration.getMaximumTaskRangeLength() for more information). |
<T,R> R |
execute(IgfsTask<T,R> task,
IgfsRecordResolver rslvr,
Collection<IgfsPath> paths,
T arg)
Executes IGFS task.
|
boolean |
exists(IgfsPath path)
Checks if the specified path exists in the file system.
|
void |
format()
Formats the file system removing all existing entries from it.
|
<R> IgniteFuture<R> |
future()
Gets and resets future for previous asynchronous operation.
|
Boolean |
globalSampling()
Get sampling state.
|
void |
globalSampling(Boolean val)
Enables, disables or clears sampling flag.
|
IgfsStatus |
globalSpace()
Gets global space counters.
|
long |
groupBlockSize()
Gets group block size, i.e. block size multiplied by group size in affinity mapper.
|
IgfsFile |
info(IgfsPath path)
Gets file information for the specified path.
|
boolean |
isAsync() |
boolean |
isProxy(URI path)
Check whether the given path is proxy path.
|
Collection<IgfsFile> |
listFiles(IgfsPath path)
Lists files under the specified path.
|
Collection<IgfsPath> |
listPaths(IgfsPath path)
Lists file paths under the specified path.
|
IgfsLocalMetrics |
localMetrics()
Get local metrics.
|
IgfsMetrics |
metrics()
Gets metrics snapshot for this file system.
|
void |
mkdirs(IgfsPath path)
Creates directories under specified path.
|
void |
mkdirs(IgfsPath path,
Map<String,String> props)
Creates directories under specified path with the specified properties.
|
String |
name()
Gets IGFS name.
|
IgniteUuid |
nextAffinityKey()
Get next affinity key.
|
IgfsInputStreamAdapter |
open(IgfsPath path)
Opens a file for reading.
|
IgfsInputStreamAdapter |
open(IgfsPath path,
int bufSize)
Opens a file for reading.
|
IgfsInputStreamAdapter |
open(IgfsPath path,
int bufSize,
int seqReadsBeforePrefetch)
Opens a file for reading.
|
Map<String,String> |
properties()
Gets the implementation specific properties of file system.
|
IgfsPaths |
proxyPaths()
Get handshake message.
|
void |
rename(IgfsPath src,
IgfsPath dest)
Renames/moves a file.
|
void |
resetMetrics()
Resets metrics for this file system.
|
void |
setTimes(IgfsPath path,
long accessTime,
long modificationTime)
Sets last access time and last modification time for a given path.
|
long |
size(IgfsPath path)
Determines size of the file denoted by provided path.
|
void |
stop()
Stops IGFS cleaning all used resources.
|
IgfsPathSummary |
summary(IgfsPath path)
Gets summary (total number of files, total number of directories and total length)
for a given path.
|
IgfsFile |
update(IgfsPath path,
Map<String,String> props)
Updates file information for the specified path.
|
long |
usedSpaceSize()
Gets used space in bytes.
|
IgniteFs |
withAsync()
Gets component with asynchronous mode enabled.
|
public void stop()
public IgfsContext context()
public IgfsConfiguration configuration()
configuration in interface IgniteFspublic IgfsPaths proxyPaths()
proxyPaths in interface IgfsExpublic String clientLogDirectory()
clientLogDirectory in interface IgfsExnull in case no client connections have been created yet.public void clientLogDirectory(String logDir)
clientLogDirectory in interface IgfsExlogDir - Client file system log directory.public IgfsStatus globalSpace() throws IgniteCheckedException
globalSpace in interface IgfsExIgniteCheckedException - If task execution failed.public void globalSampling(@Nullable Boolean val) throws IgniteCheckedException
globalSampling in interface IgfsExval - True to turn on sampling, false to turn it off, null to clear sampling state.IgniteCheckedException - If failed.@Nullable public Boolean globalSampling()
globalSampling in interface IgfsExTrue in case sampling is enabled, false otherwise, or null in case sampling
flag is not set.public IgfsLocalMetrics localMetrics()
localMetrics in interface IgfsExpublic long groupBlockSize()
groupBlockSize in interface IgfsExpublic boolean exists(IgfsPath path)
public IgfsPathSummary summary(IgfsPath path)
public IgfsFile update(IgfsPath path, Map<String,String> props)
null values
will be removed from the stored properties or ignored if they don't exist in the file info.
When working in DUAL_SYNC or DUAL_ASYNC modes only the following properties will be propagated
to the secondary file system:
usrName - file owner name;grpName - file owner group;permission - Unix-style string representing file permissions.public void rename(IgfsPath src, IgfsPath dest)
You are free to rename/move data files as you wish, but directories can be only renamed. You cannot move the directory between different parent directories.
Examples:
public boolean delete(IgfsPath path, boolean recursive)
public void mkdirs(IgfsPath path)
public void mkdirs(IgfsPath path, @Nullable Map<String,String> props)
public Collection<IgfsPath> listPaths(IgfsPath path)
public Collection<IgfsFile> listFiles(IgfsPath path)
public long usedSpaceSize()
usedSpaceSize in interface Igfspublic Map<String,String> properties()
properties in interface Igfspublic IgfsInputStreamAdapter open(IgfsPath path)
public IgfsInputStreamAdapter open(IgfsPath path, int bufSize)
public IgfsInputStreamAdapter open(IgfsPath path, int bufSize, int seqReadsBeforePrefetch)
open in interface IgniteFsopen in interface IgfsExpath - File path to read.bufSize - Read buffer size (bytes) or zero to use default value.seqReadsBeforePrefetch - Amount of sequential reads before prefetch is started.public IgfsOutputStream create(IgfsPath path, boolean overwrite)
public IgfsOutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, @Nullable Map<String,String> props)
create in interface Igfscreate in interface IgniteFspath - File path to create.bufSize - Write buffer size (bytes) or zero to use default value.overwrite - Overwrite file if it already exists. Note: you cannot overwrite an existent directory.replication - Replication factor.blockSize - Block size.props - File properties to set.public IgfsOutputStream create(IgfsPath path, int bufSize, boolean overwrite, @Nullable IgniteUuid affKey, int replication, long blockSize, @Nullable Map<String,String> props)
create in interface IgniteFspath - File path to create.bufSize - Write buffer size (bytes) or zero to use default value.overwrite - Overwrite file if it already exists. Note: you cannot overwrite an existent directory.affKey - Affinity key used to store file blocks. If not null, the whole file will be
stored on node where affKey resides.replication - Replication factor.blockSize - Block size.props - File properties to set.public IgfsOutputStream append(IgfsPath path, boolean create)
public IgfsOutputStream append(IgfsPath path, int bufSize, boolean create, @Nullable Map<String,String> props)
append in interface Igfsappend in interface IgniteFspath - File path to append.bufSize - Write buffer size (bytes) or zero to use default value.create - Create file if it doesn't exist yet.props - File properties to set only in case it file was just created.public void setTimes(IgfsPath path, long accessTime, long modificationTime)
null,
corresponding time will not be changed.public Collection<IgfsBlockLocation> affinity(IgfsPath path, long start, long len)
public Collection<IgfsBlockLocation> affinity(IgfsPath path, long start, long len, long maxLen)
maxLen parameter is set and
particular block location length is greater than this value, block locations will be split into smaller
chunks.affinity in interface IgniteFspath - File path to get affinity for.start - Position in the file to start affinity resolution from.len - Size of data in the file to resolve affinity for.maxLen - Maximum length of a single returned block location length.public IgfsMetrics metrics()
public void resetMetrics()
resetMetrics in interface IgniteFspublic long size(IgfsPath path)
public void format()
Supports asynchronous execution (see IgniteAsyncSupport).
public IgniteInternalFuture<?> awaitDeletesAsync() throws IgniteCheckedException
awaitDeletesAsync in interface IgfsExIgniteCheckedException - If failed.public <T,R> R execute(IgfsTask<T,R> task, @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, @Nullable T arg)
Supports asynchronous execution (see IgniteAsyncSupport).
public <T,R> R execute(IgfsTask<T,R> task, @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg)
IgfsConfiguration.getMaximumTaskRangeLength() for more information).
Supports asynchronous execution (see IgniteAsyncSupport).
execute in interface IgniteFstask - Task to execute.rslvr - Optional resolver to control split boundaries.paths - Collection of paths to be processed within this task.skipNonExistentFiles - Whether to skip non existent files. If set to true non-existent files will
be ignored. Otherwise an exception will be thrown.maxRangeLen - Optional maximum range length. If 0, then by default all consecutive
IGFS blocks will be included.arg - Optional task argument.public <T,R> R execute(Class<? extends IgfsTask<T,R>> taskCls, @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, @Nullable T arg)
Supports asynchronous execution (see IgniteAsyncSupport).
public <T,R> R execute(Class<? extends IgfsTask<T,R>> taskCls, @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeSize, @Nullable T arg)
IgfsConfiguration.getMaximumTaskRangeLength() for more information).
Supports asynchronous execution (see IgniteAsyncSupport).
execute in interface IgniteFstaskCls - Task class to execute.rslvr - Optional resolver to control split boundaries.paths - Collection of paths to be processed within this task.skipNonExistentFiles - Whether to skip non existent files. If set to true non-existent files will
be ignored. Otherwise an exception will be thrown.maxRangeSize - Maximum range length.arg - Optional task argument.public boolean evictExclude(IgfsPath path, boolean primary)
evictExclude in interface IgfsExpath - Path.primary - Whether the mode is PRIMARY.True if path is excluded from evictions.public IgniteFs withAsync()
withAsync in interface IgniteFswithAsync in interface IgniteAsyncSupportpublic boolean isAsync()
isAsync in interface IgniteAsyncSupportTrue if asynchronous mode is enabled.public <R> IgniteFuture<R> future()
future in interface IgniteAsyncSupportpublic IgniteUuid nextAffinityKey()
nextAffinityKey in interface IgfsEx
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 17 2015