This is an automated email from the ASF dual-hosted git repository.
panjuan 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 de877fdf14e Replace ExecutorDataMap with ExecuteIDContext in
ExecuteProcessEngine and refactor ExecuteProcessConstants (#23940)
de877fdf14e is described below
commit de877fdf14e0f3712055571fea80af490d1f9af5
Author: Zhengqiang Duan <[email protected]>
AuthorDate: Fri Feb 3 10:11:45 2023 +0800
Replace ExecutorDataMap with ExecuteIDContext in ExecuteProcessEngine and
refactor ExecuteProcessConstants (#23940)
* Replace ExecutorDataMap with ExecuteIDContext in ExecuteProcessEngine and
refactor ExecuteProcessConstants
* fix unit test
* fix unit test
---
.../OpenTracingJDBCExecutorCallbackAdviceTest.java | 2 +-
.../infra/executor/kernel/ExecutorEngine.java | 7 +--
.../executor/kernel/model/ExecutorCallback.java | 4 +-
.../engine/driver/jdbc/JDBCExecutorCallback.java | 15 ++---
.../engine/raw/callback/RawExecutorCallback.java | 4 +-
.../raw/callback/RawSQLExecutorCallback.java | 12 ++--
.../process/ExecuteIDContext.java} | 45 +++++++++++----
.../executor/sql/process/ExecuteProcessEngine.java | 22 +++----
.../sql/process/ExecuteProcessReporter.java | 8 +--
.../sql/process/model/ExecuteProcessContext.java | 8 +--
...onstants.java => ExecuteProcessStatusEnum.java} | 6 +-
.../sql/process/model/ExecuteProcessUnit.java | 4 +-
.../model/yaml/YamlExecuteProcessContext.java | 4 +-
.../process/model/yaml/YamlExecuteProcessUnit.java | 4 +-
.../kernel/fixture/ExecutorCallbackFixture.java | 3 +-
.../engine/jdbc/JDBCExecutorCallbackTest.java | 10 ++--
.../executor/sql/process/ExecuteIDContextTest.java | 67 ++++++++++++++++++++++
.../sql/process/ExecuteProcessReporterTest.java | 8 +--
...eataATShardingSphereTransactionManagerTest.java | 3 +-
.../mysql/executor/ShowProcessListExecutor.java | 8 +--
.../executor/ShowProcessListExecutorTest.java | 4 +-
21 files changed, 163 insertions(+), 85 deletions(-)
diff --git
a/agent/plugins/tracing/type/opentracing/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentracing/advice/OpenTracingJDBCExecutorCallbackAdviceTest.java
b/agent/plugins/tracing/type/opentracing/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentracing/advice/OpenTracingJDBCExecutorCallbackAdviceTest.java
index 9b3d832d6e3..87de67cd347 100644
---
a/agent/plugins/tracing/type/opentracing/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentracing/advice/OpenTracingJDBCExecutorCallbackAdviceTest.java
+++
b/agent/plugins/tracing/type/opentracing/src/test/java/org/apache/shardingsphere/agent/plugin/tracing/opentracing/advice/OpenTracingJDBCExecutorCallbackAdviceTest.java
@@ -52,7 +52,7 @@ public final class OpenTracingJDBCExecutorCallbackAdviceTest
extends AbstractJDB
GlobalTracer.register(new MockTracer());
}
tracer = (MockTracer)
Plugins.getMemberAccessor().get(GlobalTracer.class.getDeclaredField("tracer"),
GlobalTracer.get());
- executeMethod =
JDBCExecutorCallback.class.getDeclaredMethod("execute",
JDBCExecutionUnit.class, boolean.class, Map.class);
+ executeMethod =
JDBCExecutorCallback.class.getDeclaredMethod("execute",
JDBCExecutionUnit.class, boolean.class);
}
@Before
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
index b0d559298e1..335169c48dc 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/ExecutorEngine.java
@@ -21,7 +21,6 @@ import lombok.Getter;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroup;
import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
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
org.apache.shardingsphere.infra.util.exception.external.sql.type.generic.UnknownSQLException;
@@ -31,7 +30,6 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
@@ -132,7 +130,7 @@ public final class ExecutorEngine implements AutoCloseable {
}
private <I, O> Collection<O> syncExecute(final ExecutionGroup<I>
executionGroup, final ExecutorCallback<I, O> callback) throws SQLException {
- return callback.execute(executionGroup.getInputs(), true,
ExecutorDataMap.getValue());
+ return callback.execute(executionGroup.getInputs(), true);
}
private <I, O> Collection<Future<Collection<O>>> asyncExecute(final
Iterator<ExecutionGroup<I>> executionGroups, final ExecutorCallback<I, O>
callback) {
@@ -144,8 +142,7 @@ public final class ExecutorEngine implements AutoCloseable {
}
private <I, O> Future<Collection<O>> asyncExecute(final ExecutionGroup<I>
executionGroup, final ExecutorCallback<I, O> callback) {
- Map<String, Object> dataMap = ExecutorDataMap.getValue();
- return executorServiceManager.getExecutorService().submit(() ->
callback.execute(executionGroup.getInputs(), false, dataMap));
+ return executorServiceManager.getExecutorService().submit(() ->
callback.execute(executionGroup.getInputs(), false));
}
private <O> List<O> getGroupResults(final Collection<O> firstResults,
final Collection<Future<Collection<O>>> restFutures) throws SQLException {
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
index 548157d0297..30b170138c3 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorCallback.java
@@ -19,7 +19,6 @@ package org.apache.shardingsphere.infra.executor.kernel.model;
import java.sql.SQLException;
import java.util.Collection;
-import java.util.Map;
/**
* Grouped callback.
@@ -34,9 +33,8 @@ public interface ExecutorCallback<I, O> {
*
* @param inputs input values
* @param isTrunkThread is execution in trunk thread
- * @param dataMap data map
* @return execution results
* @throws SQLException throw when execute failure
*/
- Collection<O> execute(Collection<I> inputs, boolean isTrunkThread,
Map<String, Object> dataMap) throws SQLException;
+ Collection<O> execute(Collection<I> inputs, boolean isTrunkThread) throws
SQLException;
}
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/driver/jdbc/JDBCExecutorCallback.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/driver/jdbc/JDBCExecutorCallback.java
index 776145b89a2..615ebfb9110 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/driver/jdbc/JDBCExecutorCallback.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/driver/jdbc/JDBCExecutorCallback.java
@@ -28,7 +28,6 @@ import
org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutorEx
import org.apache.shardingsphere.infra.executor.sql.hook.SPISQLExecutionHook;
import org.apache.shardingsphere.infra.executor.sql.hook.SQLExecutionHook;
import
org.apache.shardingsphere.infra.executor.sql.process.ExecuteProcessEngine;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
import java.sql.DatabaseMetaData;
@@ -59,11 +58,11 @@ public abstract class JDBCExecutorCallback<T> implements
ExecutorCallback<JDBCEx
private final boolean isExceptionThrown;
@Override
- public final Collection<T> execute(final Collection<JDBCExecutionUnit>
executionUnits, final boolean isTrunkThread, final Map<String, Object> dataMap)
throws SQLException {
+ public final Collection<T> execute(final Collection<JDBCExecutionUnit>
executionUnits, final boolean isTrunkThread) throws SQLException {
// TODO It is better to judge whether need sane result before execute,
can avoid exception thrown
Collection<T> result = new LinkedList<>();
for (JDBCExecutionUnit each : executionUnits) {
- T executeResult = execute(each, isTrunkThread, dataMap);
+ T executeResult = execute(each, isTrunkThread);
if (null != executeResult) {
result.add(executeResult);
}
@@ -76,7 +75,7 @@ public abstract class JDBCExecutorCallback<T> implements
ExecutorCallback<JDBCEx
*
* @see <a
href="https://github.com/apache/skywalking/blob/master/docs/en/guides/Java-Plugin-Development-Guide.md#user-content-plugin-development-guide">Plugin
Development Guide</a>
*/
- private T execute(final JDBCExecutionUnit jdbcExecutionUnit, final boolean
isTrunkThread, final Map<String, Object> dataMap) throws SQLException {
+ private T execute(final JDBCExecutionUnit jdbcExecutionUnit, final boolean
isTrunkThread) throws SQLException {
SQLExecutorExceptionHandler.setExceptionThrown(isExceptionThrown);
DatabaseType storageType =
storageTypes.get(jdbcExecutionUnit.getExecutionUnit().getDataSourceName());
DataSourceMetaData dataSourceMetaData =
getDataSourceMetaData(jdbcExecutionUnit.getStorageResource().getConnection().getMetaData(),
storageType);
@@ -86,7 +85,7 @@ public abstract class JDBCExecutorCallback<T> implements
ExecutorCallback<JDBCEx
sqlExecutionHook.start(jdbcExecutionUnit.getExecutionUnit().getDataSourceName(),
sqlUnit.getSql(), sqlUnit.getParameters(), dataSourceMetaData, isTrunkThread);
T result = executeSQL(sqlUnit.getSql(),
jdbcExecutionUnit.getStorageResource(), jdbcExecutionUnit.getConnectionMode(),
storageType);
sqlExecutionHook.finishSuccess();
- finishReport(dataMap, jdbcExecutionUnit);
+ finishReport(jdbcExecutionUnit);
return result;
} catch (final SQLException ex) {
if (!storageType.equals(protocolType)) {
@@ -111,10 +110,8 @@ public abstract class JDBCExecutorCallback<T> implements
ExecutorCallback<JDBCEx
return result;
}
- private void finishReport(final Map<String, Object> dataMap, final
SQLExecutionUnit executionUnit) {
- if (dataMap.containsKey(ExecuteProcessConstants.EXECUTE_ID.name())) {
- new
ExecuteProcessEngine().finishExecution(dataMap.get(ExecuteProcessConstants.EXECUTE_ID.name()).toString(),
executionUnit);
- }
+ private void finishReport(final SQLExecutionUnit executionUnit) {
+ new ExecuteProcessEngine().finishExecution(executionUnit);
}
protected abstract T executeSQL(String sql, Statement statement,
ConnectionMode connectionMode, DatabaseType storageType) throws SQLException;
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawExecutorCallback.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawExecutorCallback.java
index 7a14bd419bb..dea97b84ec0 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawExecutorCallback.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawExecutorCallback.java
@@ -20,7 +20,6 @@ package
org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.callback
import org.apache.shardingsphere.infra.util.spi.annotation.SingletonSPI;
import java.util.Collection;
-import java.util.Map;
/**
* Raw executor callback.
@@ -36,8 +35,7 @@ public interface RawExecutorCallback<I, O> {
*
* @param inputs input values
* @param isTrunkThread is execution in trunk thread
- * @param dataMap data map
* @return execution results
*/
- Collection<O> execute(Collection<I> inputs, boolean isTrunkThread,
Map<String, Object> dataMap);
+ Collection<O> execute(Collection<I> inputs, boolean isTrunkThread);
}
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawSQLExecutorCallback.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawSQLExecutorCallback.java
index ba3e0238d04..9094b2c5edd 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawSQLExecutorCallback.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/raw/callback/RawSQLExecutorCallback.java
@@ -21,13 +21,12 @@ import com.google.common.base.Preconditions;
import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorCallback;
import
org.apache.shardingsphere.infra.executor.sql.execute.engine.raw.RawSQLExecutionUnit;
import
org.apache.shardingsphere.infra.executor.sql.execute.result.ExecuteResult;
+import org.apache.shardingsphere.infra.executor.sql.process.ExecuteIDContext;
import
org.apache.shardingsphere.infra.executor.sql.process.ExecuteProcessEngine;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
import org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader;
import java.sql.SQLException;
import java.util.Collection;
-import java.util.Map;
/**
* Raw SQL executor callback.
@@ -44,13 +43,12 @@ public final class RawSQLExecutorCallback implements
ExecutorCallback<RawSQLExec
@SuppressWarnings("unchecked")
@Override
- public Collection<ExecuteResult> execute(final
Collection<RawSQLExecutionUnit> inputs, final boolean isTrunkThread, final
Map<String, Object> dataMap) throws SQLException {
- Collection<ExecuteResult> result =
callbacks.iterator().next().execute(inputs, isTrunkThread, dataMap);
- if (dataMap.containsKey(ExecuteProcessConstants.EXECUTE_ID.name())) {
+ public Collection<ExecuteResult> execute(final
Collection<RawSQLExecutionUnit> inputs, final boolean isTrunkThread) throws
SQLException {
+ Collection<ExecuteResult> result =
callbacks.iterator().next().execute(inputs, isTrunkThread);
+ if (!ExecuteIDContext.isEmpty()) {
ExecuteProcessEngine executeProcessEngine = new
ExecuteProcessEngine();
- String executionID =
dataMap.get(ExecuteProcessConstants.EXECUTE_ID.name()).toString();
for (RawSQLExecutionUnit each : inputs) {
- executeProcessEngine.finishExecution(executionID, each);
+ executeProcessEngine.finishExecution(each);
}
}
return result;
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorDataMap.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteIDContext.java
similarity index 51%
rename from
infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorDataMap.java
rename to
infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteIDContext.java
index 590ec85a694..ce9abbbc229 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutorDataMap.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteIDContext.java
@@ -15,28 +15,51 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.kernel.model;
+package org.apache.shardingsphere.infra.executor.sql.process;
+import com.alibaba.ttl.TransmittableThreadLocal;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
/**
- * Executor data map for thread local even cross multiple threads.
+ * Execute id context.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ExecutorDataMap {
+public final class ExecuteIDContext {
+
+ private static final TransmittableThreadLocal<String> EXECUTE_ID = new
TransmittableThreadLocal<>();
- private static final ThreadLocal<Map<String, Object>> DATA_MAP =
ThreadLocal.withInitial(LinkedHashMap::new);
+ /**
+ * Judge whether execute id is empty or not.
+ *
+ * @return whether execute id is empty or not
+ */
+ public static boolean isEmpty() {
+ return null == EXECUTE_ID.get();
+ }
/**
- * Get value.
+ * Get execute id.
*
- * @return data map
+ * @return execute id
+ */
+ public static String get() {
+ return EXECUTE_ID.get();
+ }
+
+ /**
+ * Set execute id.
+ *
+ * @param executeId execute id
+ */
+ public static void set(final String executeId) {
+ EXECUTE_ID.set(executeId);
+ }
+
+ /**
+ * Remove execute id.
*/
- public static Map<String, Object> getValue() {
- return DATA_MAP.get();
+ public static void remove() {
+ EXECUTE_ID.remove();
}
}
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
index 710095124e5..28c2f4b4fe9 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
@@ -20,9 +20,8 @@ package org.apache.shardingsphere.infra.executor.sql.process;
import org.apache.shardingsphere.infra.binder.QueryContext;
import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupReportContext;
-import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import
org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
+import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatusEnum;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DDLStatement;
@@ -72,29 +71,32 @@ public final class ExecuteProcessEngine {
*/
public void initializeExecution(final ExecutionGroupContext<? extends
SQLExecutionUnit> executionGroupContext, final QueryContext queryContext) {
if
(isMySQLDDLOrDMLStatement(queryContext.getSqlStatementContext().getSqlStatement()))
{
-
ExecutorDataMap.getValue().put(ExecuteProcessConstants.EXECUTE_ID.name(),
executionGroupContext.getReportContext().getExecutionID());
- reporter.report(queryContext, executionGroupContext,
ExecuteProcessConstants.EXECUTE_STATUS_START);
+
ExecuteIDContext.set(executionGroupContext.getReportContext().getExecutionID());
+ reporter.report(queryContext, executionGroupContext,
ExecuteProcessStatusEnum.START);
}
}
/**
* Finish execution.
*
- * @param executionID execution ID
* @param executionUnit execution unit
*/
- public void finishExecution(final String executionID, final
SQLExecutionUnit executionUnit) {
- reporter.report(executionID, executionUnit,
ExecuteProcessConstants.EXECUTE_STATUS_DONE);
+ public void finishExecution(final SQLExecutionUnit executionUnit) {
+ if (ExecuteIDContext.isEmpty()) {
+ return;
+ }
+ reporter.report(ExecuteIDContext.get(), executionUnit,
ExecuteProcessStatusEnum.DONE);
}
/**
* Clean execution.
*/
public void cleanExecution() {
- if
(ExecutorDataMap.getValue().containsKey(ExecuteProcessConstants.EXECUTE_ID.name()))
{
-
reporter.reportClean(ExecutorDataMap.getValue().get(ExecuteProcessConstants.EXECUTE_ID.name()).toString());
+ if (ExecuteIDContext.isEmpty()) {
+ return;
}
-
ExecutorDataMap.getValue().remove(ExecuteProcessConstants.EXECUTE_ID.name());
+ reporter.reportClean(ExecuteIDContext.get());
+ ExecuteIDContext.remove();
}
private boolean isMySQLDDLOrDMLStatement(final SQLStatement sqlStatement) {
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporter.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporter.java
index 565ba9301df..ccfe6002272 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporter.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporter.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.infra.executor.sql.process;
import org.apache.shardingsphere.infra.binder.QueryContext;
import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext;
import
org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
+import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatusEnum;
import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessContext;
import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessUnit;
@@ -37,7 +37,7 @@ public final class ExecuteProcessReporter {
* @param executionGroupContext execution group context
*/
public void report(final ExecutionGroupContext<? extends SQLExecutionUnit>
executionGroupContext) {
- ExecuteProcessContext executeProcessContext = new
ExecuteProcessContext("", executionGroupContext,
ExecuteProcessConstants.EXECUTE_STATUS_SLEEP, true);
+ ExecuteProcessContext executeProcessContext = new
ExecuteProcessContext("", executionGroupContext,
ExecuteProcessStatusEnum.SLEEP, true);
ShowProcessListManager.getInstance().putProcessContext(executeProcessContext.getExecutionID(),
executeProcessContext);
}
@@ -49,7 +49,7 @@ public final class ExecuteProcessReporter {
* @param constants constants
*/
public void report(final QueryContext queryContext, final
ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext,
- final ExecuteProcessConstants constants) {
+ final ExecuteProcessStatusEnum constants) {
ExecuteProcessContext originExecuteProcessContext =
ShowProcessListManager.getInstance().getProcessContext(executionGroupContext.getReportContext().getExecutionID());
boolean isProxyContext = null != originExecuteProcessContext &&
originExecuteProcessContext.isProxyContext();
ExecuteProcessContext executeProcessContext = new
ExecuteProcessContext(queryContext.getSql(), executionGroupContext, constants,
isProxyContext);
@@ -64,7 +64,7 @@ public final class ExecuteProcessReporter {
* @param executionUnit execution unit
* @param constants constants
*/
- public void report(final String executionID, final SQLExecutionUnit
executionUnit, final ExecuteProcessConstants constants) {
+ public void report(final String executionID, final SQLExecutionUnit
executionUnit, final ExecuteProcessStatusEnum constants) {
ExecuteProcessUnit executeProcessUnit = new
ExecuteProcessUnit(executionUnit.getExecutionUnit(), constants);
ExecuteProcessContext executeProcessContext =
ShowProcessListManager.getInstance().getProcessContext(executionID);
Optional.ofNullable(executeProcessContext.getProcessUnits().get(executeProcessUnit.getUnitID())).ifPresent(optional
-> optional.setStatus(executeProcessUnit.getStatus()));
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessContext.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessContext.java
index 457b13ea3f6..617f8d44705 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessContext.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessContext.java
@@ -52,11 +52,11 @@ public final class ExecuteProcessContext {
private long startTimeMillis = System.currentTimeMillis();
- private ExecuteProcessConstants executeProcessConstants;
+ private ExecuteProcessStatusEnum executeProcessConstants;
private final boolean proxyContext;
- public ExecuteProcessContext(final String sql, final
ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext, final
ExecuteProcessConstants constants,
+ public ExecuteProcessContext(final String sql, final
ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext, final
ExecuteProcessStatusEnum constants,
final boolean isProxyContext) {
this.executionID =
executionGroupContext.getReportContext().getExecutionID();
this.sql = sql;
@@ -69,7 +69,7 @@ public final class ExecuteProcessContext {
proxyContext = isProxyContext;
}
- private void addProcessUnitsAndStatements(final ExecutionGroupContext<?
extends SQLExecutionUnit> executionGroupContext, final ExecuteProcessConstants
constants) {
+ private void addProcessUnitsAndStatements(final ExecutionGroupContext<?
extends SQLExecutionUnit> executionGroupContext, final ExecuteProcessStatusEnum
constants) {
for (ExecutionGroup<? extends SQLExecutionUnit> each :
executionGroupContext.getInputGroups()) {
for (SQLExecutionUnit executionUnit : each.getInputs()) {
ExecuteProcessUnit processUnit = new
ExecuteProcessUnit(executionUnit.getExecutionUnit(), constants);
@@ -87,7 +87,7 @@ public final class ExecuteProcessContext {
public void resetExecuteProcessContextToSleep() {
this.sql = "";
this.startTimeMillis = System.currentTimeMillis();
- this.executeProcessConstants =
ExecuteProcessConstants.EXECUTE_STATUS_SLEEP;
+ this.executeProcessConstants = ExecuteProcessStatusEnum.SLEEP;
}
}
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessConstants.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessStatusEnum.java
similarity index 85%
rename from
infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessConstants.java
rename to
infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessStatusEnum.java
index 67117eec151..4f79301283d 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessConstants.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessStatusEnum.java
@@ -18,9 +18,9 @@
package org.apache.shardingsphere.infra.executor.sql.process.model;
/**
- * Execute process constants.
+ * Execute process status enum.
*/
-public enum ExecuteProcessConstants {
+public enum ExecuteProcessStatusEnum {
- EXECUTE_ID, EXECUTE_STATUS_START, EXECUTE_STATUS_DONE, EXECUTE_STATUS_SLEEP
+ START, DONE, SLEEP
}
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessUnit.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessUnit.java
index 4a800ff4fb6..2b6b1c25eed 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessUnit.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/ExecuteProcessUnit.java
@@ -30,9 +30,9 @@ public final class ExecuteProcessUnit {
private final String unitID;
- private volatile ExecuteProcessConstants status;
+ private volatile ExecuteProcessStatusEnum status;
- public ExecuteProcessUnit(final ExecutionUnit executionUnit, final
ExecuteProcessConstants status) {
+ public ExecuteProcessUnit(final ExecutionUnit executionUnit, final
ExecuteProcessStatusEnum status) {
this.unitID = String.valueOf(executionUnit.hashCode());
this.status = status;
}
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessContext.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessContext.java
index c18de1c7ef9..2c084b21dc7 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessContext.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessContext.java
@@ -21,7 +21,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
+import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatusEnum;
import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessContext;
import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessUnit;
@@ -51,7 +51,7 @@ public final class YamlExecuteProcessContext {
private Long startTimeMillis;
- private ExecuteProcessConstants executeProcessConstants;
+ private ExecuteProcessStatusEnum executeProcessConstants;
public YamlExecuteProcessContext(final ExecuteProcessContext
executeProcessContext) {
executionID = executeProcessContext.getExecutionID();
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessUnit.java
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessUnit.java
index b2a39d91ba1..65b80c34b6e 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessUnit.java
+++
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/model/yaml/YamlExecuteProcessUnit.java
@@ -21,7 +21,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
+import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatusEnum;
import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessUnit;
/**
@@ -35,7 +35,7 @@ public final class YamlExecuteProcessUnit {
private String unitID;
- private volatile ExecuteProcessConstants status;
+ private volatile ExecuteProcessStatusEnum status;
public YamlExecuteProcessUnit(final ExecuteProcessUnit executeProcessUnit)
{
unitID = executeProcessUnit.getUnitID();
diff --git
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
index b01f8f49af0..4cd01cb9450 100644
---
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
+++
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/kernel/fixture/ExecutorCallbackFixture.java
@@ -23,7 +23,6 @@ import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutorCallback;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
import java.util.concurrent.CountDownLatch;
@RequiredArgsConstructor
@@ -32,7 +31,7 @@ public final class ExecutorCallbackFixture implements
ExecutorCallback<Object, S
private final CountDownLatch latch;
@Override
- public Collection<String> execute(final Collection<Object> inputs, final
boolean isTrunkThread, final Map<String, Object> dataMap) {
+ public Collection<String> execute(final Collection<Object> inputs, final
boolean isTrunkThread) {
List<String> result = new LinkedList<>();
for (Object each : inputs) {
latch.countDown();
diff --git
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/jdbc/JDBCExecutorCallbackTest.java
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/jdbc/JDBCExecutorCallbackTest.java
index f95c46a7ea1..b6e91a8731f 100644
---
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/jdbc/JDBCExecutorCallbackTest.java
+++
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/jdbc/JDBCExecutorCallbackTest.java
@@ -92,9 +92,9 @@ public final class JDBCExecutorCallbackTest {
};
Map<String, DataSourceMetaData> cachedDataSourceMetaData =
(Map<String, DataSourceMetaData>) Plugins.getMemberAccessor()
.get(JDBCExecutorCallback.class.getDeclaredField("CACHED_DATASOURCE_METADATA"),
jdbcExecutorCallback);
- jdbcExecutorCallback.execute(units, true, Collections.emptyMap());
+ jdbcExecutorCallback.execute(units, true);
assertThat(cachedDataSourceMetaData.size(), is(1));
- jdbcExecutorCallback.execute(units, true, Collections.emptyMap());
+ jdbcExecutorCallback.execute(units, true);
assertThat(cachedDataSourceMetaData.size(), is(1));
}
@@ -115,8 +115,8 @@ public final class JDBCExecutorCallbackTest {
return Optional.of(saneResult);
}
};
- assertThat(callback.execute(units, true, Collections.emptyMap()),
is(Collections.singletonList(saneResult)));
- assertThat(callback.execute(units, false, Collections.emptyMap()),
is(Collections.emptyList()));
+ assertThat(callback.execute(units, true),
is(Collections.singletonList(saneResult)));
+ assertThat(callback.execute(units, false),
is(Collections.emptyList()));
}
@Test(expected = SQLException.class)
@@ -135,6 +135,6 @@ public final class JDBCExecutorCallbackTest {
return Optional.empty();
}
};
- callback.execute(units, true, Collections.emptyMap());
+ callback.execute(units, true);
}
}
diff --git
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteIDContextTest.java
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteIDContextTest.java
new file mode 100644
index 00000000000..8c3ab0f27f7
--- /dev/null
+++
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteIDContextTest.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.infra.executor.sql.process;
+
+import org.junit.After;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+public final class ExecuteIDContextTest {
+
+ @After
+ public void tearDown() {
+ ExecuteIDContext.remove();
+ }
+
+ @Test
+ public void assertIsEmpty() {
+ assertTrue(ExecuteIDContext.isEmpty());
+ ExecuteIDContext.set("123e4567e89b12d3a456426655440000");
+ assertFalse(ExecuteIDContext.isEmpty());
+ }
+
+ @Test
+ public void assertGet() {
+ assertNull(ExecuteIDContext.get());
+ ExecuteIDContext.set("123e4567e89b12d3a456426655440000");
+ assertThat(ExecuteIDContext.get(),
is("123e4567e89b12d3a456426655440000"));
+ }
+
+ @Test
+ public void assertSet() {
+ assertNull(ExecuteIDContext.get());
+ ExecuteIDContext.set("123e4567e89b12d3a456426655440000");
+ assertThat(ExecuteIDContext.get(),
is("123e4567e89b12d3a456426655440000"));
+ ExecuteIDContext.set("123e4567e89b12d3a456426655440001");
+ assertThat(ExecuteIDContext.get(),
is("123e4567e89b12d3a456426655440001"));
+ }
+
+ @Test
+ public void assertRemove() {
+ assertNull(ExecuteIDContext.get());
+ ExecuteIDContext.set("123e4567e89b12d3a456426655440000");
+ assertThat(ExecuteIDContext.get(),
is("123e4567e89b12d3a456426655440000"));
+ ExecuteIDContext.remove();
+ assertNull(ExecuteIDContext.get());
+ }
+}
diff --git
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporterTest.java
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporterTest.java
index 8b9c9740c4a..9f4264fb3f5 100644
---
a/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporterTest.java
+++
b/infra/executor/src/test/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessReporterTest.java
@@ -22,8 +22,8 @@ import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupConte
import
org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupReportContext;
import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit;
import
org.apache.shardingsphere.infra.executor.sql.execute.engine.SQLExecutionUnit;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessContext;
+import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatusEnum;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -40,7 +40,7 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-public class ExecuteProcessReporterTest {
+public final class ExecuteProcessReporterTest {
private MockedStatic<ShowProcessListManager> mockedStatic;
@@ -59,7 +59,7 @@ public class ExecuteProcessReporterTest {
public void assertReport() {
QueryContext queryContext = new QueryContext(null, null, null);
ExecutionGroupContext<? extends SQLExecutionUnit>
executionGroupContext = mockExecutionGroupContext();
- reporter.report(queryContext, executionGroupContext,
ExecuteProcessConstants.EXECUTE_ID);
+ reporter.report(queryContext, executionGroupContext,
ExecuteProcessStatusEnum.START);
verify(showProcessListManager,
times(1)).putProcessContext(eq(executionGroupContext.getReportContext().getExecutionID()),
any());
}
@@ -80,7 +80,7 @@ public class ExecuteProcessReporterTest {
ExecuteProcessContext executeProcessContext =
mock(ExecuteProcessContext.class);
when(executeProcessContext.getProcessUnits()).thenReturn(Collections.emptyMap());
when(showProcessListManager.getProcessContext("foo_id")).thenReturn(executeProcessContext);
- reporter.report("foo_id", sqlExecutionUnit,
ExecuteProcessConstants.EXECUTE_ID);
+ reporter.report("foo_id", sqlExecutionUnit,
ExecuteProcessStatusEnum.DONE);
verify(showProcessListManager,
times(1)).getProcessContext(eq("foo_id"));
}
diff --git
a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
index 4782573f5eb..9359becfa98 100644
---
a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
+++
b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java
@@ -31,7 +31,6 @@ import io.seata.rm.datasource.DataSourceProxy;
import io.seata.tm.api.GlobalTransactionContext;
import lombok.SneakyThrows;
import org.apache.shardingsphere.infra.database.type.DatabaseType;
-import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.test.fixture.jdbc.MockedDataSource;
import org.apache.shardingsphere.transaction.api.TransactionType;
@@ -92,7 +91,7 @@ public final class
SeataATShardingSphereTransactionManagerTest {
@After
public void tearDown() {
- ExecutorDataMap.getValue().clear();
+ SeataXIDContext.remove();
RootContext.unbind();
SeataTransactionHolder.clear();
seataTransactionManager.close();
diff --git
a/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutor.java
b/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutor.java
index cd9b70f5595..b78f018cb06 100644
---
a/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutor.java
+++
b/proxy/backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutor.java
@@ -25,7 +25,7 @@ import
org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.ra
import
org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.raw.metadata.RawQueryResultMetaData;
import
org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.raw.type.RawMemoryQueryResult;
import
org.apache.shardingsphere.infra.executor.sql.execute.result.query.type.memory.row.MemoryQueryResultDataRow;
-import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessConstants;
+import
org.apache.shardingsphere.infra.executor.sql.process.model.ExecuteProcessStatusEnum;
import
org.apache.shardingsphere.infra.executor.sql.process.model.yaml.BatchYamlExecuteProcessContext;
import
org.apache.shardingsphere.infra.executor.sql.process.model.yaml.YamlExecuteProcessContext;
import org.apache.shardingsphere.infra.merge.result.MergedResult;
@@ -95,12 +95,12 @@ public final class ShowProcessListExecutor implements
DatabaseAdminQueryExecutor
rowValues.add(processContext.getUsername());
rowValues.add(processContext.getHostname());
rowValues.add(processContext.getDatabaseName());
- rowValues.add(processContext.getExecuteProcessConstants() ==
ExecuteProcessConstants.EXECUTE_STATUS_SLEEP ? "Sleep" : "Execute");
+ rowValues.add(processContext.getExecuteProcessConstants() ==
ExecuteProcessStatusEnum.SLEEP ? "Sleep" : "Execute");
rowValues.add(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() -
processContext.getStartTimeMillis()));
String sql = null;
- if (processContext.getExecuteProcessConstants() !=
ExecuteProcessConstants.EXECUTE_STATUS_SLEEP) {
+ if (processContext.getExecuteProcessConstants() !=
ExecuteProcessStatusEnum.SLEEP) {
int processDoneCount =
processContext.getUnitStatuses().stream()
- .map(each ->
ExecuteProcessConstants.EXECUTE_STATUS_DONE == each.getStatus() ? 1 : 0)
+ .map(each -> ExecuteProcessStatusEnum.DONE ==
each.getStatus() ? 1 : 0)
.reduce(0, Integer::sum);
String statePrefix = "Executing ";
rowValues.add(statePrefix + processDoneCount + "/" +
processContext.getUnitStatuses().size());
diff --git
a/proxy/backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutorTest.java
b/proxy/backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutorTest.java
index 3dc8d7d3992..483a3d2a0d8 100644
---
a/proxy/backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutorTest.java
+++
b/proxy/backend/src/test/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/ShowProcessListExecutorTest.java
@@ -57,9 +57,9 @@ public final class ShowProcessListExecutorTest extends
ProxyContextRestorer {
+ " username: sharding\n"
+ " hostname: 127.0.0.1\n"
+ " unitStatuses:\n"
- + " - status: EXECUTE_STATUS_START\n"
+ + " - status: START\n"
+ " unitID: unitID1\n"
- + " - status: EXECUTE_STATUS_DONE\n"
+ + " - status: DONE\n"
+ " unitID: unitID2\n";
Plugins.getMemberAccessor().set(showProcessListExecutor.getClass().getDeclaredField("batchProcessContexts"),
showProcessListExecutor, Collections.singleton(executionNodeValue));
}