From e4739bf28b557e9d43604d2ab8ceb66c321ae3bf Mon Sep 17 00:00:00 2001 From: ylinzhu <46126022+ylinzhu@users.noreply.github.com> Date: Thu, 23 Mar 2023 17:41:37 +0800 Subject: [PATCH] fix comma format inner 2159 --- .../helper/GetAndSyncDbInstanceKeyVariables.java | 2 +- .../actiontech/dble/config/model/SystemConfig.java | 4 ++-- .../dble/config/util/ParameterMapping.java | 2 +- .../actiontech/dble/meta/DDLProxyMetaManager.java | 2 +- .../dble/plan/optimizer/JoinChooser.java | 14 +++++++------- .../parser/druid/ServerSchemaStatVisitor.java | 2 +- .../dble/rwsplit/RWSplitNonBlockingSession.java | 2 +- .../actiontech/dble/server/status/GeneralLog.java | 2 +- .../actiontech/dble/services/BackendService.java | 2 +- .../actiontech/dble/services/FrontendService.java | 4 ++-- .../manager/information/tables/DbleDbInstance.java | 2 +- .../services/manager/response/ReloadConfig.java | 8 ++++---- .../dble/singleton/PauseShardingNodeManager.java | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/actiontech/dble/config/helper/GetAndSyncDbInstanceKeyVariables.java b/src/main/java/com/actiontech/dble/config/helper/GetAndSyncDbInstanceKeyVariables.java index 3630b0493..125abdee6 100644 --- a/src/main/java/com/actiontech/dble/config/helper/GetAndSyncDbInstanceKeyVariables.java +++ b/src/main/java/com/actiontech/dble/config/helper/GetAndSyncDbInstanceKeyVariables.java @@ -72,7 +72,7 @@ public class GetAndSyncDbInstanceKeyVariables implements Callable if (!await) { fail = true; isFinish = true; - LOGGER.warn("test conn timeout,TCP connection may be lost"); + LOGGER.warn("test conn timeout,TCP connection may be lost"); } } } catch (InterruptedException e) { diff --git a/src/main/java/com/actiontech/dble/config/model/SystemConfig.java b/src/main/java/com/actiontech/dble/config/model/SystemConfig.java index 201706b64..1fed0d11e 100644 --- a/src/main/java/com/actiontech/dble/config/model/SystemConfig.java +++ b/src/main/java/com/actiontech/dble/config/model/SystemConfig.java @@ -1799,7 +1799,7 @@ public final class SystemConfig { } int length = 11; if (val.length() > length) { - problemReporter.warn("Property [ " + name + " ] " + val + " in bootstrap.cnf is illegal,the value contains a maximum of " + length + " characters"); + problemReporter.warn("Property [ " + name + " ] " + val + " in bootstrap.cnf is illegal,the value contains a maximum of " + length + " characters"); } String chinese = val.replaceAll(DBConverter.PATTERN_DB.toString(), ""); @@ -1808,7 +1808,7 @@ public final class SystemConfig { } if (!StringUtil.isChinese(chinese)) { - problemReporter.warn("Property [ " + name + " ] " + val + " in bootstrap.cnf is illegal,the " + Charset.defaultCharset().name() + " encoding is recommended, Property [ " + name + " ] show be use u4E00-u9FA5a-zA-Z_0-9\\-\\."); + problemReporter.warn("Property [ " + name + " ] " + val + " in bootstrap.cnf is illegal,the " + Charset.defaultCharset().name() + " encoding is recommended, Property [ " + name + " ] show be use u4E00-u9FA5a-zA-Z_0-9\\-\\."); } } } diff --git a/src/main/java/com/actiontech/dble/config/util/ParameterMapping.java b/src/main/java/com/actiontech/dble/config/util/ParameterMapping.java index d88f9f8cd..f00a2061e 100644 --- a/src/main/java/com/actiontech/dble/config/util/ParameterMapping.java +++ b/src/main/java/com/actiontech/dble/config/util/ParameterMapping.java @@ -211,7 +211,7 @@ public final class ParameterMapping { throw (RuntimeException) targetException; } } - // won't happen generally,If it still happens ,maybe throw an exception and stop process is a good idea. + // won't happen generally,If it still happens ,maybe throw an exception and stop process is a good idea. LOGGER.info("valueofError", t); throw new IllegalStateException(t); } diff --git a/src/main/java/com/actiontech/dble/meta/DDLProxyMetaManager.java b/src/main/java/com/actiontech/dble/meta/DDLProxyMetaManager.java index 5b75b016b..91f83b72e 100644 --- a/src/main/java/com/actiontech/dble/meta/DDLProxyMetaManager.java +++ b/src/main/java/com/actiontech/dble/meta/DDLProxyMetaManager.java @@ -66,7 +66,7 @@ public final class DDLProxyMetaManager { ClusterHelper clusterHelper = ClusterHelper.getInstance(ClusterOperation.DDL); DistributeLock lock = clusterHelper.createDistributeLock(ddlLockPathMeta, ddlInfo); if (!lock.acquire()) { - DDLTraceHelper.log(shardingService, d -> d.info(DDLTraceHelper.Stage.notice_cluster_ddl_prepare, "Failed to acquire table[" + tableFullName + "]'s ddlLock,the ddlLock's path is " + ddlLockPathMeta)); + DDLTraceHelper.log(shardingService, d -> d.info(DDLTraceHelper.Stage.notice_cluster_ddl_prepare, "Failed to acquire table[" + tableFullName + "]'s ddlLock,the ddlLock's path is " + ddlLockPathMeta)); String msg = "Found another instance doing ddl, duo to table[" + tableFullName + "]'s ddlLock is exists"; throw new Exception(msg); } diff --git a/src/main/java/com/actiontech/dble/plan/optimizer/JoinChooser.java b/src/main/java/com/actiontech/dble/plan/optimizer/JoinChooser.java index ea3d9a63c..37d54c64e 100644 --- a/src/main/java/com/actiontech/dble/plan/optimizer/JoinChooser.java +++ b/src/main/java/com/actiontech/dble/plan/optimizer/JoinChooser.java @@ -45,11 +45,11 @@ public class JoinChooser { private final HintPlanInfo hintPlanInfo; private final Comparator defaultCmp = (o1, o2) -> { if (o1.relations.erRelationLst.size() > 0 && o2.relations.erRelationLst.size() > 0) { - if (o1.relations.isInner == o2.relations.isInner) { // both er,both inner or not inner + if (o1.relations.isInner == o2.relations.isInner) { // both er,both inner or not inner return 0; - } else if (o1.relations.isInner) { // both er,o1 inner,o2 notinner + } else if (o1.relations.isInner) { // both er,o1 inner,o2 notinner return -1; - } else { //if (o2.relations.isInner) { both er,o1 not inner,o2 inner + } else { //if (o2.relations.isInner) { both er,o1 not inner,o2 inner return 1; } } else if (o1.relations.erRelationLst.size() > 0) { // if o2 is not ER join, o1 is ER join, o1b->c->d and the hint is c->d->b->a. we choose 'c' as root, then dag like this (c->d) & (c->b<-a) - when visited c. b is one of rightNodes of c, and the degree of b is 2. + when visited c. b is one of rightNodes of c, and the degree of b is 2. */ // if (rightNode.degree == 0) { nextAccessDagNodes.put(rightNode, new DagLine(currentNode, rightNode)); diff --git a/src/main/java/com/actiontech/dble/route/parser/druid/ServerSchemaStatVisitor.java b/src/main/java/com/actiontech/dble/route/parser/druid/ServerSchemaStatVisitor.java index b44632897..b0a3d4e38 100644 --- a/src/main/java/com/actiontech/dble/route/parser/druid/ServerSchemaStatVisitor.java +++ b/src/main/java/com/actiontech/dble/route/parser/druid/ServerSchemaStatVisitor.java @@ -355,7 +355,7 @@ public class ServerSchemaStatVisitor extends MySqlSchemaStatVisitor { public boolean visit(SQLUnaryExpr x) { switch (x.getOperator()) { case Not: - // It doesn't match now it might match in the future,don't delete + // It doesn't match now it might match in the future,don't delete case NOT: case Compl: return false; diff --git a/src/main/java/com/actiontech/dble/rwsplit/RWSplitNonBlockingSession.java b/src/main/java/com/actiontech/dble/rwsplit/RWSplitNonBlockingSession.java index 5cb7e7bcf..a4bc31f93 100644 --- a/src/main/java/com/actiontech/dble/rwsplit/RWSplitNonBlockingSession.java +++ b/src/main/java/com/actiontech/dble/rwsplit/RWSplitNonBlockingSession.java @@ -148,7 +148,7 @@ public class RWSplitNonBlockingSession extends Session { if (this.getPreWriteResponseTime() > 0 && System.currentTimeMillis() - this.getPreWriteResponseTime() <= rwStickyTime) { isMaster = true; if (LOGGER.isDebugEnabled()) { - LOGGER.debug("because in the sticky time range,so select write instance"); + LOGGER.debug("because in the sticky time range,so select write instance"); } } else { resetLastSqlResponseTime(); diff --git a/src/main/java/com/actiontech/dble/server/status/GeneralLog.java b/src/main/java/com/actiontech/dble/server/status/GeneralLog.java index d5efb8d7f..bfe19cda6 100644 --- a/src/main/java/com/actiontech/dble/server/status/GeneralLog.java +++ b/src/main/java/com/actiontech/dble/server/status/GeneralLog.java @@ -31,7 +31,7 @@ public final class GeneralLog { try { this.generalLogFile = file.getCanonicalPath(); } catch (IOException e) { - LOGGER.warn("Invalid generalLogFile path configuration,exception: {}", e); + LOGGER.warn("Invalid generalLogFile path configuration,exception: {}", e); this.generalLogFile = file.getAbsolutePath(); } this.generalLogFileSize = SystemConfig.getInstance().getGeneralLogFileSize(); diff --git a/src/main/java/com/actiontech/dble/services/BackendService.java b/src/main/java/com/actiontech/dble/services/BackendService.java index 75316cb25..15fe03f1f 100644 --- a/src/main/java/com/actiontech/dble/services/BackendService.java +++ b/src/main/java/com/actiontech/dble/services/BackendService.java @@ -449,7 +449,7 @@ public abstract class BackendService extends AbstractService { } /** - * Temporary way,it will be revised in the future + * Temporary way,it will be revised in the future * * @param service * @return diff --git a/src/main/java/com/actiontech/dble/services/FrontendService.java b/src/main/java/com/actiontech/dble/services/FrontendService.java index 62cdbab1f..043601edf 100644 --- a/src/main/java/com/actiontech/dble/services/FrontendService.java +++ b/src/main/java/com/actiontech/dble/services/FrontendService.java @@ -53,9 +53,9 @@ public abstract class FrontendService extends AbstractServ // will non null if is dong task private volatile Long doingTaskThread = null; private AtomicLong taskId = new AtomicLong(1); - // current task index,Will increased when every new task is processed。 + // current task index,Will increased when every new task is processed。 private long currentTaskIndex = 0; - // consumed task id,Used to indicate next task id.(this=nextTaskId-1) + // consumed task id,Used to indicate next task id.(this=nextTaskId-1) private volatile long consumedTaskId = 0; // client capabilities private final long clientCapabilities; diff --git a/src/main/java/com/actiontech/dble/services/manager/information/tables/DbleDbInstance.java b/src/main/java/com/actiontech/dble/services/manager/information/tables/DbleDbInstance.java index 3cf93393a..d7dd5ceb9 100644 --- a/src/main/java/com/actiontech/dble/services/manager/information/tables/DbleDbInstance.java +++ b/src/main/java/com/actiontech/dble/services/manager/information/tables/DbleDbInstance.java @@ -562,7 +562,7 @@ public class DbleDbInstance extends ManagerWritableTable { return; } if (!StringUtil.isChinese(chinese)) { - throw new ConfigException("Column [ " + name + " ] " + val + " is illegal,the " + Charset.defaultCharset().name() + " encoding is recommended, Column [ " + name + " ] show be use u4E00-u9FA5a-zA-Z_0-9\\-\\."); + throw new ConfigException("Column [ " + name + " ] " + val + " is illegal,the " + Charset.defaultCharset().name() + " encoding is recommended, Column [ " + name + " ] show be use u4E00-u9FA5a-zA-Z_0-9\\-\\."); } } } diff --git a/src/main/java/com/actiontech/dble/services/manager/response/ReloadConfig.java b/src/main/java/com/actiontech/dble/services/manager/response/ReloadConfig.java index e4761cb74..96709a4cb 100644 --- a/src/main/java/com/actiontech/dble/services/manager/response/ReloadConfig.java +++ b/src/main/java/com/actiontech/dble/services/manager/response/ReloadConfig.java @@ -144,7 +144,7 @@ public final class ReloadConfig { } if (!reloadResult) { packetResult.setSuccess(false); - packetResult.setErrorMsg("Reload config failure.The reason is reload interruputed by others,config should be reload"); + packetResult.setErrorMsg("Reload Failure.The reason is reload interruputed by others,config should be reload"); packetResult.setErrorCode(ErrorCode.ER_RELOAD_INTERRUPUTED); return; } @@ -199,7 +199,7 @@ public final class ReloadConfig { try { if (!ReloadManager.startReload(TRIGGER_TYPE_COMMAND, confStatus)) { packetResult.setSuccess(false); - packetResult.setErrorMsg("Reload config failure.The reason is reload status error ,other client or cluster may in reload"); + packetResult.setErrorMsg("Reload Failure.The reason is reload status error ,other client or cluster may in reload"); packetResult.setErrorCode(ErrorCode.ER_YES); return; } @@ -215,7 +215,7 @@ public final class ReloadConfig { return; } else if (!reloadResult) { packetResult.setSuccess(false); - packetResult.setErrorMsg("Reload config failure.The reason is reload interruputed by others,metadata should be reload"); + packetResult.setErrorMsg("Reload Failure.The reason is reload interruputed by others,metadata should be reload"); packetResult.setErrorCode(ErrorCode.ER_RELOAD_INTERRUPUTED); } } finally { @@ -226,7 +226,7 @@ public final class ReloadConfig { private static void writeErrorResult(ManagerService c, String errorMsg) { - String sb = "Reload config failure.The reason is " + errorMsg; + String sb = "Reload Failure.The reason is " + errorMsg; LOGGER.warn(sb); c.writeErrMessage(ErrorCode.ER_YES, sb); } diff --git a/src/main/java/com/actiontech/dble/singleton/PauseShardingNodeManager.java b/src/main/java/com/actiontech/dble/singleton/PauseShardingNodeManager.java index 107482f59..3564ec952 100644 --- a/src/main/java/com/actiontech/dble/singleton/PauseShardingNodeManager.java +++ b/src/main/java/com/actiontech/dble/singleton/PauseShardingNodeManager.java @@ -72,7 +72,7 @@ public final class PauseShardingNodeManager { } /** - * in this implementation, when call this method 'fetchClusterStatus()',the port is already be listened ,but the server has not ready for accept connection yet. So,no FrontConnection will be created, we don't need to call 'waitForSelfPause()' to wait for connection paused; + * in this implementation, when call this method 'fetchClusterStatus()',the port is already be listened ,but the server has not ready for accept connection yet. So,no FrontConnection will be created, we don't need to call 'waitForSelfPause()' to wait for connection paused; * * @throws Exception */