This is an automated email from the ASF dual-hosted git repository.

tuichenchuxin 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 8b85562fa46 Optimize kill process id logic (#20488)
8b85562fa46 is described below

commit 8b85562fa46cc644565e4d4a2a122a8358d312b1
Author: Zhengqiang Duan <[email protected]>
AuthorDate: Wed Aug 24 17:03:37 2022 +0800

    Optimize kill process id logic (#20488)
    
    * Optimize show processlist code style
    
    * Optimize show processlist code style
---
 .../engine/ShardingConditionEngineFactory.java     |  2 +-
 ...reateShardingTableRuleStatementUpdaterTest.java |  8 +++----
 .../kernel/model/ExecutionGroupContext.java        |  2 +-
 ...DataMatchDataConsistencyCalculateAlgorithm.java |  3 ++-
 .../process/GovernanceExecuteProcessReporter.java  | 25 ++++++++--------------
 .../mode/process/ShowProcessListManager.java       | 23 ++++++++++----------
 .../ClusterContextManagerCoordinator.java          |  9 +++-----
 .../status/compute/event/KillProcessIdEvent.java   |  2 +-
 .../event/KillProcessIdUnitCompleteEvent.java      |  2 +-
 .../subscriber/ProcessRegistrySubscriber.java      |  1 -
 .../subscriber/ProcessStandaloneSubscriber.java    |  2 +-
 .../process/ProcessStandaloneSubscriberTest.java   |  4 ++--
 .../admin/mysql/executor/KillProcessExecutor.java  |  6 +++---
 .../general/PostgreSQLMigrationGeneralIT.java      |  2 +-
 .../dumper/ColumnValueReaderFactoryTest.java       |  3 +--
 15 files changed, 41 insertions(+), 53 deletions(-)

diff --git 
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/ShardingConditionEngineFactory.java
 
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/ShardingConditionEngineFactory.java
index 1fffac3d221..cc40e12c769 100644
--- 
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/ShardingConditionEngineFactory.java
+++ 
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/ShardingConditionEngineFactory.java
@@ -44,7 +44,7 @@ public final class ShardingConditionEngineFactory {
     public static ShardingConditionEngine<?> 
createShardingConditionEngine(final QueryContext queryContext, final 
ShardingSphereDatabase database, final ShardingRule rule) {
         return 
createShardingConditionEngine(queryContext.getSqlStatementContext(), database, 
rule);
     }
-
+    
     /**
      * Create new instance of sharding condition engine.
      *
diff --git 
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateShardingTableRuleStatementUpdaterTest.java
 
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateShardingTableRuleStatementUpdaterTest.java
index 2ad382dfd50..51a70790fef 100644
--- 
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateShardingTableRuleStatementUpdaterTest.java
+++ 
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateShardingTableRuleStatementUpdaterTest.java
@@ -129,7 +129,7 @@ public final class 
CreateShardingTableRuleStatementUpdaterTest {
         assertThat(autoTableRule.getKeyGenerateStrategy().getColumn(), 
is("product_id"));
         
assertThat(autoTableRule.getKeyGenerateStrategy().getKeyGeneratorName(), 
is("t_order_item_input_distsql.fixture"));
     }
-
+    
     @Test
     public void assertCheckCreateShardingStatement() throws DistSQLException {
         String sql = "CREATE SHARDING TABLE RULE t_order("
@@ -140,7 +140,7 @@ public final class 
CreateShardingTableRuleStatementUpdaterTest {
         CreateShardingTableRuleStatement distSQLStatement = 
(CreateShardingTableRuleStatement) getDistSQLStatement(sql);
         updater.checkSQLStatement(database, distSQLStatement, null);
     }
-
+    
     @Test(expected = DistSQLException.class)
     public void assertCheckCreateShardingStatementThrows() throws 
DistSQLException {
         String sql = "CREATE SHARDING TABLE RULE t_order("
@@ -151,7 +151,7 @@ public final class 
CreateShardingTableRuleStatementUpdaterTest {
         CreateShardingTableRuleStatement distSQLStatement = 
(CreateShardingTableRuleStatement) getDistSQLStatement(sql);
         updater.checkSQLStatement(database, distSQLStatement, null);
     }
-
+    
     private AutoTableRuleSegment createCompleteAutoTableRule() {
         AutoTableRuleSegment result = new 
AutoTableRuleSegment("t_order_item_input", 
Collections.singletonList("logic_ds"));
         result.setKeyGenerateStrategySegment(new 
KeyGenerateStrategySegment("product_id", new 
AlgorithmSegment("DISTSQL.FIXTURE", new Properties())));
@@ -212,7 +212,7 @@ public final class 
CreateShardingTableRuleStatementUpdaterTest {
         SQLVisitor visitor = 
FeaturedDistSQLStatementParserFacadeFactory.getInstance(facade.getType()).getVisitorClass().getDeclaredConstructor().newInstance();
         return (DistSQLStatement) ((ParseTreeVisitor) 
visitor).visit(parseASTNode.getRootNode());
     }
-
+    
     private static class MockDataSourceContainedRule implements 
DataSourceContainedRule {
         
         @Override
diff --git 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
 
b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
index d30d00d7eb4..25b1dac7cef 100644
--- 
a/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
+++ 
b/shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java
@@ -38,7 +38,7 @@ public final class ExecutionGroupContext<T> {
     
     private final Collection<ExecutionGroup<T>> inputGroups;
     
-    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replaceAll("-", "");
+    private final String executionID = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
     
     private volatile String databaseName;
     
diff --git 
a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
 
b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
index 1fcbeb6dd59..6e26385013a 100644
--- 
a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
+++ 
b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java
@@ -127,7 +127,8 @@ public final class 
DataMatchDataConsistencyCalculateAlgorithm extends AbstractSt
         String schemaName = 
parameter.getTableNameSchemaNameMapping().getSchemaName(logicTableName);
         String uniqueKey = parameter.getUniqueKey().getName();
         String cacheKey = parameter.getDatabaseType() + "-" + 
(DatabaseTypeFactory.getInstance(parameter.getDatabaseType()).isSchemaAvailable()
-                ? schemaName.toLowerCase() + "." + 
logicTableName.toLowerCase() : logicTableName.toLowerCase());
+                ? schemaName.toLowerCase() + "." + logicTableName.toLowerCase()
+                : logicTableName.toLowerCase());
         if (null == parameter.getPreviousCalculatedResult()) {
             return firstSQLCache.computeIfAbsent(cacheKey, s -> 
sqlBuilder.buildChunkedQuerySQL(schemaName, logicTableName, uniqueKey, true));
         } else {
diff --git 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
index 2c33300ffe8..055d5d3951a 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/GovernanceExecuteProcessReporter.java
@@ -31,8 +31,8 @@ import 
org.apache.shardingsphere.infra.executor.sql.process.spi.ExecuteProcessRe
 import org.apache.shardingsphere.infra.util.eventbus.EventBusContext;
 
 import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Collection;
+import java.util.LinkedList;
 
 /**
  * Governance execute process reporter.
@@ -44,7 +44,7 @@ public final class GovernanceExecuteProcessReporter 
implements ExecuteProcessRep
                        final ExecuteProcessConstants constants, final 
EventBusContext eventBusContext) {
         ExecuteProcessContext executeProcessContext = new 
ExecuteProcessContext(queryContext.getSql(), executionGroupContext, constants);
         
ShowProcessListManager.getInstance().putProcessContext(executeProcessContext.getExecutionID(),
 new YamlExecuteProcessContext(executeProcessContext));
-        
ShowProcessListManager.getInstance().putProcessStatement(executeProcessContext.getExecutionID(),
 collectProcessStatement(executionGroupContext));
+        
ShowProcessListManager.getInstance().putProcessStatement(executeProcessContext.getExecutionID(),
 getProcessStatement(executionGroupContext));
     }
     
     @Override
@@ -74,20 +74,13 @@ public final class GovernanceExecuteProcessReporter 
implements ExecuteProcessRep
     public void reportClean(final String executionID) {
         ShowProcessListManager.getInstance().removeProcessContext(executionID);
     }
-
-    private List<Statement> collectProcessStatement(final 
ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext) {
-        List<Statement> result = new ArrayList<>();
-        if (null == executionGroupContext.getInputGroups()) {
-            return result;
-        }
-        for (ExecutionGroup<? extends SQLExecutionUnit> inputGroup : 
executionGroupContext.getInputGroups()) {
-            if (null == inputGroup.getInputs()) {
-                continue;
-            }
-            for (SQLExecutionUnit executionUnit : inputGroup.getInputs()) {
+    
+    private Collection<Statement> getProcessStatement(final 
ExecutionGroupContext<? extends SQLExecutionUnit> executionGroupContext) {
+        Collection<Statement> result = new LinkedList<>();
+        for (ExecutionGroup<? extends SQLExecutionUnit> each : 
executionGroupContext.getInputGroups()) {
+            for (SQLExecutionUnit executionUnit : each.getInputs()) {
                 if (executionUnit instanceof JDBCExecutionUnit) {
-                    JDBCExecutionUnit jdbcExecutionUnit = (JDBCExecutionUnit) 
executionUnit;
-                    result.add(jdbcExecutionUnit.getStorageResource());
+                    result.add(((JDBCExecutionUnit) 
executionUnit).getStorageResource());
                 }
             }
         }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
index c1f3e868f1f..6b8f76a835a 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-core/src/main/java/org/apache/shardingsphere/mode/process/ShowProcessListManager.java
@@ -25,7 +25,6 @@ import 
org.apache.shardingsphere.mode.process.lock.ShowProcessListSimpleLock;
 
 import java.sql.Statement;
 import java.util.Collection;
-import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -38,10 +37,10 @@ public final class ShowProcessListManager {
     private static final ShowProcessListManager INSTANCE = new 
ShowProcessListManager();
     
     @Getter
-    private final Map<String, YamlExecuteProcessContext> processContextMap = 
new ConcurrentHashMap<>();
+    private final Map<String, YamlExecuteProcessContext> processContexts = new 
ConcurrentHashMap<>();
     
     @Getter
-    private final Map<String, List<Statement>> processStatementMap = new 
ConcurrentHashMap<>();
+    private final Map<String, Collection<Statement>> processStatements = new 
ConcurrentHashMap<>();
     
     @Getter
     private final Map<String, ShowProcessListSimpleLock> locks = new 
ConcurrentHashMap<>();
@@ -62,7 +61,7 @@ public final class ShowProcessListManager {
      * @param processContext process context
      */
     public void putProcessContext(final String executionId, final 
YamlExecuteProcessContext processContext) {
-        processContextMap.put(executionId, processContext);
+        processContexts.put(executionId, processContext);
     }
     
     /**
@@ -71,11 +70,11 @@ public final class ShowProcessListManager {
      * @param executionId execution id
      * @param statements statements
      */
-    public void putProcessStatement(final String executionId, final 
List<Statement> statements) {
+    public void putProcessStatement(final String executionId, final 
Collection<Statement> statements) {
         if (statements.isEmpty()) {
             return;
         }
-        processStatementMap.put(executionId, statements);
+        processStatements.put(executionId, statements);
     }
     
     /**
@@ -85,7 +84,7 @@ public final class ShowProcessListManager {
      * @return execute process context
      */
     public YamlExecuteProcessContext getProcessContext(final String 
executionId) {
-        return processContextMap.get(executionId);
+        return processContexts.get(executionId);
     }
     
     /**
@@ -94,8 +93,8 @@ public final class ShowProcessListManager {
      * @param executionId execution id
      * @return execute statements
      */
-    public List<Statement> getProcessStatement(final String executionId) {
-        return processStatementMap.get(executionId);
+    public Collection<Statement> getProcessStatement(final String executionId) 
{
+        return processStatements.get(executionId);
     }
     
     /**
@@ -104,7 +103,7 @@ public final class ShowProcessListManager {
      * @param executionId execution id
      */
     public void removeProcessContext(final String executionId) {
-        processContextMap.remove(executionId);
+        processContexts.remove(executionId);
     }
     
     /**
@@ -113,7 +112,7 @@ public final class ShowProcessListManager {
      * @param executionId execution id
      */
     public void removeProcessStatement(final String executionId) {
-        processStatementMap.remove(executionId);
+        processStatements.remove(executionId);
     }
     
     /**
@@ -122,6 +121,6 @@ public final class ShowProcessListManager {
      * @return collection execute process context
      */
     public Collection<YamlExecuteProcessContext> getAllProcessContext() {
-        return processContextMap.values();
+        return processContexts.values();
     }
 }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
index 10a7b375337..3a04ea915e4 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterContextManagerCoordinator.java
@@ -63,7 +63,6 @@ import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.Collection;
 import java.util.LinkedList;
-import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.stream.Collectors;
@@ -311,11 +310,9 @@ public final class ClusterContextManagerCoordinator {
         if 
(!event.getInstanceId().equals(contextManager.getInstanceContext().getInstance().getMetaData().getId()))
 {
             return;
         }
-        List<Statement> statements = 
ShowProcessListManager.getInstance().getProcessStatement(event.getProcessId());
-        if (!statements.isEmpty()) {
-            for (Statement statement : statements) {
-                statement.cancel();
-            }
+        Collection<Statement> statements = 
ShowProcessListManager.getInstance().getProcessStatement(event.getProcessId());
+        for (Statement statement : statements) {
+            statement.cancel();
         }
         
registryCenter.getRepository().delete(ComputeNode.getProcessKillInstanceIdNodePath(event.getInstanceId(),
 event.getProcessId()));
     }
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
index 3813ed639a5..04052bc8467 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdEvent.java
@@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceEvent;
 
 /**
- * Kill processID event.
+ * Kill process id event.
  */
 @RequiredArgsConstructor
 @Getter
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitComplet
 [...]
index 52adf617cfa..5ec30095217 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
@@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceEvent;
 
 /**
- * Kill processID unit complete event.
+ * Kill process id unit complete event.
  */
 @RequiredArgsConstructor
 @Getter
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
index b6e4d8aa40b..3aa24916f1e 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/process/subscriber/ProcessRegistrySubscriber.java
@@ -83,7 +83,6 @@ public final class ProcessRegistrySubscriber {
     @Subscribe
     public void killProcessId(final KillProcessIdRequestEvent event) {
         String processId = event.getProcessId();
-        // current saturn processId not exist, maybe in other saturn process.
         boolean killProcessIdIsComplete = false;
         Collection<String> processKillPaths = getProcessKillPaths(processId);
         try {
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/ProcessStandaloneSubscriber.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/ProcessStandaloneSubscriber.java
index 9e7ef546a5a..48569de995c 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/ProcessStandaloneSubscriber.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/ProcessStandaloneSubscriber.java
@@ -49,7 +49,7 @@ public final class ProcessStandaloneSubscriber {
     @Subscribe
     public void loadShowProcessListData(final ShowProcessListRequestEvent 
event) {
         BatchYamlExecuteProcessContext batchYamlExecuteProcessContext = new 
BatchYamlExecuteProcessContext(new ArrayList<>(
-                
ShowProcessListManager.getInstance().getProcessContextMap().values()));
+                
ShowProcessListManager.getInstance().getProcessContexts().values()));
         eventBusContext.post(new 
ShowProcessListResponseEvent(batchYamlExecuteProcessContext.getContexts().isEmpty()
                 ? Collections.emptyList()
                 : 
Collections.singletonList(YamlEngine.marshal(batchYamlExecuteProcessContext))));
diff --git 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/process/ProcessStandaloneSubscriberTest.java
 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/process/ProcessStandaloneSubscriberTest.java
index 00d7c8ec0de..ae67f24fe23 100644
--- 
a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/process/ProcessStandaloneSubscriberTest.java
+++ 
b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/process/ProcessStandaloneSubscriberTest.java
@@ -55,9 +55,9 @@ public final class ProcessStandaloneSubscriberTest {
     @Test
     public void assertLoadShowProcessListData() {
         ShowProcessListRequestEvent showProcessListRequestEvent = 
mock(ShowProcessListRequestEvent.class);
-        
when(showProcessListManager.getProcessContextMap()).thenReturn(Collections.emptyMap());
+        
when(showProcessListManager.getProcessContexts()).thenReturn(Collections.emptyMap());
         
processRegistrySubscriber.loadShowProcessListData(showProcessListRequestEvent);
-        verify(showProcessListManager, times(1)).getProcessContextMap();
+        verify(showProcessListManager, times(1)).getProcessContexts();
     }
     
     @After
diff --git 
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
 
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
index aa46ce147a7..75a77c29714 100644
--- 
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
+++ 
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/admin/mysql/executor/KillProcessExecutor.java
@@ -30,10 +30,10 @@ import java.sql.SQLException;
  */
 public final class KillProcessExecutor implements DatabaseAdminExecutor {
     
-    private final MySQLKillStatement mySQLKillStatement;
+    private final MySQLKillStatement killStatement;
     
     public KillProcessExecutor(final MySQLKillStatement sqlStatement) {
-        this.mySQLKillStatement = sqlStatement;
+        this.killStatement = sqlStatement;
     }
     
     /**
@@ -44,7 +44,7 @@ public final class KillProcessExecutor implements 
DatabaseAdminExecutor {
      */
     @Override
     public void execute(final ConnectionSession connectionSession) throws 
SQLException {
-        String processlistId = mySQLKillStatement.getProcesslistId();
+        String processlistId = killStatement.getProcesslistId();
         
ProxyContext.getInstance().getContextManager().getInstanceContext().getEventBusContext().post(new
 KillProcessIdRequestEvent(processlistId));
     }
 }
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/general/PostgreSQLMigrationGeneralIT.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/general/PostgreSQLMigrationGeneralIT.java
index 05f4999191d..641fff7b910 100644
--- 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/general/PostgreSQLMigrationGeneralIT.java
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/general/PostgreSQLMigrationGeneralIT.java
@@ -104,7 +104,7 @@ public final class PostgreSQLMigrationGeneralIT extends 
BaseExtraSQLITCase {
         String jobId = getJobIdByTableName("t_order");
         waitMigrationFinished(jobId);
         stopMigrationByJobId(jobId);
-        sourceExecuteWithLog(String.format("INSERT INTO %s.t_order 
(id,order_id,user_id,status) VALUES (%s, %s, %s, '%s')", SCHEMA_NAME, 
KEY_GENERATE_ALGORITHM.generateKey(), 
+        sourceExecuteWithLog(String.format("INSERT INTO %s.t_order 
(id,order_id,user_id,status) VALUES (%s, %s, %s, '%s')", SCHEMA_NAME, 
KEY_GENERATE_ALGORITHM.generateKey(),
                 System.currentTimeMillis(), 1, "afterStop"));
         startMigrationByJobId(jobId);
         assertCheckMigrationSuccess(jobId);
diff --git 
a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/dumper/ColumnValueReaderFactoryTest.java
 
b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/dumper/ColumnValueReaderFactoryTest.java
index fa5d3703fec..f01a7939519 100644
--- 
a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/dumper/ColumnValueReaderFactoryTest.java
+++ 
b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/ingest/dumper/ColumnValueReaderFactoryTest.java
@@ -35,8 +35,7 @@ public final class ColumnValueReaderFactoryTest {
     public void assertGetInstance() {
         Collection<Pair<String, Class<? extends ColumnValueReader>>> 
paramResult = Arrays.asList(
                 Pair.of("MySQL", MySQLColumnValueReader.class),
-                Pair.of("PostgreSQL", PostgreSQLColumnValueReader.class), 
Pair.of("openGauss", PostgreSQLColumnValueReader.class)
-        );
+                Pair.of("PostgreSQL", PostgreSQLColumnValueReader.class), 
Pair.of("openGauss", PostgreSQLColumnValueReader.class));
         for (Pair<String, Class<? extends ColumnValueReader>> each : 
paramResult) {
             ColumnValueReader actual = 
ColumnValueReaderFactory.getInstance(each.getKey());
             assertThat(actual, instanceOf(each.getValue()));

Reply via email to