org.apache.ignite.configuration

## Class FileSystemConfiguration

- java.lang.Object
- - org.apache.ignite.configuration.FileSystemConfiguration

    public class FileSystemConfiguration
    extends Object

`IGFS` configuration. More than one file system can be configured within grid. `IGFS` configuration is provided via `IgniteConfiguration.getFileSystemConfiguration()` method.

### Field Summary

Fields
`static int` `DFLT_BLOCK_SIZE` Default file's data block size (bytes).
`static int` `DFLT_BUF_SIZE` Default read/write buffers size (bytes).
`static boolean` `DFLT_COLOCATE_META` Default value of metadata co-location flag.
`static int` `DFLT_FRAGMENTIZER_CONCURRENT_FILES` Default fragmentizer concurrent files.
`static boolean` `DFLT_FRAGMENTIZER_ENABLED` Fragmentizer enabled property.
`static long` `DFLT_FRAGMENTIZER_THROTTLING_BLOCK_LENGTH` Default fragmentizer throttling block length.
`static long` `DFLT_FRAGMENTIZER_THROTTLING_DELAY` Default fragmentizer throttling delay.
`static int` `DFLT_IGFS_LOG_BATCH_SIZE` Default batch size for logging.
`static String` `DFLT_IGFS_LOG_DIR` Default `IGFS` log directory.
`static boolean` `DFLT_IPC_ENDPOINT_ENABLED` Default IPC endpoint enabled flag.
`static int` `DFLT_MGMT_PORT` Default management port.
`static IgfsMode` `DFLT_MODE` Default IGFS mode.
`static int` `DFLT_PER_NODE_BATCH_SIZE` Default per node buffer size.
`static int` `DFLT_PER_NODE_PARALLEL_BATCH_CNT` Default number of per node parallel operations.
`static boolean` `DFLT_RELAXED_CONSISTENCY` Default value of relaxed consistency flag.
`static boolean` `DFLT_UPDATE_FILE_LEN_ON_FLUSH` Default value of update file length on flush flag.
`static String` `DFLT_USER_NAME` Default file system user name.

### Constructor Summary

Constructors
Constructor and Description
`FileSystemConfiguration()` Constructs default configuration.
`FileSystemConfiguration(FileSystemConfiguration cfg)` Constructs the copy of the configuration.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getBlockSize()` Get file's data block size.
`int` `getBufferSize()` Get read/write buffer size for `IGFS` stream operations in bytes.
`CacheConfiguration` `getDataCacheConfiguration()` Cache config to store IGFS data.
`IgfsMode` `getDefaultMode()` Gets mode to specify how `IGFS` interacts with Hadoop file system, like `HDFS`.
`int` `getFragmentizerConcurrentFiles()` Gets number of files that can be processed by fragmentizer concurrently.
`long` `getFragmentizerThrottlingBlockLength()` Gets the length of file chunk to send before delaying the fragmentizer.
`long` `getFragmentizerThrottlingDelay()` Gets throttle delay for fragmentizer.
`IgfsIpcEndpointConfiguration` `getIpcEndpointConfiguration()` Gets IPC endpoint configuration.
`int` `getManagementPort()` Gets port number for management endpoint.
`long` `getMaximumTaskRangeLength()` Get maximum default range size of a file being split during IGFS task execution.
`CacheConfiguration` `getMetaCacheConfiguration()` Cache config to store IGFS meta information.
`String` `getName()` Gets IGFS instance name.
`Map<String,IgfsMode>` `getPathModes()` Gets map of path prefixes to `IGFS` modes used for them.
`int` `getPerNodeBatchSize()` Gets number of file blocks buffered on local node before sending batch to remote node.
`int` `getPerNodeParallelBatchCount()` Gets number of batches that can be concurrently sent to remote node.
`int` `getPrefetchBlocks()` Get number of pre-fetched blocks if specific file's chunk is requested.
`IgfsSecondaryFileSystem` `getSecondaryFileSystem()` Gets the secondary file system.
`int` `getSequentialReadsBeforePrefetch()` Get amount of sequential block reads before prefetch is triggered.
`boolean` `isColocateMetadata()` Get whether to co-locate metadata on a single node.
`boolean` `isFragmentizerEnabled()` Gets flag indicating whether IGFS fragmentizer is enabled.
`boolean` `isIpcEndpointEnabled()` Get IPC endpoint enabled flag.
`boolean` `isRelaxedConsistency()` Get relaxed consistency flag.
`boolean` `isUpdateFileLengthOnFlush()` Get whether to update file length on flush.
`FileSystemConfiguration` `setBlockSize(int blockSize)` Sets file's data block size.
`FileSystemConfiguration` `setBufferSize(int bufSize)` Sets read/write buffers size for `IGFS` stream operations (bytes).
`FileSystemConfiguration` `setColocateMetadata(boolean colocateMeta)` Set metadata co-location flag.
`FileSystemConfiguration` `setDataCacheConfiguration(CacheConfiguration dataCacheCfg)` Cache config to store IGFS data.
`FileSystemConfiguration` `setDefaultMode(IgfsMode dfltMode)` Sets `IGFS` mode to specify how it should interact with secondary Hadoop file system, like `HDFS`.
`FileSystemConfiguration` `setFragmentizerConcurrentFiles(int fragmentizerConcurrentFiles)` Sets number of files to process concurrently by fragmentizer.
`FileSystemConfiguration` `setFragmentizerEnabled(boolean fragmentizerEnabled)` Sets property indicating whether fragmentizer is enabled.
`FileSystemConfiguration` `setFragmentizerThrottlingBlockLength(long fragmentizerThrottlingBlockLen)` Sets length of file chunk to transmit before throttling is delayed.
`FileSystemConfiguration` `setFragmentizerThrottlingDelay(long fragmentizerThrottlingDelay)` Sets delay in milliseconds for which fragmentizer is paused.
`FileSystemConfiguration` `setIpcEndpointConfiguration(IgfsIpcEndpointConfiguration ipcEndpointCfg)` Sets IPC endpoint configuration.
`FileSystemConfiguration` `setIpcEndpointEnabled(boolean ipcEndpointEnabled)` Set IPC endpoint enabled flag.
`FileSystemConfiguration` `setManagementPort(int mgmtPort)` Sets management endpoint port.
`FileSystemConfiguration` `setMaximumTaskRangeLength(long maxTaskRangeLen)` Set maximum default range size of a file being split during IGFS task execution.
`FileSystemConfiguration` `setMetaCacheConfiguration(CacheConfiguration metaCacheCfg)` Cache config to store IGFS meta information.
`FileSystemConfiguration` `setName(String name)` Sets IGFS instance name.
`FileSystemConfiguration` `setPathModes(Map<String,IgfsMode> pathModes)` Sets map of path prefixes to `IGFS` modes used for them.
`FileSystemConfiguration` `setPerNodeBatchSize(int perNodeBatchSize)` Sets number of file blocks collected on local node before sending batch to remote node.
`FileSystemConfiguration` `setPerNodeParallelBatchCount(int perNodeParallelBatchCnt)` Sets number of file block batches that can be concurrently sent to remote node.
`FileSystemConfiguration` `setPrefetchBlocks(int prefetchBlocks)` Sets the number of pre-fetched blocks if specific file's chunk is requested.
`FileSystemConfiguration` `setRelaxedConsistency(boolean relaxedConsistency)` Set relaxed consistency flag.
`FileSystemConfiguration` `setSecondaryFileSystem(IgfsSecondaryFileSystem fileSystem)` Sets the secondary file system.
`FileSystemConfiguration` `setSequentialReadsBeforePrefetch(int seqReadsBeforePrefetch)` Sets amount of sequential block reads before prefetch is triggered.
`FileSystemConfiguration` `setUpdateFileLengthOnFlush(boolean updateFileLenOnFlush)` Set whether to update file length on flush.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DFLT_USER_NAME

    public static final String DFLT_USER_NAME

Default file system user name.

#### DFLT_FRAGMENTIZER_THROTTLING_BLOCK_LENGTH

    public static final long DFLT_FRAGMENTIZER_THROTTLING_BLOCK_LENGTH

Default fragmentizer throttling block length.

See Also:
  Constant Field Values

#### DFLT_FRAGMENTIZER_THROTTLING_DELAY

    public static final long DFLT_FRAGMENTIZER_THROTTLING_DELAY

Default fragmentizer throttling delay.

See Also:
  Constant Field Values

#### DFLT_FRAGMENTIZER_CONCURRENT_FILES

    public static final int DFLT_FRAGMENTIZER_CONCURRENT_FILES

Default fragmentizer concurrent files.

See Also:
  Constant Field Values

#### DFLT_FRAGMENTIZER_ENABLED

    public static final boolean DFLT_FRAGMENTIZER_ENABLED

Fragmentizer enabled property.

See Also:
  Constant Field Values

#### DFLT_IGFS_LOG_BATCH_SIZE

    public static final int DFLT_IGFS_LOG_BATCH_SIZE

Default batch size for logging.

See Also:
  Constant Field Values

#### DFLT_IGFS_LOG_DIR

    public static final String DFLT_IGFS_LOG_DIR

Default `IGFS` log directory.

See Also:
  Constant Field Values

#### DFLT_PER_NODE_BATCH_SIZE

    public static final int DFLT_PER_NODE_BATCH_SIZE

Default per node buffer size.

See Also:
  Constant Field Values

#### DFLT_PER_NODE_PARALLEL_BATCH_CNT

    public static final int DFLT_PER_NODE_PARALLEL_BATCH_CNT

Default number of per node parallel operations.

See Also:
  Constant Field Values

#### DFLT_MODE

    public static final IgfsMode DFLT_MODE

Default IGFS mode.

#### DFLT_BLOCK_SIZE

    public static final int DFLT_BLOCK_SIZE

Default file's data block size (bytes).

See Also:
  Constant Field Values

#### DFLT_BUF_SIZE

    public static final int DFLT_BUF_SIZE

Default read/write buffers size (bytes).

See Also:
  Constant Field Values

#### DFLT_MGMT_PORT

    public static final int DFLT_MGMT_PORT

Default management port.

See Also:
  Constant Field Values

#### DFLT_IPC_ENDPOINT_ENABLED

    public static final boolean DFLT_IPC_ENDPOINT_ENABLED

Default IPC endpoint enabled flag.

See Also:
  Constant Field Values

#### DFLT_COLOCATE_META

    public static final boolean DFLT_COLOCATE_META

Default value of metadata co-location flag.

See Also:
  Constant Field Values

#### DFLT_RELAXED_CONSISTENCY

    public static final boolean DFLT_RELAXED_CONSISTENCY

Default value of relaxed consistency flag.

See Also:
  Constant Field Values

#### DFLT_UPDATE_FILE_LEN_ON_FLUSH

    public static final boolean DFLT_UPDATE_FILE_LEN_ON_FLUSH

Default value of update file length on flush flag.

See Also:
  Constant Field Values

### Constructor Detail

#### FileSystemConfiguration

    public FileSystemConfiguration()

Constructs default configuration.

#### FileSystemConfiguration

    public FileSystemConfiguration(FileSystemConfiguration cfg)

Constructs the copy of the configuration.

Parameters:
  `cfg` - Configuration to copy.

### Method Detail

#### getName

    public String getName()

Gets IGFS instance name.

Returns:
  IGFS instance name.

#### setName

    public FileSystemConfiguration setName(String name)

Sets IGFS instance name.

Parameters:
  `name` - IGFS instance name.
Returns:
  `this` for chaining.

#### getMetaCacheConfiguration

    @Nullable
    public CacheConfiguration getMetaCacheConfiguration()

Cache config to store IGFS meta information.

Returns:
  Cache configuration object.

#### setMetaCacheConfiguration

    public FileSystemConfiguration setMetaCacheConfiguration(CacheConfiguration metaCacheCfg)

Cache config to store IGFS meta information. If `null`, then default config for meta-cache will be used. Default configuration for the meta cache is:

- atomicityMode = TRANSACTIONAL
- cacheMode = PARTITIONED
- backups = 1

Parameters:
  `metaCacheCfg` - Cache configuration object.
Returns:
  `this` for chaining.

#### getDataCacheConfiguration

    @Nullable
    public CacheConfiguration getDataCacheConfiguration()

Cache config to store IGFS data.

Returns:
  Cache configuration object.

#### setDataCacheConfiguration

    public FileSystemConfiguration setDataCacheConfiguration(CacheConfiguration dataCacheCfg)

Cache config to store IGFS data. If `null`, then default config for data cache will be used. Default configuration for the data cache is:

<
- atomicityMode = TRANSACTIONAL
- cacheMode = PARTITIONED
- backups = 0

Parameters:
  `dataCacheCfg` - Cache configuration object.
Returns:
  `this` for chaining.

#### getBlockSize

    public int getBlockSize()

Get file's data block size.

Returns:
  File's data block size.

#### setBlockSize

    public FileSystemConfiguration setBlockSize(int blockSize)

Sets file's data block size.

Parameters:
  `blockSize` - File's data block size (bytes) or `0` to reset default value.
Returns:
  `this` for chaining.

#### getPrefetchBlocks

    public int getPrefetchBlocks()

Get number of pre-fetched blocks if specific file's chunk is requested.

Returns:
  The number of pre-fetched blocks.

#### setPrefetchBlocks

    public FileSystemConfiguration setPrefetchBlocks(int prefetchBlocks)

Sets the number of pre-fetched blocks if specific file's chunk is requested.

Parameters:
  `prefetchBlocks` - New number of pre-fetched blocks.
Returns:
  `this` for chaining.

#### getSequentialReadsBeforePrefetch

    public int getSequentialReadsBeforePrefetch()

Get amount of sequential block reads before prefetch is triggered. The higher this value, the longer IGFS will wait before starting to prefetch values ahead of time. Depending on the use case, this can either help or hurt performance.

Default is `0` which means that pre-fetching will start right away.

# Integration With Hadoop

This parameter can be also overridden for individual Hadoop MapReduce tasks by passing `fs.igfs.[name].open.sequential_reads_before_prefetch` configuration property directly to Hadoop MapReduce task.

NOTE: Integration with Hadoop is available only in `In-Memory Accelerator For Hadoop` edition.

Returns:
  Amount of sequential block reads.

#### setSequentialReadsBeforePrefetch

    public FileSystemConfiguration setSequentialReadsBeforePrefetch(int seqReadsBeforePrefetch)

Sets amount of sequential block reads before prefetch is triggered. The higher this value, the longer IGFS will wait before starting to prefetch values ahead of time. Depending on the use case, this can either help or hurt performance.

Default is `0` which means that pre-fetching will start right away.

# Integration With Hadoop

This parameter can be also overridden for individual Hadoop MapReduce tasks by passing `fs.igfs.[name].open.sequential_reads_before_prefetch` configuration property directly to Hadoop MapReduce task.

NOTE: Integration with Hadoop is available only in `In-Memory Accelerator For Hadoop` edition.

Parameters:
  `seqReadsBeforePrefetch` - Amount of sequential block reads before prefetch is triggered.
Returns:
  `this` for chaining.

#### getBufferSize

    public int getBufferSize()

Get read/write buffer size for `IGFS` stream operations in bytes.

Returns:
  Read/write buffers size (bytes).

#### setBufferSize

    public FileSystemConfiguration setBufferSize(int bufSize)

Sets read/write buffers size for `IGFS` stream operations (bytes).

Parameters:
  `bufSize` - Read/write buffers size for stream operations (bytes) or `0` to reset default value.
Returns:
  `this` for chaining.

#### getPerNodeBatchSize

    public int getPerNodeBatchSize()

Gets number of file blocks buffered on local node before sending batch to remote node.

Returns:
  Per node buffer size.

#### setPerNodeBatchSize

    public FileSystemConfiguration setPerNodeBatchSize(int perNodeBatchSize)

Sets number of file blocks collected on local node before sending batch to remote node.

Parameters:
  `perNodeBatchSize` - Per node buffer size.
Returns:
  `this` for chaining.

#### getPerNodeParallelBatchCount

    public int getPerNodeParallelBatchCount()

Gets number of batches that can be concurrently sent to remote node.

Returns:
  Number of batches for each node.

#### setPerNodeParallelBatchCount

    public FileSystemConfiguration setPerNodeParallelBatchCount(int perNodeParallelBatchCnt)

Sets number of file block batches that can be concurrently sent to remote node.

Parameters:
  `perNodeParallelBatchCnt` - Per node parallel load operations.
Returns:
  `this` for chaining.

#### getIpcEndpointConfiguration

    @Nullable
    public IgfsIpcEndpointConfiguration getIpcEndpointConfiguration()

Gets IPC endpoint configuration.

Endpoint is needed for communication between IGFS and `IgniteHadoopFileSystem` shipped with Ignite Hadoop Accelerator.

Returns:
  IPC endpoint configuration.

#### setIpcEndpointConfiguration

    public FileSystemConfiguration setIpcEndpointConfiguration(@Nullable
                                                               IgfsIpcEndpointConfiguration ipcEndpointCfg)

Sets IPC endpoint configuration.

Endpoint is needed for communication between IGFS and `IgniteHadoopFileSystem` shipped with Ignite Hadoop Accelerator.

Parameters:
  `ipcEndpointCfg` - IPC endpoint configuration.
Returns:
  `this` for chaining.

#### isIpcEndpointEnabled

    public boolean isIpcEndpointEnabled()

Get IPC endpoint enabled flag. In case it is set to `true` endpoint will be created and bound to specific port. Otherwise endpoint will not be created. Default value is `DFLT_IPC_ENDPOINT_ENABLED`.

Endpoint is needed for communication between IGFS and `IgniteHadoopFileSystem` shipped with Ignite Hadoop Accelerator.

Returns:
  `True` in case endpoint is enabled.

#### setIpcEndpointEnabled

    public FileSystemConfiguration setIpcEndpointEnabled(boolean ipcEndpointEnabled)

Set IPC endpoint enabled flag. See `isIpcEndpointEnabled()`.

Endpoint is needed for communication between IGFS and `IgniteHadoopFileSystem` shipped with Ignite Hadoop Accelerator.

Parameters:
  `ipcEndpointEnabled` - IPC endpoint enabled flag.
Returns:
  `this` for chaining.

#### getManagementPort

    public int getManagementPort()

Gets port number for management endpoint. All IGFS nodes should have this port open for Visor Management Console to work with IGFS.

Default value is `DFLT_MGMT_PORT`

Returns:
  Port number or `-1` if management endpoint should be disabled.

#### setManagementPort

    public FileSystemConfiguration setManagementPort(int mgmtPort)

Sets management endpoint port.

Parameters:
  `mgmtPort` - port number or `-1` to disable management endpoint.
Returns:
  `this` for chaining.

#### getDefaultMode

    public IgfsMode getDefaultMode()

Gets mode to specify how `IGFS` interacts with Hadoop file system, like `HDFS`. Secondary Hadoop file system is provided for pass-through, write-through, and read-through purposes.

Default mode is `IgfsMode.DUAL_ASYNC`. If secondary Hadoop file system is not configured, this mode will work just like `IgfsMode.PRIMARY` mode.

Returns:
  Mode to specify how IGFS interacts with secondary HDFS file system.

#### setDefaultMode

    public FileSystemConfiguration setDefaultMode(IgfsMode dfltMode)

Sets `IGFS` mode to specify how it should interact with secondary Hadoop file system, like `HDFS`. Secondary Hadoop file system is provided for pass-through, write-through, and read-through purposes.

Parameters:
  `dfltMode` - `IGFS` mode.
Returns:
  `this` for chaining.

#### getSecondaryFileSystem

    public IgfsSecondaryFileSystem getSecondaryFileSystem()

Gets the secondary file system. Secondary file system is provided for pass-through, write-through, and read-through purposes.

Returns:
  Secondary file system.

#### setSecondaryFileSystem

    public FileSystemConfiguration setSecondaryFileSystem(IgfsSecondaryFileSystem fileSystem)

Sets the secondary file system. Secondary file system is provided for pass-through, write-through, and read-through purposes.

Parameters:
  `fileSystem` - Secondary file system.
Returns:
  `this` for chaining.

#### getPathModes

    @Nullable
    public Map<String,IgfsMode> getPathModes()

Gets map of path prefixes to `IGFS` modes used for them.

If path doesn't correspond to any specified prefix or mappings are not provided, then `getDefaultMode()` is used.

Returns:
  Map of paths to `IGFS` modes.

#### setPathModes

    public FileSystemConfiguration setPathModes(Map<String,IgfsMode> pathModes)

Sets map of path prefixes to `IGFS` modes used for them.

If path doesn't correspond to any specified prefix or mappings are not provided, then `getDefaultMode()` is used.

Parameters:
  `pathModes` - Map of paths to `IGFS` modes.
Returns:
  `this` for chaining.

#### getFragmentizerThrottlingBlockLength

    public long getFragmentizerThrottlingBlockLength()

Gets the length of file chunk to send before delaying the fragmentizer.

Returns:
  File chunk length in bytes.

#### setFragmentizerThrottlingBlockLength

    public FileSystemConfiguration setFragmentizerThrottlingBlockLength(long fragmentizerThrottlingBlockLen)

Sets length of file chunk to transmit before throttling is delayed.

Parameters:
  `fragmentizerThrottlingBlockLen` - Block length in bytes.
Returns:
  `this` for chaining.

#### getFragmentizerThrottlingDelay

    public long getFragmentizerThrottlingDelay()

Gets throttle delay for fragmentizer.

Returns:
  Throttle delay in milliseconds.

#### setFragmentizerThrottlingDelay

    public FileSystemConfiguration setFragmentizerThrottlingDelay(long fragmentizerThrottlingDelay)

Sets delay in milliseconds for which fragmentizer is paused.

Parameters:
  `fragmentizerThrottlingDelay` - Delay in milliseconds.
Returns:
  `this` for chaining.

#### getFragmentizerConcurrentFiles

    public int getFragmentizerConcurrentFiles()

Gets number of files that can be processed by fragmentizer concurrently.

Returns:
  Number of files to process concurrently.

#### setFragmentizerConcurrentFiles

    public FileSystemConfiguration setFragmentizerConcurrentFiles(int fragmentizerConcurrentFiles)

Sets number of files to process concurrently by fragmentizer.

Parameters:
  `fragmentizerConcurrentFiles` - Number of files to process concurrently.
Returns:
  `this` for chaining.

#### isFragmentizerEnabled

    public boolean isFragmentizerEnabled()

Gets flag indicating whether IGFS fragmentizer is enabled. If fragmentizer is disabled, files will be written in distributed fashion.

Returns:
  Flag indicating whether fragmentizer is enabled.

#### setFragmentizerEnabled

    public FileSystemConfiguration setFragmentizerEnabled(boolean fragmentizerEnabled)

Sets property indicating whether fragmentizer is enabled.

Parameters:
  `fragmentizerEnabled` - `True` if fragmentizer is enabled.
Returns:
  `this` for chaining.

#### getMaximumTaskRangeLength

    public long getMaximumTaskRangeLength()

Get maximum default range size of a file being split during IGFS task execution. When IGFS task is about to be executed, it requests file block locations first. Each location is defined as `IgfsFileRange` which has length. In case this parameter is set to positive value, then IGFS will split single file range into smaller ranges with length not greater that this parameter. The only exception to this case is when maximum task range length is smaller than file block size. In this case maximum task range size will be overridden and set to file block size.

Note that this parameter is applied when task is split into jobs before `IgfsRecordResolver` is applied. Therefore, final file ranges being assigned to particular jobs could be greater than value of this parameter depending on file data layout and selected resolver type.

Setting this parameter might be useful when file is highly colocated and have very long consequent data chunks so that task execution suffers from insufficient parallelism. E.g., in case you have one IGFS node in topology and want to process 1Gb file, then only single range of length 1Gb will be returned. This will result in a single job which will be processed in one thread. But in case you provide this configuration parameter and set maximum range length to 16Mb, then 64 ranges will be returned resulting in 64 jobs which could be executed in parallel.

Note that some `IgniteFs.execute()` methods can override value of this parameter.

In case value of this parameter is set to `0` or negative value, it is simply ignored. Default value is `0`.

Returns:
  Maximum range size of a file being split during IGFS task execution.

#### setMaximumTaskRangeLength

    public FileSystemConfiguration setMaximumTaskRangeLength(long maxTaskRangeLen)

Set maximum default range size of a file being split during IGFS task execution. See `getMaximumTaskRangeLength()` for more details.

Parameters:
  `maxTaskRangeLen` - Set maximum default range size of a file being split during IGFS task execution.
Returns:
  `this` for chaining.

#### isColocateMetadata

    public boolean isColocateMetadata()

Get whether to co-locate metadata on a single node.

Normally Ignite spread ownership of particular keys among all cache nodes. Transaction with keys owned by different nodes will produce more network traffic and will require more time to complete comparing to transaction with keys owned only by a single node.

IGFS stores information about file system structure (metadata) inside a transactional cache configured through `getMetaCacheConfiguration()` property. Metadata updates caused by operations on IGFS usually require several internal keys to be updated. As IGFS metadata cache usually operates in `CacheMode.REPLICATED` mode, meaning that all nodes have all metadata locally, it makes sense to give a hint to Ignite to co-locate ownership of all metadata keys on a single node. This will decrease amount of network trips required to update metadata and hence could improve performance.

This property should be disabled if you see excessive CPU and network load on a single node, which degrades performance and cannot be explained by business logic of your application.

This settings is only used if metadata cache is configured in `CacheMode#REPLICATED` mode. Otherwise it is ignored.

Defaults to `DFLT_COLOCATE_META`.

Returns:
  `True` if metadata co-location is enabled.

#### setColocateMetadata

    public FileSystemConfiguration setColocateMetadata(boolean colocateMeta)

Set metadata co-location flag.

See `isColocateMetadata()` for more information.

Parameters:
  `colocateMeta` - Whether metadata co-location is enabled.
Returns:
  `this` for chaining.

#### isRelaxedConsistency

    public boolean isRelaxedConsistency()

Get relaxed consistency flag.

Concurrent file system operations might conflict with each other. E.g. `move("/a1/a2", "/b")` and `move("/b", "/a1")`. Hence, it is necessary to atomically verify that participating paths are still on their places to keep file system in consistent state in such cases. These checks are expensive in distributed environment.

Real applications, e.g. Hadoop jobs, rarely produce conflicting operations. So additional checks could be skipped in these scenarios without any negative effect on file system integrity. It significantly increases performance of file system operations.

If value of this flag is `true`, IGFS will skip expensive consistency checks. It is recommended to set this flag to `false` if your application has conflicting operations, or you do not how exactly users will use your system.

This property affects only `IgfsMode.PRIMARY` paths.

Defaults to `DFLT_RELAXED_CONSISTENCY`.

Returns:
  `True` if relaxed consistency is enabled.

#### setRelaxedConsistency

    public FileSystemConfiguration setRelaxedConsistency(boolean relaxedConsistency)

Set relaxed consistency flag.

See `isColocateMetadata()` for more information.

Parameters:
  `relaxedConsistency` - Whether to use relaxed consistency optimization.
Returns:
  `this` for chaining.

#### isUpdateFileLengthOnFlush

    public boolean isUpdateFileLengthOnFlush()

Get whether to update file length on flush.

Controls whether to update file length or not when `OutputStream.flush()` method is invoked. You may want to set this property to true in case you want to read from a file which is being written at the same time.

Defaults to `DFLT_UPDATE_FILE_LEN_ON_FLUSH`.

Returns:
  Whether to update file length on flush.

#### setUpdateFileLengthOnFlush

    public FileSystemConfiguration setUpdateFileLengthOnFlush(boolean updateFileLenOnFlush)

Set whether to update file length on flush.

Set `isUpdateFileLengthOnFlush()` for more information.

Parameters:
  `updateFileLenOnFlush` - Whether to update file length on flush.
Returns:
  `this` for chaining.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018