Remove SegmentLoaderConfig.numLoadingThreads config (#4829)

This commit is contained in:
Roman Leventov 2017-09-20 23:27:43 -05:00 committed by Charles Allen
parent a9d8539802
commit d8b3bfa63c
4 changed files with 5 additions and 24 deletions

View File

@ -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.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.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.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.|1|
|`druid.segmentCache.numBootstrapThreads`|How many segments to load concurrently from local storage at startup.|Same as numLoadingThreads|
### Query Configs ### Query Configs

View File

@ -31,6 +31,8 @@ import java.util.List;
*/ */
public class SegmentLoaderConfig public class SegmentLoaderConfig
{ {
private static final int DEFAULT_NUM_BOOTSTRAP_THREADS = 1;
@JsonProperty @JsonProperty
@NotEmpty @NotEmpty
private List<StorageLocationConfig> locations = null; private List<StorageLocationConfig> locations = null;
@ -44,9 +46,6 @@ public class SegmentLoaderConfig
@JsonProperty("announceIntervalMillis") @JsonProperty("announceIntervalMillis")
private int announceIntervalMillis = 0; // do not background announce private int announceIntervalMillis = 0; // do not background announce
@JsonProperty("numLoadingThreads")
private int numLoadingThreads = 1;
@JsonProperty("numBootstrapThreads") @JsonProperty("numBootstrapThreads")
private Integer numBootstrapThreads = null; private Integer numBootstrapThreads = null;
@ -73,14 +72,9 @@ public class SegmentLoaderConfig
return announceIntervalMillis; return announceIntervalMillis;
} }
public int getNumLoadingThreads()
{
return numLoadingThreads;
}
public int getNumBootstrapThreads() public int getNumBootstrapThreads()
{ {
return numBootstrapThreads == null ? numLoadingThreads : numBootstrapThreads; return numBootstrapThreads == null ? DEFAULT_NUM_BOOTSTRAP_THREADS : numBootstrapThreads;
} }
public File getInfoDir() public File getInfoDir()

View File

@ -127,7 +127,7 @@ public class ZkCoordinator implements DataSegmentChangeHandler
loadQueueLocation, loadQueueLocation,
true, true,
true, true,
Execs.multiThreaded(config.getNumLoadingThreads(), "ZkCoordinator-%s") Execs.singleThreaded("ZkCoordinator-%s")
); );
try { try {

View File

@ -202,12 +202,6 @@ public class ZkCoordinatorTest extends CuratorTestBase
return infoDir; return infoDir;
} }
@Override
public int getNumLoadingThreads()
{
return 5;
}
@Override @Override
public int getAnnounceIntervalMillis() public int getAnnounceIntervalMillis()
{ {
@ -493,12 +487,6 @@ public class ZkCoordinatorTest extends CuratorTestBase
return infoDir; return infoDir;
} }
@Override
public int getNumLoadingThreads()
{
return 5;
}
@Override @Override
public int getAnnounceIntervalMillis() public int getAnnounceIntervalMillis()
{ {