public class IndexingMemoryController extends AbstractComponent implements IndexingOperationListener, java.io.Closeable
IndexingOperationListener.CompositeListener| Modifier and Type | Field and Description |
|---|---|
static Setting<ByteSizeValue> |
INDEX_BUFFER_SIZE_SETTING
How much heap (% or bytes) we will share across all actively indexing shards on this node (default: 10%).
|
static Setting<ByteSizeValue> |
MAX_INDEX_BUFFER_SIZE_SETTING
Only applies when
indices.memory.index_buffer_size is a %, to set a ceiling on the actual size in bytes (default: not set). |
static Setting<ByteSizeValue> |
MIN_INDEX_BUFFER_SIZE_SETTING
Only applies when
indices.memory.index_buffer_size is a %, to set a floor on the actual size in bytes (default: 48 MB). |
static Setting<TimeValue> |
SHARD_INACTIVE_TIME_SETTING
If we see no indexing operations after this much time for a given shard, we consider that shard inactive (default: 5 minutes).
|
static Setting<TimeValue> |
SHARD_MEMORY_INTERVAL_TIME_SETTING
How frequently we check indexing memory usage (default: 5 seconds).
|
deprecationLogger, logger, settings| Modifier and Type | Method and Description |
|---|---|
protected void |
activateThrottling(IndexShard shard)
Asks this shard to throttle indexing to one thread
|
protected java.util.List<IndexShard> |
availableShards() |
void |
bytesWritten(int bytes)
called by IndexShard to record that this many bytes were written to translog
|
protected void |
checkIdle(IndexShard shard,
long inactiveTimeNS)
ask this shard to check now whether it is inactive, and reduces its indexing buffer if so.
|
void |
close() |
protected void |
deactivateThrottling(IndexShard shard)
Asks this shard to stop throttling indexing to one thread
|
protected long |
getIndexBufferRAMBytesUsed(IndexShard shard)
returns how much heap this shard is using for its indexing buffer
|
protected long |
getShardWritingBytes(IndexShard shard)
returns how many bytes this shard is currently writing to disk
|
void |
postDelete(Engine.Delete delete)
Called after the delete operation occurred.
|
void |
postIndex(Engine.Index index,
boolean created)
Called after the indexing operation occurred.
|
protected ThreadPool.Cancellable |
scheduleTask(ThreadPool threadPool) |
protected void |
writeIndexingBufferAsync(IndexShard shard)
ask this shard to refresh, in the background, to free up heap
|
logDeprecatedSetting, logRemovedSetting, nodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpostDelete, postIndex, preDelete, preIndexpublic static final Setting<ByteSizeValue> INDEX_BUFFER_SIZE_SETTING
public static final Setting<ByteSizeValue> MIN_INDEX_BUFFER_SIZE_SETTING
indices.memory.index_buffer_size is a %, to set a floor on the actual size in bytes (default: 48 MB).public static final Setting<ByteSizeValue> MAX_INDEX_BUFFER_SIZE_SETTING
indices.memory.index_buffer_size is a %, to set a ceiling on the actual size in bytes (default: not set).public static final Setting<TimeValue> SHARD_INACTIVE_TIME_SETTING
protected ThreadPool.Cancellable scheduleTask(ThreadPool threadPool)
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableprotected java.util.List<IndexShard> availableShards()
protected long getIndexBufferRAMBytesUsed(IndexShard shard)
protected long getShardWritingBytes(IndexShard shard)
protected void writeIndexingBufferAsync(IndexShard shard)
public void bytesWritten(int bytes)
protected void activateThrottling(IndexShard shard)
protected void deactivateThrottling(IndexShard shard)
public void postIndex(Engine.Index index, boolean created)
IndexingOperationListenerpostIndex in interface IndexingOperationListenerpublic void postDelete(Engine.Delete delete)
IndexingOperationListenerpostDelete in interface IndexingOperationListenerprotected void checkIdle(IndexShard shard, long inactiveTimeNS)