This is an automated email from the ASF dual-hosted git repository.
mpetrov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new b70ab63c93b IGNITE-26788 StripedExecutor renamed to
IgniteStripedExecutor and moved to pool package (#12814)
b70ab63c93b is described below
commit b70ab63c93b6ca426d973ff3dd8f4b07e9387824
Author: Mikhail Petrov <[email protected]>
AuthorDate: Wed Feb 25 12:10:58 2026 +0300
IGNITE-26788 StripedExecutor renamed to IgniteStripedExecutor and moved to
pool package (#12814)
---
.../apache/ignite/util/SystemViewCommandTest.java | 4 +--
.../org/apache/ignite/IgniteSystemProperties.java | 2 +-
.../org/apache/ignite/internal/IgniteKernal.java | 6 ++--
.../internal/plugin/IgniteLogInfoProviderImpl.java | 6 ++--
.../cache/persistence/CacheStripedExecutor.java | 12 +++----
.../GridCacheDatabaseSharedManager.java | 4 +--
.../persistence/checkpoint/CheckpointManager.java | 4 +--
.../persistence/checkpoint/CheckpointWorkflow.java | 6 ++--
.../cache/persistence/checkpoint/Checkpointer.java | 4 +--
.../checkpoint/LightweightCheckpointManager.java | 4 +--
.../internal/processors/pool/PoolProcessor.java | 41 +++++++++++++---------
.../pool/IgniteStripedExecutor.java} | 11 +++---
.../pool/OperationContextAwareStripedExecutor.java | 3 +-
.../systemview/view/StripedExecutorTaskView.java | 6 ++--
.../ignite/internal/metric/JmxExporterSpiTest.java | 4 +--
.../ignite/internal/metric/SystemViewSelfTest.java | 4 +--
.../pool/IgniteStripedExecutorTest.java} | 8 ++---
.../thread/pool/ThreadPoolMetricsTest.java | 3 +-
.../testsuites/IgniteComputeGridTestSuite.java | 4 +--
.../cache/metric/SqlViewExporterSpiTest.java | 4 +--
20 files changed, 74 insertions(+), 66 deletions(-)
diff --git
a/modules/control-utility/src/test/java/org/apache/ignite/util/SystemViewCommandTest.java
b/modules/control-utility/src/test/java/org/apache/ignite/util/SystemViewCommandTest.java
index f2182e22676..48ebd58f011 100644
---
a/modules/control-utility/src/test/java/org/apache/ignite/util/SystemViewCommandTest.java
+++
b/modules/control-utility/src/test/java/org/apache/ignite/util/SystemViewCommandTest.java
@@ -71,7 +71,7 @@ import
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabase
import
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
import
org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage;
import org.apache.ignite.internal.processors.service.DummyService;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -833,7 +833,7 @@ public class SystemViewCommandTest extends
GridCommandHandlerClusterByClassAbstr
* @param view System view name.
* @param poolName Executor name.
*/
- private void checkStripeExecutorView(StripedExecutor execSvc, String view,
String poolName) throws Exception {
+ private void checkStripeExecutorView(IgniteStripedExecutor execSvc, String
view, String poolName) throws Exception {
CountDownLatch latch = new CountDownLatch(1);
execSvc.execute(0, new TestRunnable(latch, 0));
diff --git
a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index 30fb702d835..bbb9d385370 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -130,10 +130,10 @@ import static
org.apache.ignite.internal.processors.query.schema.SchemaIndexCach
import static
org.apache.ignite.internal.processors.rest.GridRestProcessor.DFLT_SES_TIMEOUT;
import static
org.apache.ignite.internal.processors.rest.GridRestProcessor.DFLT_SES_TOKEN_INVALIDATE_INTERVAL;
import static
org.apache.ignite.internal.processors.rest.handlers.task.GridTaskCommandHandler.DFLT_MAX_TASK_RESULTS;
+import static
org.apache.ignite.internal.thread.pool.IgniteStripedExecutor.DFLT_DATA_STREAMING_EXECUTOR_SERVICE_TASKS_STEALING_THRESHOLD;
import static
org.apache.ignite.internal.util.GridReflectionCache.DFLT_REFLECTION_CACHE_SIZE;
import static
org.apache.ignite.internal.util.IgniteExceptionRegistry.DEFAULT_QUEUE_SIZE;
import static
org.apache.ignite.internal.util.IgniteUtils.DFLT_MBEAN_APPEND_CLASS_LOADER_ID;
-import static
org.apache.ignite.internal.util.StripedExecutor.DFLT_DATA_STREAMING_EXECUTOR_SERVICE_TASKS_STEALING_THRESHOLD;
import static
org.apache.ignite.internal.util.nio.GridNioRecoveryDescriptor.DFLT_NIO_RECOVERY_DESCRIPTOR_RESERVATION_TIMEOUT;
import static
org.apache.ignite.internal.util.nio.GridNioServer.DFLT_IO_BALANCE_PERIOD;
import static
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.DFLT_DISCOVERY_CLIENT_RECONNECT_HISTORY_SIZE;
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 600e9810a37..ebaa9d0bbab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -172,7 +172,7 @@ import
org.apache.ignite.internal.suggestions.GridPerformanceSuggestions;
import org.apache.ignite.internal.suggestions.JvmConfigurationSuggestions;
import org.apache.ignite.internal.suggestions.OsConfigurationSuggestions;
import org.apache.ignite.internal.systemview.ConfigurationViewWalker;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.TimeBag;
import org.apache.ignite.internal.util.future.GridCompoundFuture;
import org.apache.ignite.internal.util.future.GridFinishedFuture;
@@ -1335,8 +1335,8 @@ public class IgniteKernal implements IgniteEx,
Externalizable {
poolActiveThreads = Math.min(poolSize, exec.getActiveCount());
poolQSize = exec.getQueue().size();
}
- else if (execSvc instanceof StripedExecutor) {
- StripedExecutor exec = (StripedExecutor)execSvc;
+ else if (execSvc instanceof IgniteStripedExecutor) {
+ IgniteStripedExecutor exec = (IgniteStripedExecutor)execSvc;
poolSize = exec.stripesCount();
poolActiveThreads = exec.activeStripesCount();
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/plugin/IgniteLogInfoProviderImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/plugin/IgniteLogInfoProviderImpl.java
index 5eb870e2e8b..9b47049511d 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/plugin/IgniteLogInfoProviderImpl.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/plugin/IgniteLogInfoProviderImpl.java
@@ -56,7 +56,7 @@ import
org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
import
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
import org.apache.ignite.internal.processors.port.GridPortRecord;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -785,8 +785,8 @@ public class IgniteLogInfoProviderImpl implements
IgniteLogInfoProvider {
poolActiveThreads = Math.min(poolSize, exec.getActiveCount());
poolQSize = exec.getQueue().size();
}
- else if (execSvc instanceof StripedExecutor) {
- StripedExecutor exec = (StripedExecutor)execSvc;
+ else if (execSvc instanceof IgniteStripedExecutor) {
+ IgniteStripedExecutor exec = (IgniteStripedExecutor)execSvc;
poolSize = exec.stripesCount();
poolActiveThreads = exec.activeStripesCount();
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheStripedExecutor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheStripedExecutor.java
index e735fc0fe72..e36b0e40b88 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheStripedExecutor.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheStripedExecutor.java
@@ -21,26 +21,26 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteInterruptedException;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.typedef.internal.U;
import static
org.apache.ignite.IgniteSystemProperties.IGNITE_RECOVERY_SEMAPHORE_PERMITS;
import static org.apache.ignite.IgniteSystemProperties.getInteger;
import static
org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointReadWriteLock.CHECKPOINT_LOCK_HOLD_COUNT;
-/** Wrapper over {@link StripedExecutor}, that groups submitted tasks by cache
group and partition. */
+/** Wrapper over {@link IgniteStripedExecutor}, that groups submitted tasks by
cache group and partition. */
public class CacheStripedExecutor {
/** Error appeared during submitted task execution. */
private final AtomicReference<IgniteCheckedException> error = new
AtomicReference<>();
/** Delegate striped executor. */
- private final StripedExecutor exec;
+ private final IgniteStripedExecutor exec;
/** Limit number of concurrent tasks submitted to the executor. Helps to
avoid OOM error. */
private final Semaphore semaphore;
/** */
- public CacheStripedExecutor(StripedExecutor exec) {
+ public CacheStripedExecutor(IgniteStripedExecutor exec) {
this.exec = exec;
semaphore = new Semaphore(semaphorePermits(exec));
@@ -117,7 +117,7 @@ public class CacheStripedExecutor {
}
/** @return Underlying striped executor. */
- public StripedExecutor executor() {
+ public IgniteStripedExecutor executor() {
return exec;
}
@@ -127,7 +127,7 @@ public class CacheStripedExecutor {
* @param exec Striped executor.
* @return Number of permits.
*/
- private int semaphorePermits(StripedExecutor exec) {
+ private int semaphorePermits(IgniteStripedExecutor exec) {
// 4 task per-stripe by default.
int permits = exec.stripesCount() * 4;
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 13d496db4b7..311e34ab81c 100755
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -138,10 +138,10 @@ import
org.apache.ignite.internal.processors.configuration.distributed.SimpleDis
import org.apache.ignite.internal.processors.port.GridPortRecord;
import org.apache.ignite.internal.processors.query.GridQueryProcessor;
import org.apache.ignite.internal.systemview.MetastorageViewWalker;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.GridConcurrentHashSet;
import org.apache.ignite.internal.util.GridCountDownCallback;
import org.apache.ignite.internal.util.IgniteUtils;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.TimeBag;
import org.apache.ignite.internal.util.future.CountDownFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -2917,7 +2917,7 @@ public class GridCacheDatabaseSharedManager extends
IgniteCacheDatabaseSharedMan
long cpTs,
UUID cpId,
WALPointer walPtr,
- StripedExecutor exec
+ IgniteStripedExecutor exec
) throws IgniteCheckedException {
assert checkpointManager != null : "Checkpoint is null";
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointManager.java
index 11273a6d002..68a8d78c191 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointManager.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointManager.java
@@ -44,7 +44,7 @@ import
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemor
import
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl;
import org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer;
import org.apache.ignite.internal.processors.failure.FailureProcessor;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.lang.IgniteThrowableBiPredicate;
import org.apache.ignite.internal.util.lang.IgniteThrowableFunction;
import org.apache.ignite.internal.worker.WorkersRegistry;
@@ -381,7 +381,7 @@ public class CheckpointManager {
long ts,
UUID id,
WALPointer ptr,
- StripedExecutor exec
+ IgniteStripedExecutor exec
) throws IgniteCheckedException {
assert checkpointer != null : "Checkpointer hasn't initialized yet";
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointWorkflow.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointWorkflow.java
index 5d8e6a112f4..1606c9c5a75 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointWorkflow.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointWorkflow.java
@@ -62,11 +62,11 @@ import
org.apache.ignite.internal.processors.cache.persistence.pagemem.Checkpoin
import
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx;
import
org.apache.ignite.internal.processors.cache.persistence.partstate.PartitionAllocationMap;
import org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.thread.pool.IgniteThreadPoolExecutor;
import org.apache.ignite.internal.util.GridConcurrentHashSet;
import org.apache.ignite.internal.util.GridConcurrentMultiPairQueue;
import org.apache.ignite.internal.util.GridMultiCollectionWrapper;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.function.ThrowableSupplier;
import org.apache.ignite.internal.util.future.GridCompoundFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -619,7 +619,7 @@ public class CheckpointWorkflow {
long cpTs,
UUID cpId,
WALPointer walPtr,
- StripedExecutor exec,
+ IgniteStripedExecutor exec,
CheckpointPagesWriterFactory checkpointPagesWriterFactory
) throws IgniteCheckedException {
assert cpTs != 0;
@@ -682,7 +682,7 @@ public class CheckpointWorkflow {
* @param applyError Check error reference.
*/
private void awaitApplyComplete(
- StripedExecutor exec,
+ IgniteStripedExecutor exec,
AtomicReference<Throwable> applyError
) throws IgniteCheckedException {
try {
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/Checkpointer.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/Checkpointer.java
index 55de89c868c..bd5c3c9f298 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/Checkpointer.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/Checkpointer.java
@@ -56,9 +56,9 @@ import
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemor
import org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer;
import org.apache.ignite.internal.processors.failure.FailureProcessor;
import
org.apache.ignite.internal.processors.performancestatistics.PerformanceStatisticsProcessor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.thread.pool.IgniteThreadPoolExecutor;
import org.apache.ignite.internal.util.GridConcurrentMultiPairQueue;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.future.CountDownFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.internal.LT;
@@ -1085,7 +1085,7 @@ public class Checkpointer extends GridWorker {
long cpTs,
UUID cpId,
WALPointer walPtr,
- StripedExecutor exec
+ IgniteStripedExecutor exec
) throws IgniteCheckedException {
checkpointWorkflow.finalizeCheckpointOnRecovery(cpTs, cpId, walPtr,
exec, checkpointPagesWriterFactory);
}
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/LightweightCheckpointManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/LightweightCheckpointManager.java
index 6f427b716c6..11382d26ea0 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/LightweightCheckpointManager.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/LightweightCheckpointManager.java
@@ -38,7 +38,7 @@ import
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemor
import
org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl;
import org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer;
import org.apache.ignite.internal.processors.failure.FailureProcessor;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.lang.IgniteThrowableFunction;
import org.apache.ignite.internal.worker.WorkersRegistry;
import org.apache.ignite.lang.IgniteInClosure;
@@ -267,7 +267,7 @@ public class LightweightCheckpointManager {
long ts,
UUID id,
WALPointer ptr,
- StripedExecutor exec
+ IgniteStripedExecutor exec
) throws IgniteCheckedException {
assert checkpointer != null : "Checkpointer hasn't initialized yet";
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
index 0494767717b..9f06eb35ab4 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/processors/pool/PoolProcessor.java
@@ -45,6 +45,7 @@ import
org.apache.ignite.internal.processors.plugin.IgnitePluginProcessor;
import org.apache.ignite.internal.processors.security.IgniteSecurity;
import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
import org.apache.ignite.internal.systemview.StripedExecutorTaskViewWalker;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.thread.pool.IgniteStripedThreadPoolExecutor;
import org.apache.ignite.internal.thread.pool.IgniteThreadPoolExecutor;
import org.apache.ignite.internal.thread.pool.OperationContextAwareIoPool;
@@ -52,7 +53,6 @@ import
org.apache.ignite.internal.thread.pool.OperationContextAwareStripedExecut
import
org.apache.ignite.internal.thread.pool.OperationContextAwareStripedThreadPoolExecutor;
import
org.apache.ignite.internal.thread.pool.OperationContextAwareThreadPoolExecutor;
import org.apache.ignite.internal.thread.pool.SameThreadExecutor;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -125,16 +125,16 @@ public class PoolProcessor extends GridProcessorAdapter {
/** Task execution time metric description. */
public static final String TASK_EXEC_TIME_DESC = "Tasks execution times as
histogram (milliseconds).";
- /** Name of the system view for a data streamer {@link StripedExecutor}
queue view. */
+ /** Name of the system view for a data streamer {@link
IgniteStripedExecutor} queue view. */
public static final String STREAM_POOL_QUEUE_VIEW =
metricName("datastream", "threadpool", "queue");
- /** Description of the system view for a data streamer {@link
StripedExecutor} queue view. */
+ /** Description of the system view for a data streamer {@link
IgniteStripedExecutor} queue view. */
public static final String STREAM_POOL_QUEUE_VIEW_DESC = "Datastream
thread pool task queue";
- /** Name of the system view for a system {@link StripedExecutor} queue
view. */
+ /** Name of the system view for a system {@link IgniteStripedExecutor}
queue view. */
public static final String SYS_POOL_QUEUE_VIEW = metricName("striped",
"threadpool", "queue");
- /** Description of the system view for a system {@link StripedExecutor}
queue view. */
+ /** Description of the system view for a system {@link
IgniteStripedExecutor} queue view. */
public static final String SYS_POOL_QUEUE_VIEW_DESC = "Striped thread pool
task queue";
/** Group for a thread pools. */
@@ -165,7 +165,7 @@ public class PoolProcessor extends GridProcessorAdapter {
/** */
@GridToStringExclude
- private StripedExecutor stripedExecSvc;
+ private IgniteStripedExecutor stripedExecSvc;
/** Management executor service. */
@GridToStringExclude
@@ -177,7 +177,7 @@ public class PoolProcessor extends GridProcessorAdapter {
/** Data streamer executor service. */
@GridToStringExclude
- private StripedExecutor dataStreamerExecSvc;
+ private IgniteStripedExecutor dataStreamerExecSvc;
/** REST requests executor service. */
@GridToStringExclude
@@ -661,13 +661,13 @@ public class PoolProcessor extends GridProcessorAdapter {
ctx.systemView().registerInnerCollectionView(SYS_POOL_QUEUE_VIEW,
SYS_POOL_QUEUE_VIEW_DESC,
new StripedExecutorTaskViewWalker(),
Arrays.asList(stripedExecSvc.stripes()),
- StripedExecutor.Stripe::queue,
+ IgniteStripedExecutor.Stripe::queue,
StripedExecutorTaskView::new);
ctx.systemView().registerInnerCollectionView(STREAM_POOL_QUEUE_VIEW,
STREAM_POOL_QUEUE_VIEW_DESC,
new StripedExecutorTaskViewWalker(),
Arrays.asList(dataStreamerExecSvc.stripes()),
- StripedExecutor.Stripe::queue,
+ IgniteStripedExecutor.Stripe::queue,
StripedExecutorTaskView::new);
}
@@ -709,8 +709,8 @@ public class PoolProcessor extends GridProcessorAdapter {
checkPoolStarvation(name, exec0.completedTaskCount(),
exec0.poolSize(),
exec0.activeCount(), exec0.queueEmpty());
}
- else if (exec instanceof StripedExecutor)
- ((StripedExecutor)exec).detectStarvation();
+ else if (exec instanceof IgniteStripedExecutor)
+ ((IgniteStripedExecutor)exec).detectStarvation();
}
}
@@ -890,7 +890,7 @@ public class PoolProcessor extends GridProcessorAdapter {
*
* @return Thread pool implementation to be used in grid for internal
system messages.
*/
- public StripedExecutor getStripedExecutorService() {
+ public IgniteStripedExecutor getStripedExecutorService() {
return stripedExecSvc;
}
@@ -918,7 +918,7 @@ public class PoolProcessor extends GridProcessorAdapter {
*
* @return Thread pool implementation to be used for data stream messages.
*/
- public StripedExecutor getDataStreamerExecutorService() {
+ public IgniteStripedExecutor getDataStreamerExecutorService() {
return dataStreamerExecSvc;
}
@@ -1232,8 +1232,8 @@ public class PoolProcessor extends GridProcessorAdapter {
keepAliveTime);
}
- /** Creates instance {@link StripedExecutor} with a notion of whether
{@link IgniteSecurity} is enabled. */
- private StripedExecutor createStripedExecutor(
+ /** Creates instance {@link IgniteStripedExecutor} with a notion of
whether {@link IgniteSecurity} is enabled. */
+ private IgniteStripedExecutor createStripedExecutor(
int cnt,
String igniteInstanceName,
String poolName,
@@ -1253,7 +1253,16 @@ public class PoolProcessor extends GridProcessorAdapter {
stealTasks,
gridWorkerLsnr,
failureDetectionTimeout)
- : new StripedExecutor(cnt, igniteInstanceName, poolName, log,
errHnd, stealTasks, gridWorkerLsnr, failureDetectionTimeout);
+ : new IgniteStripedExecutor(
+ cnt,
+ igniteInstanceName,
+ poolName,
+ log,
+ errHnd,
+ stealTasks,
+ gridWorkerLsnr,
+ failureDetectionTimeout
+ );
}
/** Creates instance {@link IgniteThreadPoolExecutor} with a notion of
whether {@link IgniteSecurity} is enabled. */
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java
similarity index 98%
rename from
modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
rename to
modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java
index 20ab0de292b..36be6ad4db3 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutor.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.ignite.internal.util;
+package org.apache.ignite.internal.thread.pool;
import java.util.Arrays;
import java.util.Collection;
@@ -40,6 +40,7 @@ import
org.apache.ignite.internal.managers.communication.GridIoPolicy;
import org.apache.ignite.internal.processors.metric.MetricRegistryImpl;
import org.apache.ignite.internal.processors.metric.impl.HistogramMetricImpl;
import org.apache.ignite.internal.processors.pool.MetricsAwareExecutorService;
+import org.apache.ignite.internal.util.GridStringBuilder;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.internal.A;
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -62,7 +63,7 @@ import static
org.apache.ignite.internal.processors.pool.PoolProcessor.TASK_EXEC
/**
* Striped executor.
*/
-public class StripedExecutor implements ExecutorService,
MetricsAwareExecutorService {
+public class IgniteStripedExecutor implements ExecutorService,
MetricsAwareExecutorService {
/** @see
IgniteSystemProperties#IGNITE_DATA_STREAMING_EXECUTOR_SERVICE_TASKS_STEALING_THRESHOLD
*/
public static final int
DFLT_DATA_STREAMING_EXECUTOR_SERVICE_TASKS_STEALING_THRESHOLD = 4;
@@ -87,7 +88,7 @@ public class StripedExecutor implements ExecutorService,
MetricsAwareExecutorSer
* @param errHnd Critical failure handler.
* @param gridWorkerLsnr Listener to link with every stripe worker.
*/
- public StripedExecutor(
+ public IgniteStripedExecutor(
int cnt,
String igniteInstanceName,
String poolName,
@@ -108,7 +109,7 @@ public class StripedExecutor implements ExecutorService,
MetricsAwareExecutorSer
* @param stealTasks {@code True} to steal tasks.
* @param gridWorkerLsnr listener to link with every stripe worker.
*/
- public StripedExecutor(
+ public IgniteStripedExecutor(
int cnt,
String igniteInstanceName,
String poolName,
@@ -535,7 +536,7 @@ public class StripedExecutor implements ExecutorService,
MetricsAwareExecutorSer
/** {@inheritDoc} */
@Override public String toString() {
- return S.toString(StripedExecutor.class, this);
+ return S.toString(IgniteStripedExecutor.class, this);
}
/**
diff --git
a/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/OperationContextAwareStripedExecutor.java
b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/OperationContextAwareStripedExecutor.java
index 268776a4d63..312fc5ef247 100644
---
a/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/OperationContextAwareStripedExecutor.java
+++
b/modules/core/src/main/java/org/apache/ignite/internal/thread/pool/OperationContextAwareStripedExecutor.java
@@ -19,13 +19,12 @@ package org.apache.ignite.internal.thread.pool;
import org.apache.ignite.IgniteLogger;
import
org.apache.ignite.internal.thread.context.function.OperationContextAwareRunnable;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.worker.GridWorkerListener;
import org.apache.ignite.lang.IgniteInClosure;
import org.jetbrains.annotations.NotNull;
/** */
-public class OperationContextAwareStripedExecutor extends StripedExecutor {
+public class OperationContextAwareStripedExecutor extends
IgniteStripedExecutor {
/** */
public OperationContextAwareStripedExecutor(
int cnt,
diff --git
a/modules/core/src/main/java/org/apache/ignite/spi/systemview/view/StripedExecutorTaskView.java
b/modules/core/src/main/java/org/apache/ignite/spi/systemview/view/StripedExecutorTaskView.java
index 466851b0f2b..217d06c9b5c 100644
---
a/modules/core/src/main/java/org/apache/ignite/spi/systemview/view/StripedExecutorTaskView.java
+++
b/modules/core/src/main/java/org/apache/ignite/spi/systemview/view/StripedExecutorTaskView.java
@@ -19,13 +19,13 @@ package org.apache.ignite.spi.systemview.view;
import org.apache.ignite.internal.systemview.Order;
import org.apache.ignite.internal.systemview.SystemViewDescriptor;
-import org.apache.ignite.internal.util.StripedExecutor;
-import org.apache.ignite.internal.util.StripedExecutor.Stripe;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor.Stripe;
import static org.apache.ignite.internal.util.IgniteUtils.toStringSafe;
/**
- * {@link StripedExecutor} task representation for a {@link SystemView}.
+ * {@link IgniteStripedExecutor} task representation for a {@link SystemView}.
*/
@SystemViewDescriptor
public class StripedExecutorTaskView {
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/metric/JmxExporterSpiTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/metric/JmxExporterSpiTest.java
index 412ab47f0dc..44452ca3209 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/metric/JmxExporterSpiTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/metric/JmxExporterSpiTest.java
@@ -77,7 +77,7 @@ import
org.apache.ignite.internal.processors.metric.impl.MetricUtils;
import org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext;
import org.apache.ignite.internal.processors.service.DummyService;
import org.apache.ignite.internal.systemview.CachePagesListViewWalker;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -1081,7 +1081,7 @@ public class JmxExporterSpiTest extends
AbstractExporterSpiTest {
* @param viewName System view.
* @param poolName Executor name.
*/
- private void checkStripeExecutorView(StripedExecutor execSvc, String
viewName, String poolName) throws Exception {
+ private void checkStripeExecutorView(IgniteStripedExecutor execSvc, String
viewName, String poolName) throws Exception {
CountDownLatch latch = new CountDownLatch(1);
execSvc.execute(0, new TestRunnable(latch, 0));
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/metric/SystemViewSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/metric/SystemViewSelfTest.java
index 19da9264e27..399502533ce 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/metric/SystemViewSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/metric/SystemViewSelfTest.java
@@ -95,8 +95,8 @@ import
org.apache.ignite.internal.systemview.CachePagesListViewWalker;
import
org.apache.ignite.internal.systemview.ClientConnectionAttributeViewWalker;
import org.apache.ignite.internal.systemview.MetastorageViewWalker;
import org.apache.ignite.internal.systemview.NodeAttributeViewWalker;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.GridTestClockTimer;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.T2;
import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -1930,7 +1930,7 @@ public class SystemViewSelfTest extends
GridCommonAbstractTest {
* @param view System view.
* @param poolName Executor name.
*/
- private void checkStripeExecutorView(StripedExecutor execSvc,
SystemView<StripedExecutorTaskView> view,
+ private void checkStripeExecutorView(IgniteStripedExecutor execSvc,
SystemView<StripedExecutorTaskView> view,
String poolName) throws Exception {
CountDownLatch latch = new CountDownLatch(1);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutorTest.java
similarity index 95%
rename from
modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java
rename to
modules/core/src/test/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutorTest.java
index de15555177d..7b40703e807 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/util/StripedExecutorTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/thread/pool/IgniteStripedExecutorTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.ignite.internal.util;
+package org.apache.ignite.internal.thread.pool;
import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.logger.java.JavaLogger;
@@ -26,13 +26,13 @@ import org.junit.Test;
/**
*
*/
-public class StripedExecutorTest extends GridCommonAbstractTest {
+public class IgniteStripedExecutorTest extends GridCommonAbstractTest {
/** */
- private StripedExecutor stripedExecSvc;
+ private IgniteStripedExecutor stripedExecSvc;
/** {@inheritDoc} */
@Override public void beforeTest() {
- stripedExecSvc = new StripedExecutor(3, "foo name", "pool name", new
JavaLogger(),
+ stripedExecSvc = new IgniteStripedExecutor(3, "foo name", "pool name",
new JavaLogger(),
new IgniteInClosure<Throwable>() {
@Override public void apply(Throwable throwable) {}
}, null, 2000);
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/thread/pool/ThreadPoolMetricsTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/thread/pool/ThreadPoolMetricsTest.java
index f4f8b2ac33a..de9fbf542e3 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/thread/pool/ThreadPoolMetricsTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/thread/pool/ThreadPoolMetricsTest.java
@@ -38,7 +38,6 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.processors.pool.PoolProcessor;
-import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.lang.RunnableX;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -211,7 +210,7 @@ public class ThreadPoolMetricsTest extends
GridCommonAbstractTest {
ExecutorService execSvc = entry.getValue().apply(poolProc);
MetricRegistry mreg =
ignite.context().metric().registry(metricsName);
HistogramMetric execTimeMetric =
mreg.findMetric(PoolProcessor.TASK_EXEC_TIME);
- boolean stripedExecutor = execSvc instanceof StripedExecutor;
+ boolean stripedExecutor = execSvc instanceof IgniteStripedExecutor;
// Ensure that the execution time histogram can be reset.
execTimeMetric.reset();
diff --git
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
index 922325aff53..322591533d0 100644
---
a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
+++
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
@@ -88,7 +88,7 @@ import
org.apache.ignite.internal.processors.compute.IgniteComputeCustomExecutor
import org.apache.ignite.internal.processors.compute.InterruptComputeJobTest;
import
org.apache.ignite.internal.processors.compute.PublicThreadpoolStarvationTest;
import
org.apache.ignite.internal.processors.compute.TaskOptionsPropagationTest;
-import org.apache.ignite.internal.util.StripedExecutorTest;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutorTest;
import org.apache.ignite.p2p.GridMultinodeRedeployContinuousModeSelfTest;
import org.apache.ignite.p2p.GridMultinodeRedeployIsolatedModeSelfTest;
import org.apache.ignite.p2p.GridMultinodeRedeployPrivateModeSelfTest;
@@ -169,7 +169,7 @@ import org.junit.runners.Suite;
TaskNodeRestartTest.class,
IgniteRoundRobinErrorAfterClientReconnectTest.class,
PublicThreadpoolStarvationTest.class,
- StripedExecutorTest.class,
+ IgniteStripedExecutorTest.class,
GridJobServicesAddNodeTest.class,
GridCollisionManagerLoggingSelfTest.class,
diff --git
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
index 118a67c7720..d0dfb220030 100644
---
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
+++
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
@@ -72,7 +72,7 @@ import
org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabase
import
org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager;
import
org.apache.ignite.internal.processors.metastorage.DistributedMetaStorage;
import org.apache.ignite.internal.processors.service.DummyService;
-import org.apache.ignite.internal.util.StripedExecutor;
+import org.apache.ignite.internal.thread.pool.IgniteStripedExecutor;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -846,7 +846,7 @@ public class SqlViewExporterSpiTest extends
AbstractExporterSpiTest {
* @param view System view name.
* @param poolName Executor name.
*/
- private void checkStripeExecutorView(StripedExecutor execSvc, String view,
String poolName) throws Exception {
+ private void checkStripeExecutorView(IgniteStripedExecutor execSvc, String
view, String poolName) throws Exception {
CountDownLatch latch = new CountDownLatch(1);
execSvc.execute(0, new TestRunnable(latch, 0));