You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2020/11/21 09:20:40 UTC
[shardingsphere] branch master updated: Refactor executor.kernel's
domain (#8266)
This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new dc3af42 Refactor executor.kernel's domain (#8266)
dc3af42 is described below
commit dc3af42b1328348d884e19281e4aae5a8b1cbd42
Author: Liang Zhang <te...@163.com>
AuthorDate: Sat Nov 21 17:20:14 2020 +0800
Refactor executor.kernel's domain (#8266)
* Rename ExecutorServiceManager
* Rename ExecutorThreadFactoryBuilder
* Rename package to kernel.thread
* Add kernel.model package
* Rename ExecutorEngine
---
.../context/metadata/GovernanceMetaDataContexts.java | 20 ++++++++++----------
.../metadata/GovernanceMetaDataContextsTest.java | 4 ++--
.../infra/context/metadata/MetaDataContexts.java | 8 ++++----
.../context/metadata/MetaDataContextsBuilder.java | 8 ++++----
.../metadata/impl/StandardMetaDataContexts.java | 6 +++---
.../metadata/impl/StandardMetaDataContextsTest.java | 8 ++++----
.../{ExecutorKernel.java => ExecutorEngine.java} | 19 +++++++++++--------
.../executor/kernel/{ => model}/ExecutionGroup.java | 2 +-
.../kernel/{ => model}/ExecutorCallback.java | 2 +-
.../executor/kernel/{ => model}/ExecutorDataMap.java | 2 +-
.../ExecutorServiceManager.java} | 14 +++++++-------
.../ExecutorThreadFactoryBuilder.java} | 14 +++++++-------
.../sql/group/AbstractExecutionGroupEngine.java | 2 +-
.../executor/sql/group/ExecutionGroupDecorator.java | 2 +-
.../executor/sql/group/ExecutionGroupEngine.java | 2 +-
.../sql/group/raw/RawExecutionGroupEngine.java | 2 +-
.../ResourceManagedExecutionGroupEngine.java | 2 +-
.../executor/sql/raw/execute/RawJDBCExecutor.java | 8 ++++----
.../raw/execute/callback/RawSQLExecutorCallback.java | 2 +-
.../sql/resourced/jdbc/executor/SQLExecutor.java | 8 ++++----
.../resourced/jdbc/executor/SQLExecutorCallback.java | 2 +-
...ecutorKernelTest.java => ExecutorEngineTest.java} | 15 ++++++++-------
.../kernel/fixture/ExecutorCallbackFixture.java | 2 +-
.../ExecutorThreadFactoryBuilderTest.java} | 8 ++++----
.../PreparedStatementExecutionGroupEngineTest.java | 2 +-
.../jdbc/StatementExecutionGroupEngineTest.java | 2 +-
.../sql/raw/execute/RawJDBCExecutorTest.java | 14 +++++++-------
.../sql/resourced/jdbc/executor/SQLExecutorTest.java | 8 ++++----
.../apache/shardingsphere/dbtest/engine/BaseIT.java | 2 +-
.../env/dataset/DataSetEnvironmentManager.java | 8 ++++----
.../driver/executor/AbstractStatementExecutor.java | 2 +-
.../driver/executor/PreparedStatementExecutor.java | 2 +-
.../driver/executor/StatementExecutor.java | 2 +-
.../batch/BatchPreparedStatementExecutor.java | 2 +-
.../statement/ShardingSpherePreparedStatement.java | 6 +++---
.../jdbc/core/statement/ShardingSphereStatement.java | 6 +++---
.../driver/executor/AbstractBaseExecutorTest.java | 10 +++++-----
.../executor/PreparedStatementExecutorTest.java | 4 ++--
.../driver/executor/StatementExecutorTest.java | 4 ++--
.../batch/BatchPreparedStatementExecutorTest.java | 4 ++--
.../opentracing/hook/OpenTracingRootInvokeHook.java | 2 +-
.../hook/OpenTracingRootInvokeHookTest.java | 2 +-
.../hook/OpenTracingSQLExecutionHookTest.java | 2 +-
.../jdbc/execute/engine/jdbc/JDBCExecuteEngine.java | 6 +++---
.../jdbc/execute/engine/jdbc/RawProxyExecutor.java | 8 ++++----
.../backend/context/BackendExecutorContext.java | 6 +++---
.../jdbc/DatabaseCommunicationEngineFactoryTest.java | 4 ++--
.../jdbc/connection/BackendConnectionTest.java | 4 ++--
.../jdbc/datasource/JDBCBackendDataSourceTest.java | 4 ++--
.../backend/context/BackendExecutorContextTest.java | 2 +-
.../proxy/backend/context/ProxyContextTest.java | 12 ++++++------
.../text/admin/BroadcastBackendHandlerTest.java | 4 ++--
.../backend/text/admin/RDLBackendHandlerTest.java | 4 ++--
.../text/admin/ShowDatabasesBackendHandlerTest.java | 4 ++--
.../text/admin/ShowTablesBackendHandlerTest.java | 4 ++--
.../text/admin/UnicastBackendHandlerTest.java | 4 ++--
.../text/admin/UseDatabaseBackendHandlerTest.java | 4 ++--
.../ShardingCTLExplainBackendHandlerTest.java | 4 ++--
.../sctl/hint/ShardingCTLHintBackendHandlerTest.java | 4 ++--
.../sctl/set/ShardingCTLSetBackendHandlerTest.java | 4 ++--
.../proxy/frontend/ShardingSphereProxy.java | 2 +-
.../proxy/frontend/executor/UserExecutorGroup.java | 8 ++++----
.../frontend/mysql/MySQLFrontendEngineTest.java | 4 ++--
.../mysql/auth/MySQLAuthenticationEngineTest.java | 4 ++--
.../mysql/auth/MySQLAuthenticationHandlerTest.java | 4 ++--
.../command/MySQLCommandExecutorFactoryTest.java | 4 ++--
.../execute/MySQLComStmtExecuteExecutorTest.java | 4 ++--
.../binary/parse/PostgreSQLComParseExecutorTest.java | 4 ++--
.../execute/engine/ShardingScalingExecuteEngine.java | 6 +++---
.../base/seata/at/TransactionalSQLExecutionHook.java | 2 +-
.../at/SeataATShardingTransactionManagerTest.java | 2 +-
.../seata/at/TransactionalSQLExecutionHookTest.java | 2 +-
72 files changed, 189 insertions(+), 185 deletions(-)
diff --git a/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContexts.java b/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContexts.java
index 6a06e69..00f6729 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContexts.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/main/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContexts.java
@@ -41,7 +41,7 @@ import org.apache.shardingsphere.infra.context.metadata.MetaDataContextsBuilder;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
@@ -122,8 +122,8 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
}
@Override
- public ExecutorKernel getExecutorKernel() {
- return metaDataContexts.getExecutorKernel();
+ public ExecutorEngine getExecutorEngine() {
+ return metaDataContexts.getExecutorEngine();
}
@Override
@@ -153,7 +153,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
Map<String, ShardingSphereMetaData> metaDataMap = new HashMap<>(metaDataContexts.getMetaDataMap());
metaDataMap.put(event.getSchemaName(), createAddedMetaData(event));
metaDataContexts = new StandardMetaDataContexts(
- metaDataMap, metaDataContexts.getExecutorKernel(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
+ metaDataMap, metaDataContexts.getExecutorEngine(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
governanceFacade.getConfigCenter().persistSchema(event.getSchemaName(), metaDataContexts.getMetaDataMap().get(event.getSchemaName()).getSchema());
GovernanceEventBus.getInstance().post(
new DataSourceChangeCompletedEvent(event.getSchemaName(), metaDataContexts.getDatabaseType(), metaDataMap.get(event.getSchemaName()).getResource().getDataSources()));
@@ -169,7 +169,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
Map<String, ShardingSphereMetaData> metaDataMap = new HashMap<>(metaDataContexts.getMetaDataMap());
metaDataMap.remove(event.getSchemaName());
metaDataContexts = new StandardMetaDataContexts(
- metaDataMap, metaDataContexts.getExecutorKernel(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
+ metaDataMap, metaDataContexts.getExecutorEngine(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
governanceFacade.getConfigCenter().deleteSchema(event.getSchemaName());
}
@@ -181,7 +181,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
@Subscribe
public synchronized void renew(final PropertiesChangedEvent event) {
ConfigurationProperties props = new ConfigurationProperties(event.getProps());
- metaDataContexts = new StandardMetaDataContexts(getChangedMataDataMap(), metaDataContexts.getExecutorKernel(), metaDataContexts.getAuthentication(), props, metaDataContexts.getDatabaseType());
+ metaDataContexts = new StandardMetaDataContexts(getChangedMataDataMap(), metaDataContexts.getExecutorEngine(), metaDataContexts.getAuthentication(), props, metaDataContexts.getDatabaseType());
}
/**
@@ -192,7 +192,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
@Subscribe
public synchronized void renew(final AuthenticationChangedEvent event) {
metaDataContexts = new StandardMetaDataContexts(
- metaDataContexts.getMetaDataMap(), metaDataContexts.getExecutorKernel(), event.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
+ metaDataContexts.getMetaDataMap(), metaDataContexts.getExecutorEngine(), event.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
}
/**
@@ -210,7 +210,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
newMetaDataMap.put(schemaName, newMetaData);
}
metaDataContexts = new StandardMetaDataContexts(
- newMetaDataMap, metaDataContexts.getExecutorKernel(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
+ newMetaDataMap, metaDataContexts.getExecutorEngine(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
}
/**
@@ -226,7 +226,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
newMetaDataMap.remove(schemaName);
newMetaDataMap.put(schemaName, getChangedMetaData(metaDataContexts.getMetaDataMap().get(schemaName), event.getRuleConfigurations()));
metaDataContexts = new StandardMetaDataContexts(
- newMetaDataMap, metaDataContexts.getExecutorKernel(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
+ newMetaDataMap, metaDataContexts.getExecutorEngine(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
governanceFacade.getConfigCenter().persistSchema(schemaName, newMetaDataMap.get(schemaName).getSchema());
}
@@ -243,7 +243,7 @@ public final class GovernanceMetaDataContexts implements MetaDataContexts {
newMetaDataMap.remove(schemaName);
newMetaDataMap.put(schemaName, getChangedMetaData(metaDataContexts.getMetaDataMap().get(schemaName), event.getDataSourceConfigurations()));
metaDataContexts = new StandardMetaDataContexts(
- newMetaDataMap, metaDataContexts.getExecutorKernel(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
+ newMetaDataMap, metaDataContexts.getExecutorEngine(), metaDataContexts.getAuthentication(), metaDataContexts.getProps(), metaDataContexts.getDatabaseType());
GovernanceEventBus.getInstance().post(
new DataSourceChangeCompletedEvent(event.getSchemaName(), metaDataContexts.getDatabaseType(), newMetaDataMap.get(event.getSchemaName()).getResource().getDataSources()));
}
diff --git a/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContextsTest.java b/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContextsTest.java
index 2f0468f..f62090b 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContextsTest.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/shardingsphere-governance-core-context/src/test/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContextsTest.java
@@ -36,7 +36,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKe
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.metadata.DataSourceMetaData;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
@@ -106,7 +106,7 @@ public final class GovernanceMetaDataContextsTest {
when(governanceFacade.getConfigCenter()).thenReturn(configCenter);
when(registryCenter.loadDisabledDataSources("schema")).thenReturn(Collections.singletonList("schema.ds_1"));
governanceMetaDataContexts = new GovernanceMetaDataContexts(
- new StandardMetaDataContexts(createMetaDataMap(), mock(ExecutorKernel.class), authentication, props, databaseType), governanceFacade);
+ new StandardMetaDataContexts(createMetaDataMap(), mock(ExecutorEngine.class), authentication, props, databaseType), governanceFacade);
}
private Map<String, ShardingSphereMetaData> createMetaDataMap() {
diff --git a/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContexts.java b/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContexts.java
index 0c7f62b..8ab5452 100644
--- a/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContexts.java
+++ b/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContexts.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.infra.context.metadata;
import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import java.io.Closeable;
@@ -53,11 +53,11 @@ public interface MetaDataContexts extends Closeable {
ShardingSphereMetaData getDefaultMetaData();
/**
- * Get executor kernel.
+ * Get executor engine.
*
- * @return executor kernel
+ * @return executor engine
*/
- ExecutorKernel getExecutorKernel();
+ ExecutorEngine getExecutorEngine();
/**
* Get authentication.
diff --git a/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContextsBuilder.java b/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContextsBuilder.java
index 65538b2..1e380ba 100644
--- a/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContextsBuilder.java
+++ b/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/MetaDataContextsBuilder.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData;
import org.apache.shardingsphere.infra.metadata.resource.DataSourcesMetaData;
@@ -64,7 +64,7 @@ public final class MetaDataContextsBuilder {
private final ConfigurationProperties props;
- private final ExecutorKernel executorKernel;
+ private final ExecutorEngine executorEngine;
public MetaDataContextsBuilder(final DatabaseType databaseType, final Map<String, Map<String, DataSource>> dataSources,
final Map<String, Collection<RuleConfiguration>> ruleConfigs, final Properties props) {
@@ -78,7 +78,7 @@ public final class MetaDataContextsBuilder {
this.ruleConfigs = ruleConfigs;
this.authentication = authentication;
this.props = new ConfigurationProperties(null == props ? new Properties() : props);
- executorKernel = new ExecutorKernel(this.props.<Integer>getValue(ConfigurationPropertyKey.EXECUTOR_SIZE));
+ executorEngine = new ExecutorEngine(this.props.<Integer>getValue(ConfigurationPropertyKey.EXECUTOR_SIZE));
}
/**
@@ -92,7 +92,7 @@ public final class MetaDataContextsBuilder {
for (String each : ruleConfigs.keySet()) {
mataDataMap.put(each, buildMetaData(each));
}
- return new StandardMetaDataContexts(mataDataMap, executorKernel, authentication, props, databaseType);
+ return new StandardMetaDataContexts(mataDataMap, executorEngine, authentication, props, databaseType);
}
private ShardingSphereMetaData buildMetaData(final String schemaName) throws SQLException {
diff --git a/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContexts.java b/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContexts.java
index 6597c83..024f2d4 100644
--- a/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContexts.java
+++ b/shardingsphere-infra/shardingsphere-infra-context/src/main/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContexts.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.database.DefaultSchema;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import java.util.HashMap;
@@ -41,7 +41,7 @@ public final class StandardMetaDataContexts implements MetaDataContexts {
private final Map<String, ShardingSphereMetaData> metaDataMap;
- private final ExecutorKernel executorKernel;
+ private final ExecutorEngine executorEngine;
private final Authentication authentication;
@@ -61,6 +61,6 @@ public final class StandardMetaDataContexts implements MetaDataContexts {
@Override
public void close() {
- executorKernel.close();
+ executorEngine.close();
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContextsTest.java b/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContextsTest.java
index 7ee8492..7bedb28 100644
--- a/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContextsTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/metadata/impl/StandardMetaDataContextsTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.infra.context.metadata.impl;
import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.junit.Test;
@@ -44,11 +44,11 @@ public final class StandardMetaDataContextsTest {
@Test
public void assertClose() {
- ExecutorKernel executorKernel = mock(ExecutorKernel.class);
+ ExecutorEngine executorEngine = mock(ExecutorEngine.class);
ShardingSphereMetaData metaData = mock(ShardingSphereMetaData.class);
StandardMetaDataContexts standardMetaDataContexts = new StandardMetaDataContexts(Collections.singletonMap("logic_db", metaData),
- executorKernel, new Authentication(), new ConfigurationProperties(new Properties()), DatabaseTypeRegistry.getTrunkDatabaseType("SQL92"));
+ executorEngine, new Authentication(), new ConfigurationProperties(new Properties()), DatabaseTypeRegistry.getTrunkDatabaseType("SQL92"));
standardMetaDataContexts.close();
- verify(executorKernel).close();
+ verify(executorEngine).close();
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorKernel.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
similarity index 87%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorKernel.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
index 209d398..75c2db5 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorKernel.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
@@ -20,7 +20,10 @@ package org.apache.shardingsphere.infra.executor.kernel;
import com.google.common.util.concurrent.ListenableFuture;
import lombok.Getter;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
-import org.apache.shardingsphere.infra.executor.kernel.impl.ShardingSphereExecutorService;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorCallback;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.thread.ExecutorServiceManager;
import java.sql.SQLException;
import java.util.Collection;
@@ -32,15 +35,15 @@ import java.util.Map;
import java.util.concurrent.ExecutionException;
/**
- * Executor kernel.
+ * Executor engine.
*/
@Getter
-public final class ExecutorKernel implements AutoCloseable {
+public final class ExecutorEngine implements AutoCloseable {
- private final ShardingSphereExecutorService executorService;
+ private final ExecutorServiceManager executorServiceManager;
- public ExecutorKernel(final int executorSize) {
- executorService = new ShardingSphereExecutorService(executorSize);
+ public ExecutorEngine(final int executorSize) {
+ executorServiceManager = new ExecutorServiceManager(executorSize);
}
/**
@@ -106,7 +109,7 @@ public final class ExecutorKernel implements AutoCloseable {
private <I, O> ListenableFuture<Collection<O>> asyncExecute(final ExecutionGroup<I> executionGroup, final ExecutorCallback<I, O> callback) {
Map<String, Object> dataMap = ExecutorDataMap.getValue();
- return executorService.getExecutorService().submit(() -> callback.execute(executionGroup.getInputs(), false, dataMap));
+ return executorServiceManager.getExecutorService().submit(() -> callback.execute(executionGroup.getInputs(), false, dataMap));
}
private <O> List<O> getGroupResults(final Collection<O> firstResults, final Collection<ListenableFuture<Collection<O>>> restFutures) throws SQLException {
@@ -130,6 +133,6 @@ public final class ExecutorKernel implements AutoCloseable {
@Override
public void close() {
- executorService.close();
+ executorServiceManager.close();
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutionGroup.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroup.java
similarity index 94%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutionGroup.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroup.java
index 80c27fb..488a475 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutionGroup.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroup.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel;
+package org.apache.shardingsphere.infra.executor.kernel.model;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorCallback.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
similarity index 95%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorCallback.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
index ce0e632..548157d 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorCallback.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel;
+package org.apache.shardingsphere.infra.executor.kernel.model;
import java.sql.SQLException;
import java.util.Collection;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorDataMap.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorDataMap.java
similarity index 95%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorDataMap.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorDataMap.java
index cea6985..590ec85 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorDataMap.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorDataMap.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel;
+package org.apache.shardingsphere.infra.executor.kernel.model;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereExecutorService.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorServiceManager.java
similarity index 82%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereExecutorService.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorServiceManager.java
index c076e6b..230a5e4 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereExecutorService.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorServiceManager.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel.impl;
+package org.apache.shardingsphere.infra.executor.kernel.thread;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
@@ -27,28 +27,28 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
/**
- * ShardingSphere executor service.
+ * Executor service manager.
*/
@Getter
-public final class ShardingSphereExecutorService {
+public final class ExecutorServiceManager {
private static final String DEFAULT_NAME_FORMAT = "%d";
- private static final ExecutorService SHUTDOWN_EXECUTOR = Executors.newSingleThreadExecutor(ShardingSphereThreadFactoryBuilder.build("Executor-Engine-Closer"));
+ private static final ExecutorService SHUTDOWN_EXECUTOR = Executors.newSingleThreadExecutor(ExecutorThreadFactoryBuilder.build("Executor-Engine-Closer"));
private final ListeningExecutorService executorService;
- public ShardingSphereExecutorService(final int executorSize) {
+ public ExecutorServiceManager(final int executorSize) {
this(executorSize, DEFAULT_NAME_FORMAT);
}
- public ShardingSphereExecutorService(final int executorSize, final String nameFormat) {
+ public ExecutorServiceManager(final int executorSize, final String nameFormat) {
executorService = MoreExecutors.listeningDecorator(getExecutorService(executorSize, nameFormat));
MoreExecutors.addDelayedShutdownHook(executorService, 60, TimeUnit.SECONDS);
}
private ExecutorService getExecutorService(final int executorSize, final String nameFormat) {
- ThreadFactory threadFactory = ShardingSphereThreadFactoryBuilder.build(nameFormat);
+ ThreadFactory threadFactory = ExecutorThreadFactoryBuilder.build(nameFormat);
return 0 == executorSize ? Executors.newCachedThreadPool(threadFactory) : Executors.newFixedThreadPool(executorSize, threadFactory);
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereThreadFactoryBuilder.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorThreadFactoryBuilder.java
similarity index 82%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereThreadFactoryBuilder.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorThreadFactoryBuilder.java
index dcaa63e..5b06e30 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereThreadFactoryBuilder.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorThreadFactoryBuilder.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel.impl;
+package org.apache.shardingsphere.infra.executor.kernel.thread;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import lombok.AccessLevel;
@@ -24,29 +24,29 @@ import lombok.NoArgsConstructor;
import java.util.concurrent.ThreadFactory;
/**
- * ShardingSphere thread factory builder.
+ * Executor thread factory builder.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ShardingSphereThreadFactoryBuilder {
+public final class ExecutorThreadFactoryBuilder {
private static final String NAME_FORMAT_PREFIX = "ShardingSphere-";
private static final String DEFAULT_EXECUTOR_NAME_FORMAT = NAME_FORMAT_PREFIX + "%d";
/**
- * Build default ShardingSphere thread factory.
+ * Build default thread factory.
*
- * @return default ShardingSphere thread factory
+ * @return default thread factory
*/
public static ThreadFactory build() {
return new ThreadFactoryBuilder().setDaemon(true).setNameFormat(DEFAULT_EXECUTOR_NAME_FORMAT).build();
}
/**
- * Build ShardingSphere thread factory.
+ * Build thread factory with thread name format.
*
* @param nameFormat thread name format
- * @return ShardingSphere thread factory
+ * @return thread factory
*/
public static ThreadFactory build(final String nameFormat) {
return new ThreadFactoryBuilder().setDaemon(true).setNameFormat(NAME_FORMAT_PREFIX + nameFormat).build();
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecutionGroupEngine.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecutionGroupEngine.java
index 55c3117..7abe193 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecutionGroupEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecutionGroupEngine.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.group;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.context.SQLUnit;
import org.apache.shardingsphere.infra.route.context.RouteContext;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupDecorator.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupDecorator.java
index 6dbc7c6..3d37313 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupDecorator.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupDecorator.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.infra.executor.sql.group;
import org.apache.shardingsphere.infra.route.context.RouteContext;
import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
import org.apache.shardingsphere.infra.spi.ordered.OrderedSPI;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import java.util.Collection;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupEngine.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupEngine.java
index 192e9ef..90562b8 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/ExecutionGroupEngine.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.group;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.route.context.RouteContext;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/raw/RawExecutionGroupEngine.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/raw/RawExecutionGroupEngine.java
index 4c5ebd9..7d97204 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/raw/RawExecutionGroupEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/raw/RawExecutionGroupEngine.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.infra.executor.sql.group.raw;
import com.google.common.collect.Lists;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.group.AbstractExecutionGroupEngine;
import org.apache.shardingsphere.infra.executor.sql.raw.RawSQLExecuteUnit;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/ResourceManagedExecutionGroupEngine.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/ResourceManagedExecutionGroupEngine.java
index dca6244..fdb6f4f 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/ResourceManagedExecutionGroupEngine.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/ResourceManagedExecutionGroupEngine.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.infra.executor.sql.group.resourced;
import com.google.common.collect.Lists;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.group.AbstractExecutionGroupEngine;
import org.apache.shardingsphere.infra.executor.sql.resourced.ExecutionConnection;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutor.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutor.java
index 52581d6..d9d7b9e 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutor.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutor.java
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.infra.executor.sql.raw.execute;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.raw.RawSQLExecuteUnit;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.callback.RawSQLExecutorCallback;
@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public final class RawJDBCExecutor {
- private final ExecutorKernel executorKernel;
+ private final ExecutorEngine executorEngine;
private final boolean serial;
@@ -99,7 +99,7 @@ public final class RawJDBCExecutor {
@SuppressWarnings("unchecked")
private <T> List<T> doExecute(final Collection<ExecutionGroup<RawSQLExecuteUnit>> executionGroups, final RawSQLExecutorCallback callback) throws SQLException {
try {
- return executorKernel.execute((Collection) executionGroups, null, callback, serial);
+ return executorEngine.execute((Collection) executionGroups, null, callback, serial);
} catch (final SQLException ex) {
ExecutorExceptionHandler.handleException(ex);
return Collections.emptyList();
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/callback/RawSQLExecutorCallback.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/callback/RawSQLExecutorCallback.java
index d40d95e..950558f 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/callback/RawSQLExecutorCallback.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/callback/RawSQLExecutorCallback.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.infra.executor.sql.raw.execute.callback;
import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorCallback;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorCallback;
import org.apache.shardingsphere.infra.executor.sql.raw.RawSQLExecuteUnit;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.result.ExecuteResult;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutor.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutor.java
index f57cef0..b1e7f47 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutor.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutor.java
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
import java.sql.SQLException;
@@ -33,7 +33,7 @@ import java.util.List;
@RequiredArgsConstructor
public final class SQLExecutor {
- private final ExecutorKernel executorKernel;
+ private final ExecutorEngine executorEngine;
private final boolean serial;
@@ -63,7 +63,7 @@ public final class SQLExecutor {
public <T> List<T> execute(final Collection<ExecutionGroup<StatementExecuteUnit>> executionGroups,
final SQLExecutorCallback<T> firstCallback, final SQLExecutorCallback<T> callback) throws SQLException {
try {
- return executorKernel.execute(executionGroups, firstCallback, callback, serial);
+ return executorEngine.execute(executionGroups, firstCallback, callback, serial);
} catch (final SQLException ex) {
ExecutorExceptionHandler.handleException(ex);
return Collections.emptyList();
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorCallback.java b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorCallback.java
index cb9a6c9..330e2c2 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorCallback.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorCallback.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorCallback;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorCallback;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
/**
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorKernelTest.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngineTest.java
similarity index 87%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorKernelTest.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngineTest.java
index 09fff2d..53c9dba 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorKernelTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngineTest.java
@@ -18,6 +18,7 @@
package org.apache.shardingsphere.infra.executor.kernel;
import org.apache.shardingsphere.infra.executor.kernel.fixture.ExecutorCallbackFixture;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -32,9 +33,9 @@ import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
-public final class ExecutorKernelTest {
+public final class ExecutorEngineTest {
- private final ExecutorKernel executorKernel = new ExecutorKernel(10);
+ private final ExecutorEngine executorEngine = new ExecutorEngine(10);
private final CountDownLatch latch = new CountDownLatch(4);
@@ -53,7 +54,7 @@ public final class ExecutorKernelTest {
@After
public void tearDown() {
- executorKernel.close();
+ executorEngine.close();
}
private Collection<ExecutionGroup<Object>> createMockedExecutionGroups(final int groupSize, final int unitSize) {
@@ -74,21 +75,21 @@ public final class ExecutorKernelTest {
@Test
public void assertParallelExecuteWithoutFirstCallback() throws SQLException, InterruptedException {
- List<String> actual = executorKernel.execute(executionGroups, callback);
+ List<String> actual = executorEngine.execute(executionGroups, callback);
latch.await();
assertThat(actual.size(), is(4));
}
@Test
public void assertParallelExecuteWithFirstCallback() throws SQLException, InterruptedException {
- List<String> actual = executorKernel.execute(executionGroups, firstCallback, callback, false);
+ List<String> actual = executorEngine.execute(executionGroups, firstCallback, callback, false);
latch.await();
assertThat(actual.size(), is(4));
}
@Test
public void assertSerialExecute() throws SQLException, InterruptedException {
- List<String> actual = executorKernel.execute(executionGroups, firstCallback, callback, true);
+ List<String> actual = executorEngine.execute(executionGroups, firstCallback, callback, true);
latch.await();
assertThat(actual.size(), is(4));
}
@@ -96,7 +97,7 @@ public final class ExecutorKernelTest {
@Test
public void assertExecutionGroupIsEmpty() throws SQLException {
CountDownLatch latch = new CountDownLatch(1);
- List<String> actual = executorKernel.execute(new LinkedList<>(), new ExecutorCallbackFixture(latch));
+ List<String> actual = executorEngine.execute(new LinkedList<>(), new ExecutorCallbackFixture(latch));
latch.countDown();
assertThat(actual.size(), is(0));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
index 629534c..b01f8f4 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.infra.executor.kernel.fixture;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorCallback;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorCallback;
import java.util.Collection;
import java.util.LinkedList;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereThreadFactoryBuilderTest.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorThreadFactoryBuilderTest.java
similarity index 83%
rename from shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereThreadFactoryBuilderTest.java
rename to shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorThreadFactoryBuilderTest.java
index 75a84a5..8c0a55f 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/impl/ShardingSphereThreadFactoryBuilderTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/thread/ExecutorThreadFactoryBuilderTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel.impl;
+package org.apache.shardingsphere.infra.executor.kernel.thread;
import org.junit.Test;
@@ -24,11 +24,11 @@ import java.util.concurrent.ThreadFactory;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-public final class ShardingSphereThreadFactoryBuilderTest {
+public final class ExecutorThreadFactoryBuilderTest {
@Test
public void assertBuild() {
- ThreadFactory threadFactory = ShardingSphereThreadFactoryBuilder.build();
+ ThreadFactory threadFactory = ExecutorThreadFactoryBuilder.build();
Thread thread0 = threadFactory.newThread(() -> { });
assertThat(thread0.getName(), is("ShardingSphere-0"));
Thread thread1 = threadFactory.newThread(() -> { });
@@ -37,7 +37,7 @@ public final class ShardingSphereThreadFactoryBuilderTest {
@Test
public void assertBuildWithNameFormat() {
- ThreadFactory threadFactory = ShardingSphereThreadFactoryBuilder.build("test");
+ ThreadFactory threadFactory = ExecutorThreadFactoryBuilder.build("test");
Thread thread = threadFactory.newThread(() -> { });
assertThat(thread.getName(), is("ShardingSphere-test"));
}
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/PreparedStatementExecutionGroupEngineTest.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/PreparedStatementExecutionGroupEngineTest.java
index 38ef0ec..bf05d79 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/PreparedStatementExecutionGroupEngineTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/PreparedStatementExecutionGroupEngineTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.group.resourced.jdbc;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.context.SQLUnit;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/StatementExecutionGroupEngineTest.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/StatementExecutionGroupEngineTest.java
index 2112e57..195e4d9 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/StatementExecutionGroupEngineTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/group/resourced/jdbc/StatementExecutionGroupEngineTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.group.resourced.jdbc;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.context.SQLUnit;
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutorTest.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutorTest.java
index e588266..069c366 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutorTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/raw/execute/RawJDBCExecutorTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.raw.execute;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.result.query.ExecuteQueryResult;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.result.update.ExecuteUpdateResult;
@@ -42,14 +42,14 @@ public final class RawJDBCExecutorTest {
@Test
public void assertExecuteForResultEmpty() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
RawJDBCExecutor executor = new RawJDBCExecutor(kernel, true);
assertFalse(executor.execute(null, null));
}
@Test
public void assertExecuteForExecuteQueryResult() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
when(kernel.execute(any(), any(), any(), anyBoolean())).thenReturn(Collections.singletonList(new ExecuteQueryResult(null, null)));
RawJDBCExecutor executor = new RawJDBCExecutor(kernel, true);
assertTrue(executor.execute(null, null));
@@ -57,7 +57,7 @@ public final class RawJDBCExecutorTest {
@Test
public void assertExecuteQueryForExecuteQueryResult() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
ExecuteQueryResult executeQueryResult = mock(ExecuteQueryResult.class);
QueryResult queryResult = mock(QueryResult.class);
when(executeQueryResult.getQueryResult()).thenReturn(queryResult);
@@ -69,7 +69,7 @@ public final class RawJDBCExecutorTest {
@Test
public void assertExecuteUpdate() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
ExecuteUpdateResult executeUpdateResult1 = new ExecuteUpdateResult(1, 2);
ExecuteUpdateResult executeUpdateResult2 = new ExecuteUpdateResult(3, 4);
when(kernel.execute(any(), any(), any(), anyBoolean())).thenReturn(Arrays.asList(executeUpdateResult1, executeUpdateResult2));
@@ -79,7 +79,7 @@ public final class RawJDBCExecutorTest {
@Test
public void assertExecuteNotThrownSQLException() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
when(kernel.execute(any(), any(), any(), anyBoolean())).thenThrow(new SQLException("TestSQLException"));
RawJDBCExecutor rawJDBCExecutor = new RawJDBCExecutor(kernel, false);
ExecutorExceptionHandler.setExceptionThrown(false);
@@ -89,7 +89,7 @@ public final class RawJDBCExecutorTest {
@Test
public void assertExecuteSQLException() {
try {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
when(kernel.execute(any(), any(), any(), anyBoolean())).thenThrow(new SQLException("TestSQLException"));
RawJDBCExecutor rawJDBCExecutor = new RawJDBCExecutor(kernel, false);
rawJDBCExecutor.execute(Collections.emptyList(), null);
diff --git a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorTest.java b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorTest.java
index ddc2448..4b030d3 100644
--- a/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/resourced/jdbc/executor/SQLExecutorTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.junit.Test;
import java.sql.SQLException;
@@ -36,7 +36,7 @@ public final class SQLExecutorTest {
@Test
public void assertExecute() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
when(kernel.execute(anyCollection(), any(), any(), anyBoolean())).thenReturn(Collections.singletonList("test"));
SQLExecutor sqlExecutor = new SQLExecutor(kernel, false);
List<?> actual1 = sqlExecutor.execute(Collections.emptyList(), null);
@@ -48,7 +48,7 @@ public final class SQLExecutorTest {
@Test
public void assertExecuteSQLException() {
try {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
when(kernel.execute(anyCollection(), any(), any(), anyBoolean())).thenThrow(new SQLException("TestSQLException"));
SQLExecutor sqlExecutor = new SQLExecutor(kernel, false);
sqlExecutor.execute(Collections.emptyList(), null);
@@ -59,7 +59,7 @@ public final class SQLExecutorTest {
@Test
public void assertExecuteNotThrownSQLException() throws SQLException {
- ExecutorKernel kernel = mock(ExecutorKernel.class);
+ ExecutorEngine kernel = mock(ExecutorEngine.class);
when(kernel.execute(anyCollection(), any(), any(), anyBoolean())).thenThrow(new SQLException("TestSQLException"));
SQLExecutor sqlExecutor = new SQLExecutor(kernel, false);
ExecutorExceptionHandler.setExceptionThrown(false);
diff --git a/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/engine/BaseIT.java b/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/engine/BaseIT.java
index dd7adab..141e2e5 100644
--- a/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/engine/BaseIT.java
+++ b/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/engine/BaseIT.java
@@ -159,7 +159,7 @@ public abstract class BaseIT {
@After
public void tearDown() {
if (dataSource instanceof ShardingSphereDataSource) {
- ((ShardingSphereDataSource) dataSource).getMetaDataContexts().getExecutorKernel().close();
+ ((ShardingSphereDataSource) dataSource).getMetaDataContexts().getExecutorEngine().close();
}
}
diff --git a/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java b/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java
index 434126e..eb58705 100644
--- a/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java
+++ b/shardingsphere-integration-test/shardingsphere-test-suite/src/test/java/org/apache/shardingsphere/dbtest/env/dataset/DataSetEnvironmentManager.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.dbtest.cases.dataset.row.DataSetRow;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
import org.apache.shardingsphere.infra.datanode.DataNode;
-import org.apache.shardingsphere.infra.executor.kernel.impl.ShardingSphereExecutorService;
+import org.apache.shardingsphere.infra.executor.kernel.thread.ExecutorServiceManager;
import org.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineExpressionParser;
import javax.sql.DataSource;
@@ -53,7 +53,7 @@ import java.util.concurrent.Callable;
*/
public final class DataSetEnvironmentManager {
- private static final ShardingSphereExecutorService SHARDING_SPHERE_EXECUTOR_SERVICE = new ShardingSphereExecutorService(20);
+ private static final ExecutorServiceManager EXECUTOR_SERVICE_MANAGER = new ExecutorServiceManager(20);
private final DataSet dataSet;
@@ -105,7 +105,7 @@ public final class DataSetEnvironmentManager {
insertTasks.add(new InsertTask(dataSourceMap.get(dataNode.getDataSourceName()), insertSQL, sqlValueGroups));
}
try {
- SHARDING_SPHERE_EXECUTOR_SERVICE.getExecutorService().invokeAll(insertTasks);
+ EXECUTOR_SERVICE_MANAGER.getExecutorService().invokeAll(insertTasks);
// CHECKSTYLE:OFF
} catch (final Exception ex) {
// CHECKSTYLE:ON
@@ -144,7 +144,7 @@ public final class DataSetEnvironmentManager {
deleteTasks.add(new DeleteTask(dataSourceMap.get(entry.getKey()), entry.getValue()));
}
try {
- SHARDING_SPHERE_EXECUTOR_SERVICE.getExecutorService().invokeAll(deleteTasks);
+ EXECUTOR_SERVICE_MANAGER.getExecutorService().invokeAll(deleteTasks);
// CHECKSTYLE:OFF
} catch (final Exception ex) {
// CHECKSTYLE:ON
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/AbstractStatementExecutor.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/AbstractStatementExecutor.java
index 037ed38..502ca43 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/AbstractStatementExecutor.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/AbstractStatementExecutor.java
@@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.database.DefaultSchema;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.SQLExecutor;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutor.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutor.java
index b0aa6e1..39b8f89 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutor.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutor.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.driver.executor;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/StatementExecutor.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/StatementExecutor.java
index 48a3614..ab0a01be 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/StatementExecutor.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/StatementExecutor.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.driver.executor;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutor.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutor.java
index bbf1eec..9c6043e 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutor.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutor.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.executor.batch;
import com.google.common.base.Preconditions;
import lombok.Getter;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExecuteUnit;
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java
index 492589f..1a237ac 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSpherePreparedStatement.java
@@ -39,7 +39,7 @@ import org.apache.shardingsphere.infra.context.kernel.KernelProcessor;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ExecutorConstant;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
@@ -142,9 +142,9 @@ public final class ShardingSpherePreparedStatement extends AbstractPreparedState
sqlStatement = sqlStatementParserEngine.parse(sql, true);
parameterMetaData = new ShardingSphereParameterMetaData(sqlStatement);
statementOption = returnGeneratedKeys ? new StatementOption(true) : new StatementOption(resultSetType, resultSetConcurrency, resultSetHoldability);
- SQLExecutor sqlExecutor = new SQLExecutor(metaDataContexts.getExecutorKernel(), connection.isHoldTransaction());
+ SQLExecutor sqlExecutor = new SQLExecutor(metaDataContexts.getExecutorEngine(), connection.isHoldTransaction());
preparedStatementExecutor = new PreparedStatementExecutor(connection.getDataSourceMap(), metaDataContexts, sqlExecutor);
- rawExecutor = new RawJDBCExecutor(metaDataContexts.getExecutorKernel(), connection.isHoldTransaction());
+ rawExecutor = new RawJDBCExecutor(metaDataContexts.getExecutorEngine(), connection.isHoldTransaction());
batchPreparedStatementExecutor = new BatchPreparedStatementExecutor(metaDataContexts, sqlExecutor);
kernelProcessor = new KernelProcessor();
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
index f8d457e..1bc66a8 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/statement/ShardingSphereStatement.java
@@ -37,7 +37,7 @@ import org.apache.shardingsphere.infra.context.kernel.KernelProcessor;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ExecutorConstant;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
@@ -111,8 +111,8 @@ public final class ShardingSphereStatement extends AbstractStatementAdapter {
metaDataContexts = connection.getMetaDataContexts();
statements = new LinkedList<>();
statementOption = new StatementOption(resultSetType, resultSetConcurrency, resultSetHoldability);
- statementExecutor = new StatementExecutor(connection.getDataSourceMap(), metaDataContexts, new SQLExecutor(metaDataContexts.getExecutorKernel(), connection.isHoldTransaction()));
- rawExecutor = new RawJDBCExecutor(metaDataContexts.getExecutorKernel(), connection.isHoldTransaction());
+ statementExecutor = new StatementExecutor(connection.getDataSourceMap(), metaDataContexts, new SQLExecutor(metaDataContexts.getExecutorEngine(), connection.isHoldTransaction()));
+ rawExecutor = new RawJDBCExecutor(metaDataContexts.getExecutorEngine(), connection.isHoldTransaction());
kernelProcessor = new KernelProcessor();
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/AbstractBaseExecutorTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/AbstractBaseExecutorTest.java
index 01c184e..f151ae4 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/AbstractBaseExecutorTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/AbstractBaseExecutorTest.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKe
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.executor.ExecutorExceptionHandler;
import org.apache.shardingsphere.sharding.rule.ShardingRule;
import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
@@ -52,7 +52,7 @@ import static org.mockito.Mockito.when;
@Getter(AccessLevel.PROTECTED)
public abstract class AbstractBaseExecutorTest {
- private ExecutorKernel executorKernel;
+ private ExecutorEngine executorEngine;
private ShardingSphereConnection connection;
@@ -60,13 +60,13 @@ public abstract class AbstractBaseExecutorTest {
public void setUp() throws SQLException {
MockitoAnnotations.initMocks(this);
ExecutorExceptionHandler.setExceptionThrown(false);
- executorKernel = new ExecutorKernel(Runtime.getRuntime().availableProcessors());
+ executorEngine = new ExecutorEngine(Runtime.getRuntime().availableProcessors());
setConnection();
}
private void setConnection() {
MetaDataContexts metaDataContexts = mock(StandardMetaDataContexts.class, RETURNS_DEEP_STUBS);
- when(metaDataContexts.getExecutorKernel()).thenReturn(executorKernel);
+ when(metaDataContexts.getExecutorEngine()).thenReturn(executorEngine);
when(metaDataContexts.getProps()).thenReturn(createConfigurationProperties());
when(metaDataContexts.getDatabaseType()).thenReturn(DatabaseTypeRegistry.getActualDatabaseType("H2"));
ShardingRule shardingRule = mockShardingRule();
@@ -101,6 +101,6 @@ public abstract class AbstractBaseExecutorTest {
@After
public void tearDown() {
- executorKernel.close();
+ executorEngine.close();
}
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutorTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutorTest.java
index 1074586..e261791 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutorTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/PreparedStatementExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.driver.executor;
import org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
@@ -61,7 +61,7 @@ public final class PreparedStatementExecutorTest extends AbstractBaseExecutorTes
public void setUp() throws SQLException {
super.setUp();
ShardingSphereConnection connection = getConnection();
- actual = spy(new PreparedStatementExecutor(connection.getDataSourceMap(), connection.getMetaDataContexts(), new SQLExecutor(getExecutorKernel(), false)));
+ actual = spy(new PreparedStatementExecutor(connection.getDataSourceMap(), connection.getMetaDataContexts(), new SQLExecutor(getExecutorEngine(), false)));
}
@Test
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/StatementExecutorTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/StatementExecutorTest.java
index aa3c6e5..c6567d0 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/StatementExecutorTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/StatementExecutorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.driver.executor;
import org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.query.QueryResult;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
@@ -63,7 +63,7 @@ public final class StatementExecutorTest extends AbstractBaseExecutorTest {
public void setUp() throws SQLException {
super.setUp();
ShardingSphereConnection connection = getConnection();
- actual = spy(new StatementExecutor(connection.getDataSourceMap(), connection.getMetaDataContexts(), new SQLExecutor(getExecutorKernel(), false)));
+ actual = spy(new StatementExecutor(connection.getDataSourceMap(), connection.getMetaDataContexts(), new SQLExecutor(getExecutorEngine(), false)));
}
@Test
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java
index a159388..530ba0e 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/executor/batch/BatchPreparedStatementExecutorTest.java
@@ -26,7 +26,7 @@ import org.apache.shardingsphere.infra.executor.sql.resourced.jdbc.StatementExec
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import org.apache.shardingsphere.infra.executor.sql.context.SQLUnit;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.junit.Test;
import org.mockito.Mock;
@@ -60,7 +60,7 @@ public final class BatchPreparedStatementExecutorTest extends AbstractBaseExecut
@Override
public void setUp() throws SQLException {
super.setUp();
- actual = spy(new BatchPreparedStatementExecutor(getConnection().getMetaDataContexts(), new SQLExecutor(getExecutorKernel(), false)));
+ actual = spy(new BatchPreparedStatementExecutor(getConnection().getMetaDataContexts(), new SQLExecutor(getExecutorEngine(), false)));
when(sqlStatementContext.getTablesContext()).thenReturn(mock(TablesContext.class));
}
diff --git a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHook.java b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHook.java
index 5524446..a71c102 100644
--- a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHook.java
+++ b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/main/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHook.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.tracing.opentracing.hook;
import io.opentracing.ActiveSpan;
import io.opentracing.tag.Tags;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import org.apache.shardingsphere.infra.hook.RootInvokeHook;
import org.apache.shardingsphere.tracing.opentracing.OpenTracingTracer;
import org.apache.shardingsphere.tracing.opentracing.constant.ShardingTags;
diff --git a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHookTest.java b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHookTest.java
index 9ccc258..0f8e2c6 100644
--- a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHookTest.java
+++ b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingRootInvokeHookTest.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.tracing.opentracing.hook;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import org.apache.shardingsphere.infra.hook.RootInvokeHook;
import org.apache.shardingsphere.infra.hook.SPIRootInvokeHook;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
diff --git a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingSQLExecutionHookTest.java b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingSQLExecutionHookTest.java
index e66ea59..c1ada67 100644
--- a/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingSQLExecutionHookTest.java
+++ b/shardingsphere-observability/shardingsphere-tracing/shardingsphere-tracing-opentracing/src/test/java/org/apache/shardingsphere/tracing/opentracing/hook/OpenTracingSQLExecutionHookTest.java
@@ -26,7 +26,7 @@ import org.apache.shardingsphere.infra.executor.sql.hook.SPISQLExecutionHook;
import org.apache.shardingsphere.infra.executor.sql.hook.SQLExecutionHook;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.database.metadata.DataSourceMetaData;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/JDBCExecuteEngine.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/JDBCExecuteEngine.java
index 41400f3..50744b3 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/JDBCExecuteEngine.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/JDBCExecuteEngine.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engin
import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.ExecutorConstant;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
@@ -75,8 +75,8 @@ public final class JDBCExecuteEngine implements SQLExecuteEngine {
public JDBCExecuteEngine(final BackendConnection backendConnection, final JDBCAccessor accessor) {
this.backendConnection = backendConnection;
this.accessor = accessor;
- sqlExecutor = new SQLExecutor(BackendExecutorContext.getInstance().getExecutorKernel(), backendConnection.isSerialExecute());
- rawExecutor = new RawProxyExecutor(BackendExecutorContext.getInstance().getExecutorKernel(), backendConnection.isSerialExecute());
+ sqlExecutor = new SQLExecutor(BackendExecutorContext.getInstance().getExecutorEngine(), backendConnection.isSerialExecute());
+ rawExecutor = new RawProxyExecutor(BackendExecutorContext.getInstance().getExecutorEngine(), backendConnection.isSerialExecute());
}
@Override
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/RawProxyExecutor.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/RawProxyExecutor.java
index 38be436..850aee5 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/RawProxyExecutor.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/execute/engine/jdbc/RawProxyExecutor.java
@@ -18,8 +18,8 @@
package org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutionGroup;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import org.apache.shardingsphere.infra.executor.sql.raw.RawSQLExecuteUnit;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.callback.RawSQLExecutorCallback;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.result.ExecuteResult;
@@ -37,7 +37,7 @@ import java.util.List;
@RequiredArgsConstructor
public final class RawProxyExecutor {
- private final ExecutorKernel executorKernel;
+ private final ExecutorEngine executorEngine;
private final boolean serial;
@@ -68,7 +68,7 @@ public final class RawProxyExecutor {
private <T> List<T> doExecute(final Collection<ExecutionGroup<RawSQLExecuteUnit>> executionGroups,
final RawSQLExecutorCallback firstCallback, final RawSQLExecutorCallback callback) throws SQLException {
try {
- return executorKernel.execute((Collection) executionGroups, firstCallback, callback, serial);
+ return executorEngine.execute((Collection) executionGroups, firstCallback, callback, serial);
} catch (final SQLException ex) {
ExecutorExceptionHandler.handleException(ex);
return Collections.emptyList();
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContext.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContext.java
index 881e14b..0edeb06 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContext.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContext.java
@@ -21,7 +21,7 @@ import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
/**
* Backend executor context.
@@ -32,8 +32,8 @@ public final class BackendExecutorContext {
private static final BackendExecutorContext INSTANCE = new BackendExecutorContext();
- private final ExecutorKernel executorKernel =
- new ExecutorKernel(ProxyContext.getInstance().getMetaDataContexts().getProps().<Integer>getValue(ConfigurationPropertyKey.EXECUTOR_SIZE));
+ private final ExecutorEngine executorEngine =
+ new ExecutorEngine(ProxyContext.getInstance().getMetaDataContexts().getProps().<Integer>getValue(ConfigurationPropertyKey.EXECUTOR_SIZE));
/**
* Get executor context instance.
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/DatabaseCommunicationEngineFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/DatabaseCommunicationEngineFactoryTest.java
index 937fbd7..35a858e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/DatabaseCommunicationEngineFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/DatabaseCommunicationEngineFactoryTest.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngineFactory;
@@ -50,7 +50,7 @@ public final class DatabaseCommunicationEngineFactoryTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
BackendConnection backendConnection = mock(BackendConnection.class, RETURNS_DEEP_STUBS);
when(backendConnection.getSchemaName()).thenReturn("schema");
when(backendConnection.isSerialExecute()).thenReturn(true);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/BackendConnectionTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/BackendConnectionTest.java
index 413625e..31a104e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/BackendConnectionTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/connection/BackendConnectionTest.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
import org.apache.shardingsphere.infra.exception.ShardingSphereException;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.datasource.JDBCBackendDataSource;
@@ -101,7 +101,7 @@ public final class BackendConnectionTest {
Field field = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
field.setAccessible(true);
field.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(createMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(createMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> createMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java
index 7740902..a400772 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/communication/jdbc/datasource/JDBCBackendDataSourceTest.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.datasource.fixture.CallTimeRecordDataSource;
@@ -74,7 +74,7 @@ public final class JDBCBackendDataSourceTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(createMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(createMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> createMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java
index 43ccfcd..1091655 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/BackendExecutorContextTest.java
@@ -26,6 +26,6 @@ public final class BackendExecutorContextTest {
@Test
public void assertGetInstance() {
- assertThat(BackendExecutorContext.getInstance().getExecutorKernel(), is(BackendExecutorContext.getInstance().getExecutorKernel()));
+ assertThat(BackendExecutorContext.getInstance().getExecutorEngine(), is(BackendExecutorContext.getInstance().getExecutorEngine()));
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java
index 2feeed1..8e27737 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/context/ProxyContextTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.jdbc.test.MockedDataSource;
import org.apache.shardingsphere.proxy.backend.exception.NoDatabaseSelectedException;
@@ -61,7 +61,7 @@ public final class ProxyContextTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(), new StandardMetaDataContexts(mockMetaDataMap(mockDataSourceMap),
- mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
Optional<DataSource> actual = ProxyContext.getInstance().getDataSourceSample();
assertThat(actual, is(Optional.of(mockDataSourceMap.get("ds_1"))));
}
@@ -82,7 +82,7 @@ public final class ProxyContextTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
assertTrue(ProxyContext.getInstance().schemaExists("schema"));
assertFalse(ProxyContext.getInstance().schemaExists("schema_2"));
}
@@ -103,7 +103,7 @@ public final class ProxyContextTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
ProxyContext.getInstance().getMetaData("schema1");
}
@@ -113,7 +113,7 @@ public final class ProxyContextTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
assertThat(metaDataMap.get("schema"), is(ProxyContext.getInstance().getMetaData("schema")));
}
@@ -123,7 +123,7 @@ public final class ProxyContextTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
assertThat(new LinkedHashSet<>(ProxyContext.getInstance().getAllSchemaNames()), is(metaDataMap.keySet()));
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandlerTest.java
index b26003b..23fe3c4 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandlerTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngineFactory;
@@ -73,7 +73,7 @@ public final class BroadcastBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
when(backendConnection.getSchemaName()).thenReturn(String.format(SCHEMA_PATTERN, 0));
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/RDLBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/RDLBackendHandlerTest.java
index 8cff0e9..95dcbd9 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/RDLBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/RDLBackendHandlerTest.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -62,7 +62,7 @@ public final class RDLBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
@Test
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowDatabasesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowDatabasesBackendHandlerTest.java
index 4f44ca0..e3de1ef 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowDatabasesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowDatabasesBackendHandlerTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.auth.ProxyUser;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -60,7 +60,7 @@ public final class ShowDatabasesBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(), new StandardMetaDataContexts(
- getMetaDataMap(), mock(ExecutorKernel.class), getAuthentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ getMetaDataMap(), mock(ExecutorEngine.class), getAuthentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowTablesBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowTablesBackendHandlerTest.java
index 7e3506c..05e76e1 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowTablesBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/ShowTablesBackendHandlerTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.auth.ProxyUser;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -60,7 +60,7 @@ public final class ShowTablesBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), getAuthentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), getAuthentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UnicastBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UnicastBackendHandlerTest.java
index eb2efb0..1cddc73 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UnicastBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UnicastBackendHandlerTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngineFactory;
@@ -68,7 +68,7 @@ public final class UnicastBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
setUnderlyingHandler(new UpdateResponse());
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandlerTest.java
index 2be5527..d1ddbd0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandlerTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.auth.ProxyUser;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -62,7 +62,7 @@ public final class UseDatabaseBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), getAuthentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), getAuthentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandlerTest.java
index 5458b4a..e05dbe1 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandlerTest.java
@@ -4,7 +4,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData;
import org.apache.shardingsphere.infra.metadata.resource.DataSourcesMetaData;
@@ -59,7 +59,7 @@ public final class ShardingCTLExplainBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/hint/ShardingCTLHintBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/hint/ShardingCTLHintBackendHandlerTest.java
index fedd4ba..691a8d3 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/hint/ShardingCTLHintBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/hint/ShardingCTLHintBackendHandlerTest.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKe
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.hint.HintManager;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
@@ -167,7 +167,7 @@ public final class ShardingCTLHintBackendHandlerTest {
Properties props = new Properties();
props.setProperty(ConfigurationPropertyKey.PROXY_HINT_ENABLED.getKey(), Boolean.TRUE.toString());
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(props), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(props), new MySQLDatabaseType()));
String sql = "sctl:hint show table status";
ShardingCTLHintBackendHandler defaultHintBackendHandler = new ShardingCTLHintBackendHandler(sql, backendConnection);
BackendResponse backendResponse = defaultHintBackendHandler.execute();
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/set/ShardingCTLSetBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/set/ShardingCTLSetBackendHandlerTest.java
index 29e2703..409e835 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/set/ShardingCTLSetBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/sctl/set/ShardingCTLSetBackendHandlerTest.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -54,7 +54,7 @@ public final class ShardingCTLSetBackendHandlerTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
index 71d206b..fbd51a4 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
@@ -62,7 +62,7 @@ public final class ShardingSphereProxy {
} finally {
workerGroup.shutdownGracefully();
bossGroup.shutdownGracefully();
- BackendExecutorContext.getInstance().getExecutorKernel().close();
+ BackendExecutorContext.getInstance().getExecutorEngine().close();
}
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/executor/UserExecutorGroup.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/executor/UserExecutorGroup.java
index cf12ca6..b5e05bb 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/executor/UserExecutorGroup.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/executor/UserExecutorGroup.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.proxy.frontend.executor;
import com.google.common.util.concurrent.ListeningExecutorService;
import lombok.Getter;
import org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
-import org.apache.shardingsphere.infra.executor.kernel.impl.ShardingSphereExecutorService;
+import org.apache.shardingsphere.infra.executor.kernel.thread.ExecutorServiceManager;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
/**
@@ -34,15 +34,15 @@ public final class UserExecutorGroup {
private static final UserExecutorGroup INSTANCE = new UserExecutorGroup();
- private final ShardingSphereExecutorService shardingSphereExecutorService;
+ private final ExecutorServiceManager executorServiceManager;
@Getter
private final ListeningExecutorService executorService;
private UserExecutorGroup() {
- shardingSphereExecutorService = new ShardingSphereExecutorService(
+ executorServiceManager = new ExecutorServiceManager(
PROXY_SCHEMA_CONTEXTS.getMetaDataContexts().getProps().<Integer>getValue(ConfigurationPropertyKey.ACCEPTOR_SIZE), NAME_FORMAT);
- executorService = shardingSphereExecutorService.getExecutorService();
+ executorService = executorServiceManager.getExecutorService();
}
/**
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java
index 33660e4..8eb693c 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java
@@ -31,7 +31,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.apache.shardingsphere.proxy.frontend.auth.AuthenticationResult;
@@ -164,7 +164,7 @@ public final class MySQLFrontendEngineTest {
}
private MetaDataContexts getMetaDataContexts(final Authentication authentication) {
- return new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), authentication, new ConfigurationProperties(new Properties()), new MySQLDatabaseType());
+ return new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), authentication, new ConfigurationProperties(new Properties()), new MySQLDatabaseType());
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationEngineTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationEngineTest.java
index 9821051..b4520e0 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationEngineTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationEngineTest.java
@@ -31,7 +31,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.apache.shardingsphere.proxy.frontend.auth.AuthenticationResultBuilder;
@@ -141,7 +141,7 @@ public final class MySQLAuthenticationEngineTest {
Field field = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
field.setAccessible(true);
field.set(ProxyContext.getInstance(), new StandardMetaDataContexts(Collections.singletonMap("sharding_db", mock(ShardingSphereMetaData.class)),
- mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
private MySQLPacketPayload getPayload(final String username, final String database, final byte[] authResponse) {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationHandlerTest.java
index 95e7482..5d66f38 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/auth/MySQLAuthenticationHandlerTest.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.junit.Before;
@@ -121,7 +121,7 @@ public final class MySQLAuthenticationHandlerTest {
}
private MetaDataContexts getMetaDataContexts(final Authentication authentication) {
- return new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), authentication, new ConfigurationProperties(new Properties()), new MySQLDatabaseType());
+ return new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), authentication, new ConfigurationProperties(new Properties()), new MySQLDatabaseType());
}
private Map<String, ShardingSphereMetaData> getMetaDataMap() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/MySQLCommandExecutorFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/MySQLCommandExecutorFactoryTest.java
index 245bcaa..3b7ffd2 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/MySQLCommandExecutorFactoryTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/MySQLCommandExecutorFactoryTest.java
@@ -30,7 +30,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -74,7 +74,7 @@ public final class MySQLCommandExecutorFactoryTest {
field.setAccessible(true);
Map<String, ShardingSphereMetaData> metaDataMap = Collections.singletonMap("logic_db", mock(ShardingSphereMetaData.class, RETURNS_DEEP_STUBS));
field.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
@Test
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java
index 3586eab..957ac6a 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/execute/MySQLComStmtExecuteExecutorTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.executor.sql.raw.execute.result.query.QueryHeader;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine;
@@ -62,7 +62,7 @@ public final class MySQLComStmtExecuteExecutorTest {
metaDataContexts.setAccessible(true);
Map<String, ShardingSphereMetaData> metaDataMap = Collections.singletonMap("logic_db", mock(ShardingSphereMetaData.class, RETURNS_DEEP_STUBS));
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(metaDataMap, mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(metaDataMap, mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
}
@Test
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/parse/PostgreSQLComParseExecutorTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/parse/PostgreSQLComParseExecutorTest.java
index 3592179..92f2fbb 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/parse/PostgreSQLComParseExecutorTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/binary/parse/PostgreSQLComParseExecutorTest.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.auth.Authentication;
import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties;
import org.apache.shardingsphere.infra.context.metadata.impl.StandardMetaDataContexts;
import org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorKernel;
+import org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
@@ -60,7 +60,7 @@ public final class PostgreSQLComParseExecutorTest {
Field metaDataContexts = ProxyContext.getInstance().getClass().getDeclaredField("metaDataContexts");
metaDataContexts.setAccessible(true);
metaDataContexts.set(ProxyContext.getInstance(),
- new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorKernel.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
+ new StandardMetaDataContexts(getMetaDataMap(), mock(ExecutorEngine.class), new Authentication(), new ConfigurationProperties(new Properties()), new MySQLDatabaseType()));
BinaryStatementRegistry.getInstance().register(1);
PostgreSQLComParseExecutor actual = new PostgreSQLComParseExecutor(parsePacket, backendConnection);
assertThat(actual.execute().iterator().next(), instanceOf(PostgreSQLParseCompletePacket.class));
diff --git a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/execute/engine/ShardingScalingExecuteEngine.java b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/execute/engine/ShardingScalingExecuteEngine.java
index f8fb986..cc6c28f 100644
--- a/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/execute/engine/ShardingScalingExecuteEngine.java
+++ b/shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/execute/engine/ShardingScalingExecuteEngine.java
@@ -24,7 +24,7 @@ import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.executor.kernel.impl.ShardingSphereThreadFactoryBuilder;
+import org.apache.shardingsphere.infra.executor.kernel.thread.ExecutorThreadFactoryBuilder;
import org.apache.shardingsphere.scaling.core.execute.executor.ShardingScalingExecutor;
import javax.annotation.ParametersAreNonnullByDefault;
@@ -50,7 +50,7 @@ public final class ShardingScalingExecuteEngine {
* @return sharding scaling execute engine instance
*/
public static ShardingScalingExecuteEngine newCachedThreadInstance() {
- return new ShardingScalingExecuteEngine(MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(ShardingSphereThreadFactoryBuilder.build(THREAD_NAME_FORMAT))));
+ return new ShardingScalingExecuteEngine(MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(ExecutorThreadFactoryBuilder.build(THREAD_NAME_FORMAT))));
}
/**
@@ -60,7 +60,7 @@ public final class ShardingScalingExecuteEngine {
* @return sharding scaling execute engine instance
*/
public static ShardingScalingExecuteEngine newFixedThreadInstance(final int threadNumber) {
- return new ShardingScalingExecuteEngine(MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(threadNumber, ShardingSphereThreadFactoryBuilder.build(THREAD_NAME_FORMAT))));
+ return new ShardingScalingExecuteEngine(MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(threadNumber, ExecutorThreadFactoryBuilder.build(THREAD_NAME_FORMAT))));
}
/**
diff --git a/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHook.java b/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHook.java
index e7b09e5..557d2c4 100644
--- a/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHook.java
+++ b/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHook.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.transaction.base.seata.at;
import io.seata.core.context.RootContext;
import org.apache.shardingsphere.infra.executor.sql.hook.SQLExecutionHook;
import org.apache.shardingsphere.infra.database.metadata.DataSourceMetaData;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import java.util.List;
import java.util.Map;
diff --git a/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingTransactionManagerTest.java b/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingTransactionManagerTest.java
index c8947bd..825ca3b 100644
--- a/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingTransactionManagerTest.java
+++ b/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingTransactionManagerTest.java
@@ -35,7 +35,7 @@ import org.apache.shardingsphere.transaction.base.seata.at.fixture.MockSeataServ
import org.apache.shardingsphere.transaction.core.ResourceDataSource;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.apache.shardingsphere.infra.database.type.DatabaseTypeRegistry;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
diff --git a/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHookTest.java b/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHookTest.java
index 1e5940f..07c1786 100644
--- a/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHookTest.java
+++ b/shardingsphere-transaction/shardingsphere-transaction-base/shardingsphere-transaction-base-seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/TransactionalSQLExecutionHookTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.transaction.base.seata.at;
import io.seata.core.context.RootContext;
import org.apache.shardingsphere.infra.database.metadata.DataSourceMetaData;
-import org.apache.shardingsphere.infra.executor.kernel.ExecutorDataMap;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;