From 698da295732aad1afbac74545bbc66b4fa31142a Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 14 Sep 2015 05:58:21 -0400 Subject: [PATCH] pull out string constants for settings, and add javadocs --- .../memory/IndexingMemoryController.java | 65 +++++++++++++++---- .../memory/IndexingMemoryControllerIT.java | 6 +- 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java b/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java index 6b28d835191..d52f06b13dd 100644 --- a/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java +++ b/core/src/main/java/org/elasticsearch/indices/memory/IndexingMemoryController.java @@ -51,7 +51,41 @@ import java.util.concurrent.ScheduledFuture; */ public class IndexingMemoryController extends AbstractLifecycleComponent { + /** How much heap (% or bytes) we will share across all actively indexing shards on this node (default: 10%). */ public static final String INDEX_BUFFER_SIZE_SETTING = "indices.memory.index_buffer_size"; + + /** Only applies when indices.memory.index_buffer_size is a %, to set a floor on the actual size in bytes (default: 48 MB). */ + public static final String MIN_INDEX_BUFFER_SIZE_SETTING = "indices.memory.min_index_buffer_size"; + + /** Only applies when indices.memory.index_buffer_size is a %, to set a ceiling on the actual size in bytes (default: not set). */ + public static final String MAX_INDEX_BUFFER_SIZE_SETTING = "indices.memory.max_index_buffer_size"; + + /** Sets a floor on the per-shard index buffer size (default: 4 MB). */ + public static final String MIN_SHARD_INDEX_BUFFER_SIZE_SETTING = "indices.memory.min_shard_index_buffer_size"; + + /** Sets a ceiling on the per-shard index buffer size (default: 512 MB). */ + public static final String MAX_SHARD_INDEX_BUFFER_SIZE_SETTING = "indices.memory.max_shard_index_buffer_size"; + + /** How much heap (% or bytes) we will share across all actively indexing shards for the translog buffer (default: 1%). */ + public static final String TRANSLOG_BUFFER_SIZE_SETTING = "indices.memory.translog_buffer_size"; + + /** Only applies when indices.memory.translog_buffer_size is a %, to set a floor on the actual size in bytes (default: 256 KB). */ + public static final String MIN_TRANSLOG_BUFFER_SIZE_SETTING = "indices.memory.min_translog_buffer_size"; + + /** Only applies when indices.memory.translog_buffer_size is a %, to set a ceiling on the actual size in bytes (default: not set). */ + public static final String MAX_TRANSLOG_BUFFER_SIZE_SETTING = "indices.memory.max_translog_buffer_size"; + + /** Sets a floor on the per-shard translog buffer size (default: 2 KB). */ + public static final String MIN_SHARD_TRANSLOG_BUFFER_SIZE_SETTING = "indices.memory.min_shard_translog_buffer_size"; + + /** Sets a ceiling on the per-shard translog buffer size (default: 64 KB). */ + public static final String MAX_SHARD_TRANSLOG_BUFFER_SIZE_SETTING = "indices.memory.max_shard_translog_buffer_size"; + + /** If we see no indexing operations after this much time for a given shard, we consider that shard inactive (default: 5 minutes). */ + public static final String SHARD_INACTIVE_TIME_SETTING = "indices.memory.shard_inactive_time"; + + /** How frequently we check shards to find inactive ones (default: 30 seconds). */ + public static final String SHARD_INACTIVE_INTERVAL_TIME_SETTING = "indices.memory.interval"; private final ThreadPool threadPool; private final IndicesService indicesService; @@ -83,8 +117,8 @@ public class IndexingMemoryController extends AbstractLifecycleComponent