Skip to content

Commit 671bc4e

Browse files
committed
ThreadPool: Rename dynamic to scaling, closes #75.
1 parent fc47bd6 commit 671bc4e

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

modules/benchmark/micro/src/main/java/org/elasticsearch/benchmark/index/engine/SimpleEngineBenchmark.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import org.elasticsearch.index.store.memory.ByteBufferStore;
4040
import org.elasticsearch.index.translog.memory.MemoryTranslog;
4141
import org.elasticsearch.threadpool.ThreadPool;
42-
import org.elasticsearch.threadpool.dynamic.DynamicThreadPool;
42+
import org.elasticsearch.threadpool.scaling.ScalingThreadPool;
4343
import org.elasticsearch.util.StopWatch;
4444
import org.elasticsearch.util.TimeValue;
4545
import org.elasticsearch.util.lucene.Lucene;
@@ -285,7 +285,7 @@ public static void main(String[] args) throws Exception {
285285

286286
store.deleteContent();
287287

288-
ThreadPool threadPool = new DynamicThreadPool();
288+
ThreadPool threadPool = new ScalingThreadPool();
289289
SnapshotDeletionPolicy deletionPolicy = new SnapshotDeletionPolicy(new KeepOnlyLastDeletionPolicy(shardId, settings));
290290
Engine engine = new RobinEngine(shardId, settings, store, deletionPolicy, new MemoryTranslog(shardId, settings), new LogByteSizeMergePolicyProvider(store),
291291
new ConcurrentMergeSchedulerProvider(shardId, settings), new AnalysisService(shardId.index()), new SimilarityService(shardId.index()));

modules/elasticsearch/src/main/java/org/elasticsearch/threadpool/dynamic/DynamicThreadPool.java renamed to modules/elasticsearch/src/main/java/org/elasticsearch/threadpool/scaling/ScalingThreadPool.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
package org.elasticsearch.threadpool.dynamic;
20+
package org.elasticsearch.threadpool.scaling;
2121

2222
import com.google.inject.Inject;
2323
import org.elasticsearch.threadpool.support.AbstractThreadPool;
@@ -33,19 +33,19 @@
3333
/**
3434
* @author kimchy (Shay Banon)
3535
*/
36-
public class DynamicThreadPool extends AbstractThreadPool {
36+
public class ScalingThreadPool extends AbstractThreadPool {
3737

3838
private final int min;
3939
private final int max;
4040
private final TimeValue keepAlive;
4141

4242
private final int scheduledSize;
4343

44-
public DynamicThreadPool() {
44+
public ScalingThreadPool() {
4545
this(EMPTY_SETTINGS);
4646
}
4747

48-
@Inject public DynamicThreadPool(Settings settings) {
48+
@Inject public ScalingThreadPool(Settings settings) {
4949
super(settings);
5050
this.min = componentSettings.getAsInt("min", 1);
5151
this.max = componentSettings.getAsInt("max", 100);

modules/elasticsearch/src/test/java/org/elasticsearch/index/shard/SimpleIndexShardTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import org.elasticsearch.index.store.ram.RamStore;
3939
import org.elasticsearch.index.translog.memory.MemoryTranslog;
4040
import org.elasticsearch.threadpool.ThreadPool;
41-
import org.elasticsearch.threadpool.dynamic.DynamicThreadPool;
41+
import org.elasticsearch.threadpool.scaling.ScalingThreadPool;
4242
import org.elasticsearch.util.Unicode;
4343
import org.elasticsearch.util.settings.Settings;
4444
import org.testng.annotations.AfterMethod;
@@ -75,7 +75,7 @@ public class SimpleIndexShardTests {
7575
new LogByteSizeMergePolicyProvider(store), new SerialMergeSchedulerProvider(shardId, settings),
7676
analysisService, new SimilarityService(shardId.index()));
7777

78-
threadPool = new DynamicThreadPool();
78+
threadPool = new ScalingThreadPool();
7979

8080
indexShard = new InternalIndexShard(shardId, EMPTY_SETTINGS, store, engine, translog, threadPool, mapperService, queryParserService, filterCache).start();
8181
}

modules/elasticsearch/src/test/java/org/elasticsearch/monitor/jvm/DeadlockSimulator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.elasticsearch.monitor.dump.DumpMonitorService;
2323
import org.elasticsearch.threadpool.ThreadPool;
24-
import org.elasticsearch.threadpool.dynamic.DynamicThreadPool;
24+
import org.elasticsearch.threadpool.scaling.ScalingThreadPool;
2525

2626
import static org.elasticsearch.util.settings.ImmutableSettings.Builder.*;
2727

@@ -31,7 +31,7 @@
3131
public class DeadlockSimulator {
3232

3333
public static void main(String[] args) {
34-
ThreadPool threadPool = new DynamicThreadPool();
34+
ThreadPool threadPool = new ScalingThreadPool();
3535
DumpMonitorService dumpMonitorService = new DumpMonitorService();
3636
JvmMonitorService jvmMonitorService = new JvmMonitorService(EMPTY_SETTINGS, threadPool, dumpMonitorService).start();
3737

modules/elasticsearch/src/test/java/org/elasticsearch/transport/local/SimpleLocalTransportTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.elasticsearch.cluster.node.Node;
2323
import org.elasticsearch.threadpool.ThreadPool;
24-
import org.elasticsearch.threadpool.dynamic.DynamicThreadPool;
24+
import org.elasticsearch.threadpool.scaling.ScalingThreadPool;
2525
import org.elasticsearch.transport.*;
2626
import org.elasticsearch.util.io.stream.StreamInput;
2727
import org.elasticsearch.util.io.stream.StreamOutput;
@@ -45,7 +45,7 @@ public class SimpleLocalTransportTests {
4545
private Node serviceBNode;
4646

4747
@BeforeClass public void setUp() {
48-
threadPool = new DynamicThreadPool();
48+
threadPool = new ScalingThreadPool();
4949

5050
serviceA = new TransportService(new LocalTransport(threadPool), threadPool).start();
5151
serviceANode = new Node("A", serviceA.boundAddress().publishAddress());

modules/elasticsearch/src/test/java/org/elasticsearch/transport/netty/SimpleNettyTransportTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.elasticsearch.cluster.node.Node;
2323
import org.elasticsearch.threadpool.ThreadPool;
24-
import org.elasticsearch.threadpool.dynamic.DynamicThreadPool;
24+
import org.elasticsearch.threadpool.scaling.ScalingThreadPool;
2525
import org.elasticsearch.transport.*;
2626
import org.elasticsearch.util.io.stream.StreamInput;
2727
import org.elasticsearch.util.io.stream.StreamOutput;
@@ -45,7 +45,7 @@ public class SimpleNettyTransportTests {
4545
private Node serviceBNode;
4646

4747
@BeforeClass public void setUp() {
48-
threadPool = new DynamicThreadPool();
48+
threadPool = new ScalingThreadPool();
4949

5050
serviceA = new TransportService(new NettyTransport(threadPool), threadPool).start();
5151
serviceANode = new Node("A", serviceA.boundAddress().publishAddress());

0 commit comments

Comments
 (0)