mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
/_cluster/nodes/stats
is broken in 0.11, closes #391.
This commit is contained in:
parent
3b02bd3952
commit
f66f0218ca
@ -25,6 +25,7 @@ import org.elasticsearch.common.unit.SizeValue;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.common.util.concurrent.DynamicExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
import org.elasticsearch.common.util.concurrent.TransferThreadPoolExecutor;
|
||||
import org.elasticsearch.threadpool.support.AbstractThreadPool;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
@ -87,13 +88,22 @@ public class BlockingThreadPool extends AbstractThreadPool {
|
||||
}
|
||||
|
||||
@Override public int getPoolSize() {
|
||||
return ((ThreadPoolExecutor) executorService).getPoolSize();
|
||||
if (executorService instanceof TransferThreadPoolExecutor) {
|
||||
return ((TransferThreadPoolExecutor) executorService).getPoolSize();
|
||||
} else {
|
||||
return ((ThreadPoolExecutor) executorService).getPoolSize();
|
||||
}
|
||||
}
|
||||
|
||||
@Override public int getActiveCount() {
|
||||
return ((ThreadPoolExecutor) executorService).getActiveCount();
|
||||
if (executorService instanceof TransferThreadPoolExecutor) {
|
||||
return ((TransferThreadPoolExecutor) executorService).getActiveCount();
|
||||
} else {
|
||||
return ((ThreadPoolExecutor) executorService).getActiveCount();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override public int getSchedulerPoolSize() {
|
||||
return ((ThreadPoolExecutor) scheduledExecutorService).getPoolSize();
|
||||
}
|
||||
|
@ -75,11 +75,19 @@ public class ScalingThreadPool extends AbstractThreadPool {
|
||||
}
|
||||
|
||||
@Override public int getPoolSize() {
|
||||
return ((TransferThreadPoolExecutor) executorService).getPoolSize();
|
||||
if (executorService instanceof TransferThreadPoolExecutor) {
|
||||
return ((TransferThreadPoolExecutor) executorService).getPoolSize();
|
||||
} else {
|
||||
return ((ThreadPoolExecutor) executorService).getPoolSize();
|
||||
}
|
||||
}
|
||||
|
||||
@Override public int getActiveCount() {
|
||||
return ((TransferThreadPoolExecutor) executorService).getActiveCount();
|
||||
if (executorService instanceof TransferThreadPoolExecutor) {
|
||||
return ((TransferThreadPoolExecutor) executorService).getActiveCount();
|
||||
} else {
|
||||
return ((ThreadPoolExecutor) executorService).getActiveCount();
|
||||
}
|
||||
}
|
||||
|
||||
@Override public int getSchedulerPoolSize() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user