From b9df46445c93ce31e59fc7ae2367949fa443df1e Mon Sep 17 00:00:00 2001 From: leventov Date: Wed, 20 Sep 2017 18:49:33 -0500 Subject: [PATCH] Remove SegmentLoaderConfig.numLoadingThreads config --- docs/content/configuration/historical.md | 3 +-- .../druid/segment/loading/SegmentLoaderConfig.java | 12 +++--------- .../io/druid/server/coordination/ZkCoordinator.java | 2 +- .../druid/server/coordination/ZkCoordinatorTest.java | 12 ------------ 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/docs/content/configuration/historical.md b/docs/content/configuration/historical.md index 28319fd230f3..c972cbe65d1f 100644 --- a/docs/content/configuration/historical.md +++ b/docs/content/configuration/historical.md @@ -36,8 +36,7 @@ The historical node uses several of the global configs in [Configuration](../con |`druid.segmentCache.dropSegmentDelayMillis`|How long a node delays before completely dropping segment.|30000 (30 seconds)| |`druid.segmentCache.infoDir`|Historical nodes keep track of the segments they are serving so that when the process is restarted they can reload the same segments without waiting for the Coordinator to reassign. This path defines where this metadata is kept. Directory will be created if needed.|${first_location}/info_dir| |`druid.segmentCache.announceIntervalMillis`|How frequently to announce segments while segments are loading from cache. Set this value to zero to wait for all segments to be loaded before announcing.|5000 (5 seconds)| -|`druid.segmentCache.numLoadingThreads`|How many segments to load concurrently from from deep storage.|1| -|`druid.segmentCache.numBootstrapThreads`|How many segments to load concurrently from local storage at startup.|Same as numLoadingThreads| +|`druid.segmentCache.numBootstrapThreads`|How many segments to load concurrently from local storage at startup.|1| ### Query Configs diff --git a/server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java b/server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java index f67cd649bfa0..a0d66c1f402e 100644 --- a/server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java +++ b/server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java @@ -31,6 +31,8 @@ */ public class SegmentLoaderConfig { + private static final int DEFAULT_NUM_BOOTSTRAP_THREADS = 1; + @JsonProperty @NotEmpty private List locations = null; @@ -44,9 +46,6 @@ public class SegmentLoaderConfig @JsonProperty("announceIntervalMillis") private int announceIntervalMillis = 0; // do not background announce - @JsonProperty("numLoadingThreads") - private int numLoadingThreads = 1; - @JsonProperty("numBootstrapThreads") private Integer numBootstrapThreads = null; @@ -73,14 +72,9 @@ public int getAnnounceIntervalMillis() return announceIntervalMillis; } - public int getNumLoadingThreads() - { - return numLoadingThreads; - } - public int getNumBootstrapThreads() { - return numBootstrapThreads == null ? numLoadingThreads : numBootstrapThreads; + return numBootstrapThreads == null ? DEFAULT_NUM_BOOTSTRAP_THREADS : numBootstrapThreads; } public File getInfoDir() diff --git a/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java b/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java index 4ae8887694eb..0d6fc933f9a7 100644 --- a/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java +++ b/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java @@ -127,7 +127,7 @@ public void start() throws IOException loadQueueLocation, true, true, - Execs.multiThreaded(config.getNumLoadingThreads(), "ZkCoordinator-%s") + Execs.singleThreaded("ZkCoordinator-%s") ); try { diff --git a/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java b/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java index dc14592b820b..fbd407265280 100644 --- a/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java +++ b/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java @@ -202,12 +202,6 @@ public File getInfoDir() return infoDir; } - @Override - public int getNumLoadingThreads() - { - return 5; - } - @Override public int getAnnounceIntervalMillis() { @@ -493,12 +487,6 @@ public File getInfoDir() return infoDir; } - @Override - public int getNumLoadingThreads() - { - return 5; - } - @Override public int getAnnounceIntervalMillis() {