java.lang.Object
org.elasticsearch.index.translog.TranslogConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ByteSizeValue
static final ByteSizeValue
static final OperationListener
-
Constructor Summary
ConstructorsConstructorDescriptionTranslogConfig
(ShardId shardId, Path translogPath, IndexSettings indexSettings, BigArrays bigArrays) Creates a new TranslogConfig instanceTranslogConfig
(ShardId shardId, Path translogPath, IndexSettings indexSettings, BigArrays bigArrays, ByteSizeValue bufferSize, DiskIoBufferPool diskIoBufferPool, OperationListener operationListener) TranslogConfig
(ShardId shardId, Path translogPath, IndexSettings indexSettings, BigArrays bigArrays, ByteSizeValue bufferSize, DiskIoBufferPool diskIoBufferPool, OperationListener operationListener, boolean fsync) -
Method Summary
Modifier and TypeMethodDescriptionboolean
fsync()
Returns a BigArrays instance for this engineThe translog buffer size.DiskIoBufferPool
for this engine.Returns the index indexSettingsReturns the shard ID this config is created forReturns the translog path for this engine
-
Field Details
-
DEFAULT_BUFFER_SIZE
-
EMPTY_TRANSLOG_BUFFER_SIZE
-
NOOP_OPERATION_LISTENER
-
-
Constructor Details
-
TranslogConfig
public TranslogConfig(ShardId shardId, Path translogPath, IndexSettings indexSettings, BigArrays bigArrays) Creates a new TranslogConfig instance- Parameters:
shardId
- the shard ID this translog belongs totranslogPath
- the path to use for the transaction log filesindexSettings
- the index settings used to set internal variablesbigArrays
- a bigArrays instance used for temporarily allocating write operations
-
TranslogConfig
public TranslogConfig(ShardId shardId, Path translogPath, IndexSettings indexSettings, BigArrays bigArrays, ByteSizeValue bufferSize, DiskIoBufferPool diskIoBufferPool, OperationListener operationListener) -
TranslogConfig
public TranslogConfig(ShardId shardId, Path translogPath, IndexSettings indexSettings, BigArrays bigArrays, ByteSizeValue bufferSize, DiskIoBufferPool diskIoBufferPool, OperationListener operationListener, boolean fsync)
-
-
Method Details
-
getIndexSettings
Returns the index indexSettings -
getShardId
Returns the shard ID this config is created for -
getBigArrays
Returns a BigArrays instance for this engine -
getTranslogPath
Returns the translog path for this engine -
getBufferSize
The translog buffer size. Default is8kb
-
getDiskIoBufferPool
DiskIoBufferPool
for this engine. Used to allow custom pools in tests, always returnsDiskIoBufferPool.INSTANCE
in production. -
getOperationListener
-
fsync
public boolean fsync()- Returns:
- true if translog writes need to be followed by fsync
-