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

aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new d5f144e  [INLONG-1708] Add restrict of @author and Chinese in java 
file (#1709)
d5f144e is described below

commit d5f144e18abfbdafac2d318f274bc42aade254e7
Author: Wenjun Ruan <[email protected]>
AuthorDate: Sun Oct 24 19:30:32 2021 +0800

    [INLONG-1708] Add restrict of @author and Chinese in java file (#1709)
---
 codestyle/checkstyle.xml                           | 13 ++++++++++++
 .../org/apache/inlong/agent/conf/JobProfile.java   |  2 +-
 .../java/org/apache/inlong/commons/msg/TDMsg1.java |  4 +---
 .../apache/inlong/dataproxy/sink/PulsarSink.java   |  1 -
 .../pojo/commonserver/CommonDbServerInfo.java      |  2 +-
 .../pojo/datasource/SourceFileDetailListVO.java    |  2 +-
 .../common/pojo/datastorage/StorageExtInfo.java    |  2 +-
 .../manager/service/core/StorageService.java       |  2 +-
 .../core/impl/CommonDBServerServiceImpl.java       |  2 +-
 .../service/core/impl/StorageBaseOperation.java    |  2 +-
 .../manager/web/config/RestTemplateConfig.java     |  2 +-
 .../web/controller/CommonDBServerController.java   |  4 ++--
 .../web/controller/CommonFileServerController.java |  4 ++--
 .../output/ClickHouseShardOutputFormat.java        |  2 +-
 .../inlong/tubemq/corebase/utils/TStringUtils.java |  2 +-
 .../server/broker/msgstore/MessageStore.java       |  2 +-
 .../broker/msgstore/disk/FileSegmentList.java      |  2 +-
 .../server/broker/msgstore/disk/MsgFileStore.java  |  6 +++---
 .../server/broker/msgstore/mem/MsgMemStore.java    | 24 +++++++++++-----------
 .../server/master/balance/DefaultLoadBalancer.java |  4 ++--
 .../server/master/bdbstore/MasterNodeInfo.java     |  2 +-
 .../bdbentitys/BdbConsumeGroupSettingEntity.java   |  2 +-
 .../bdbentitys/BdbGroupFlowCtrlEntity.java         |  2 +-
 .../bdbentitys/BdbTopicAuthControlEntity.java      |  2 +-
 .../bdbstore/bdbentitys/BdbTopicConfEntity.java    |  2 +-
 25 files changed, 52 insertions(+), 42 deletions(-)

diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml
index 800741b..dc47976 100644
--- a/codestyle/checkstyle.xml
+++ b/codestyle/checkstyle.xml
@@ -23,6 +23,19 @@
 
     <property name="severity" value="error"/>
 
+    <module name="RegexpSingleline">
+        <property name="format" value="^\s*\*\s*@author"/>
+        <property name="minimum" value="0"/>
+        <property name="maximum" value="0"/>
+        <property name="message" value="ASF project doesn't allow @author 
copyright."/>
+    </module>
+
+    <module name="RegexpSingleline">
+        <property name="format"
+                  
value=".*[\u3400-\u4DB5\u4E00-\u9FA5\u9FA6-\u9FBB\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9\uFF00-\uFFEF\u2E80-\u2EFF\u3000-\u303F\u31C0-\u31EF]+.*"/>
+        <property name="message" value="Chinese characters are not allowed!"/>
+    </module>
+
     <property name="fileExtensions" value="java, properties, xml"/>
     <!-- Excludes all 'module-info.java' files              -->
     <!-- See https://checkstyle.org/config_filefilters.html -->
diff --git 
a/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/conf/JobProfile.java
 
b/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/conf/JobProfile.java
index bf3fbc4..df3092d 100644
--- 
a/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/conf/JobProfile.java
+++ 
b/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/conf/JobProfile.java
@@ -29,7 +29,7 @@ public class JobProfile extends AbstractConfiguration {
     private final Gson gson = new Gson();
 
     /**
-     * parse json string to configuration instance。
+     * parse json string to configuration instance.
      *
      * @param jsonStr
      * @return job configuration
diff --git 
a/inlong-common/src/main/java/org/apache/inlong/commons/msg/TDMsg1.java 
b/inlong-common/src/main/java/org/apache/inlong/commons/msg/TDMsg1.java
index 8919f99..4257854 100644
--- a/inlong-common/src/main/java/org/apache/inlong/commons/msg/TDMsg1.java
+++ b/inlong-common/src/main/java/org/apache/inlong/commons/msg/TDMsg1.java
@@ -261,7 +261,6 @@ public class TDMsg1 {
         return addMsg(attr, ByteBuffer.wrap(data));
     }
 
-    /* 新增支持新数据消息 */
     public boolean addMsg(byte[] data) {
         return addMsg(ByteBuffer.wrap(data));
     }
@@ -300,7 +299,6 @@ public class TDMsg1 {
     }
 
     private boolean checkBinData(ByteBuffer data) {
-        // 检查消息合法性
         int totalLen = data.getInt(BIN_MSG_TOTALLEN_OFFSET);
         int bodyLen = data.getInt(BIN_MSG_BODYLEN_OFFSET);
         int attrLen = data.getShort(BIN_MSG_BODY_OFFSET + bodyLen);
@@ -682,7 +680,7 @@ public class TDMsg1 {
             parsedInput.skip(len - 1);
 
             while (bodyBuffer.remaining() > 0) {
-                // total message length = (data length + attributes length) * N
+                // total message length = (data length + attributes length) * N
                 int singleTotalLen = bodyBuffer.getInt();
                 if (singleTotalLen > bodyBuffer.remaining()) {
                     return;
diff --git 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/PulsarSink.java
 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/PulsarSink.java
index 2a180e8..e56853a 100644
--- 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/PulsarSink.java
+++ 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/PulsarSink.java
@@ -192,7 +192,6 @@ public class PulsarSink extends AbstractSink implements 
Configurable,
     private static final  LoadingCache<String, Long> agentIdCache = 
CacheBuilder.newBuilder()
             .concurrencyLevel(4 * 
8).initialCapacity(500).expireAfterAccess(30, TimeUnit.SECONDS)
             .build(new CacheLoader<String, Long>() {
-                //默认的数据加载实现,当调用get取值时,如果key没有对应的值,则调用此方法进行加载。
                 @Override
                 public Long load(String key) {
                     return System.currentTimeMillis();
diff --git 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/commonserver/CommonDbServerInfo.java
 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/commonserver/CommonDbServerInfo.java
index 3c7846c..eb6c621 100644
--- 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/commonserver/CommonDbServerInfo.java
+++ 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/commonserver/CommonDbServerInfo.java
@@ -40,7 +40,7 @@ public class CommonDbServerInfo {
     @ApiModelProperty("connection alias name")
     private String connectionName;
 
-    @ApiModelProperty("DB type, like: MySQL、Oracle")
+    @ApiModelProperty("DB type, like: MySQL, Oracle")
     private String dbType;
 
     @ApiModelProperty("DB Server IP")
diff --git 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datasource/SourceFileDetailListVO.java
 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datasource/SourceFileDetailListVO.java
index f8e7be3..35032b3 100644
--- 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datasource/SourceFileDetailListVO.java
+++ 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datasource/SourceFileDetailListVO.java
@@ -42,7 +42,7 @@ public class SourceFileDetailListVO {
     @ApiModelProperty(value = "Data source port")
     private Integer port;
 
-    @ApiModelProperty(value = "Issue type, including: SSH、TCS")
+    @ApiModelProperty(value = "Issue type, including: SSH, TCS")
     private String issueType;
 
     @ApiModelProperty(value = "Access type, support: Agent, DataProxy Client, 
LoadProxy, the File can only be Agent")
diff --git 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datastorage/StorageExtInfo.java
 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datastorage/StorageExtInfo.java
index cac8852..cb278a5 100644
--- 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datastorage/StorageExtInfo.java
+++ 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/datastorage/StorageExtInfo.java
@@ -32,7 +32,7 @@ public class StorageExtInfo {
     @ApiModelProperty("key")
     private Integer id;
 
-    @ApiModelProperty("storage type, like: HDFS、HIVE")
+    @ApiModelProperty("storage type, like: HDFS, HIVE")
     private String storageType;
 
     @ApiModelProperty("storage id")
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/StorageService.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/StorageService.java
index ec6c16d..00fe0bf 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/StorageService.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/StorageService.java
@@ -52,7 +52,7 @@ public interface StorageService {
      * Query storage information based on business and data stream identifiers
      *
      * @param bid Business identifier
-     * @param dsid Data stream identifier,Can be empty
+     * @param dsid Data stream identifier, Can be empty
      * @return Store information list
      * @apiNote Storage types only support temporarily: HIVE
      */
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/CommonDBServerServiceImpl.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/CommonDBServerServiceImpl.java
index a260bbe..9c42856 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/CommonDBServerServiceImpl.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/CommonDBServerServiceImpl.java
@@ -85,7 +85,7 @@ public class CommonDBServerServiceImpl implements 
CommonDBServerService {
         // Check validity
         checkValidity(info);
 
-        // Check for duplicates based on username 、dbType 、dbServerIp and port
+        // Check for duplicates based on username, dbType, dbServerIp and port
         List<CommonDbServerEntity> entities = 
commonDbServerMapper.selectByUsernameAndIpPort(
                 info.getUsername(),
                 info.getDbType(),
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/StorageBaseOperation.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/StorageBaseOperation.java
index cfc9d42..4c523bc 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/StorageBaseOperation.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/StorageBaseOperation.java
@@ -90,7 +90,7 @@ public class StorageBaseOperation {
      * heck whether the business status is temporary
      *
      * @param bid Business identifier
-     * @return Business entity,For caller reuse
+     * @return Business entity, For caller reuse
      */
     public BusinessEntity checkBizIsTempStatus(String bid) {
         BusinessEntity businessEntity = businessMapper.selectByIdentifier(bid);
diff --git 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/config/RestTemplateConfig.java
 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/config/RestTemplateConfig.java
index 11e35e7..cfc85d3 100644
--- 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/config/RestTemplateConfig.java
+++ 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/config/RestTemplateConfig.java
@@ -75,7 +75,7 @@ public class RestTemplateConfig {
 
     @Bean
     public PoolingHttpClientConnectionManager httpClientConnectionManager() {
-        // Support HTTP、HTTPS
+        // Support HTTP, HTTPS
         Registry<ConnectionSocketFactory> registry = 
RegistryBuilder.<ConnectionSocketFactory>create()
                 .register("http", 
PlainConnectionSocketFactory.getSocketFactory())
                 .register("https", 
SSLConnectionSocketFactory.getSocketFactory())
diff --git 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonDBServerController.java
 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonDBServerController.java
index a6cca8f..fd7ff67 100644
--- 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonDBServerController.java
+++ 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonDBServerController.java
@@ -207,7 +207,7 @@ public class CommonDBServerController {
     public String upload(@RequestParam("file") MultipartFile file) throws 
Exception {
         Preconditions.checkFalse(file.isEmpty(), "File cannot be empty");
         String fileName = file.getOriginalFilename();
-        LOGGER.info("The name of the uploaded file is:" + fileName);
+        LOGGER.info("The name of the uploaded file is: " + fileName);
 
         String filePath = 
ClassUtils.getDefaultClassLoader().getResource("").getPath();
         File fileDir = new File(filePath, "common_server");
@@ -251,7 +251,7 @@ public class CommonDBServerController {
                 }
 
                 StringBuilder sb = new StringBuilder();
-                sb.append("csv format,The fields are connectionName, dbType, 
dbServerIp, port, dbName, "
+                sb.append("csv format, The fields are connectionName, dbType, 
dbServerIp, port, dbName, "
                         + "username, password, hasSelect, hasInsert, 
hasUpdate, hasDelete, inCharges, "
                         + "isRegionId, dbDescription, backupDbServerIp, 
backupDbPort, visiblePerson, visibleGroup\n");
                 sb.append("Incorrect data check\n");
diff --git 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonFileServerController.java
 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonFileServerController.java
index 629169e..5a5a4cb 100644
--- 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonFileServerController.java
+++ 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/CommonFileServerController.java
@@ -227,7 +227,7 @@ public class CommonFileServerController {
     public String upload(@RequestParam("file") MultipartFile file) throws 
Exception {
         Preconditions.checkFalse(file.isEmpty(), "File cannot be empty");
         String fileName = file.getOriginalFilename();
-        LOGGER.info("The name of the upload file is:" + fileName);
+        LOGGER.info("The name of the upload file is: " + fileName);
 
         String filePath = 
ClassUtils.getDefaultClassLoader().getResource("").getPath();
         File fileDir = new File(filePath, "common_server");
@@ -269,7 +269,7 @@ public class CommonFileServerController {
                     return "Failed, the number of data exceeds the upper limit 
[10000]";
                 }
                 StringBuilder sb = new StringBuilder();
-                sb.append("csv format,The fields are  ip, port, type, 
isInnerIp, issueType, username, password, "
+                sb.append("csv format, The fields are  ip, port, type, 
isInnerIp, issueType, username, password, "
                         + "visiblePerson, visibleGroup\n");
                 sb.append("Incorrect data check\n");
                 // check
diff --git 
a/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
 
b/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
index 4eca329..0138988 100644
--- 
a/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
+++ 
b/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
@@ -168,7 +168,7 @@ public class ClickHouseShardOutputFormat extends 
AbstractClickHouseOutputFormat
             }
             connectionProvider.closeConnections();
         } catch (SQLException se) {
-            LOG.warn("ClickHouse connection could not be closed!", se);
+            LOG.warn("ClickHouse connection could not be closed!", se);
         }
     }
 }
diff --git 
a/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/utils/TStringUtils.java
 
b/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/utils/TStringUtils.java
index b3146db..df26b5c 100644
--- 
a/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/utils/TStringUtils.java
+++ 
b/inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/utils/TStringUtils.java
@@ -78,7 +78,7 @@ public class TStringUtils {
      *
      * @param origStr The string to be converted
      * @return Convert the string to Camel Case
-     * if it is <code>null</code>,return<code>null</code>
+     * if it is <code>null</code>, return<code>null</code>
      */
     public static String toCamelCase(String origStr) {
         if (isEmpty(origStr)) {
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/MessageStore.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/MessageStore.java
index 4d2d7fd..22b330f 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/MessageStore.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/MessageStore.java
@@ -184,7 +184,7 @@ public class MessageStore implements Closeable {
         reqSwitch = (reqSwitch <= 0)
                 ? 0 : (consumerNodeInfo.isFilterConsume() ? (reqSwitch % 100) 
: (reqSwitch / 100));
         if (reqSwitch > 1) {
-            // in read memory situation, read main memory or backup memory by 
consumer's config.
+            // in read memory situation, read main memory or backup memory by 
consumer's config.
             long maxIndexOffset = TBaseConstants.META_VALUE_UNDEFINED;
             if (requestOffset >= this.msgFileStore.getIndexMaxOffset()) {
                 this.writeCacheMutex.readLock().lock();
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java
index 01f9dbe..386a4c9 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/FileSegmentList.java
@@ -114,7 +114,7 @@ public class FileSegmentList implements SegmentList {
      */
     @Override
     public void delExpiredSegments(final StringBuilder sb) {
-        // delete expired segment
+        // delete expired segment
         for (Segment segment : segmentList.get()) {
             if (segment == null) {
                 continue;
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/MsgFileStore.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/MsgFileStore.java
index d3a1398..0de1588 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/MsgFileStore.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/disk/MsgFileStore.java
@@ -115,7 +115,7 @@ public class MsgFileStore implements Closeable {
     public void batchAppendMsg(final StringBuilder sb, final int msgCnt,
                                final int indexSize, final ByteBuffer 
indexBuffer,
                                final int dataSize, final ByteBuffer 
dataBuffer) throws Throwable {
-        // append message, put in data file first, then index file.
+        // append message, put in data file first, then index file.
         if (this.closed.get()) {
             throw new IllegalStateException(new StringBuilder(512)
                 .append("Closed MessageStore for storeKey ")
@@ -236,7 +236,7 @@ public class MsgFileStore implements Closeable {
                                         final String statisKeyBase,
                                         final int maxMsgTransferSize) {
         // #lizard forgives
-        // Orderly read from index file, then random read from data file.
+        // Orderly read from index file, then random read from data file.
         int retCode = 0;
         int totalSize = 0;
         String errInfo = "Ok";
@@ -574,7 +574,7 @@ public class MsgFileStore implements Closeable {
     }
 
     private void validateSegments(final String segTypeStr, final List<Segment> 
segments) {
-        // valid segments, continuous
+        // valid segments, continuous
         for (int i = 0; i < segments.size() - 1; i++) {
             final Segment curr = segments.get(i);
             final Segment next = segments.get(i + 1);
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/mem/MsgMemStore.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/mem/MsgMemStore.java
index f3442f9..afac6f3 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/mem/MsgMemStore.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/msgstore/mem/MsgMemStore.java
@@ -42,18 +42,18 @@ import sun.nio.ch.DirectBuffer;
  */
 public class MsgMemStore implements Closeable {
     private static final Logger logger = 
LoggerFactory.getLogger(MsgMemStore.class);
-    // statistics of memory store
+    // statistics of memory store
     private final AtomicInteger cacheDataOffset = new AtomicInteger(0);
     private final AtomicInteger cacheIndexOffset = new AtomicInteger(0);
     private final AtomicInteger curMessageCount = new AtomicInteger(0);
     private final ReentrantLock writeLock = new ReentrantLock();
-    // partitionId to index position, accelerate query
+    // partitionId to index position, accelerate query
     private final ConcurrentHashMap<Integer, Integer> queuesMap =
             new ConcurrentHashMap<>(20);
-    // key to index position, used for filter consume
+    // key to index position, used for filter consume
     private final ConcurrentHashMap<Integer, Integer> keysMap =
             new ConcurrentHashMap<>(100);
-    // where messages in memory will sink to disk
+    // where messages in memory will sink to disk
     private int maxDataCacheSize;
     private long writeDataStartPos = -1;
     private ByteBuffer cacheDataSegment;
@@ -87,7 +87,7 @@ public class MsgMemStore implements Closeable {
         long dataOffset = TBaseConstants.META_VALUE_UNDEFINED;
         this.writeLock.lock();
         try {
-            // judge whether can write to memory or not.
+            // judge whether can write to memory or not.
             if ((fullDataSize = (this.cacheDataOffset.get() + entryLength > 
this.maxDataCacheSize))
                 || (fullIndexSize =
                 (this.cacheIndexOffset.get() + 
DataStoreUtils.STORE_INDEX_HEAD_LEN > this.maxIndexCacheSize))
@@ -141,7 +141,7 @@ public class MsgMemStore implements Closeable {
         // #lizard forgives
         Integer lastWritePos = 0;
         boolean hasMsg = false;
-        // judge memory contains the given offset or not.
+        // judge memory contains the given offset or not.
         List<ByteBuffer> cacheMsgList = new ArrayList<>();
         if (lstRdIndexOffset < this.writeIndexStartPos) {
             return new GetCacheMsgResult(false, TErrCodeConstants.MOVED,
@@ -159,7 +159,7 @@ public class MsgMemStore implements Closeable {
         this.writeLock.lock();
         try {
             if (isFilterConsume) {
-                // filter conduct. accelerate by keysMap.
+                // filter conduct. accelerate by keysMap.
                 for (Integer keyCode : filterKeySet) {
                     if (keyCode != null) {
                         lastWritePos = this.keysMap.get(keyCode);
@@ -194,7 +194,7 @@ public class MsgMemStore implements Closeable {
                         limitReadSize, lastDataRdOff, totalReadSize, 
cacheMsgList);
             }
         }
-        // fetch data by index.
+        // fetch data by index.
         int readedSize = 0;
         int cPartitionId = 0;
         long cDataPos = 0L;
@@ -204,10 +204,10 @@ public class MsgMemStore implements Closeable {
         int cDataOffset = 0;
         ByteBuffer tmpIndexRdBuf = this.cachedIndexSegment.asReadOnlyBuffer();
         ByteBuffer tmpDataRdBuf = this.cacheDataSegment.asReadOnlyBuffer();
-        // loop read by index
+        // loop read by index
         for (int count = 0; count < maxReadCount;
              count++, startReadOff += DataStoreUtils.STORE_INDEX_HEAD_LEN) {
-            // cannot find matched message, return
+            // cannot find matched message, return
             if ((startReadOff >= currIndexOffset)
                 || (startReadOff + DataStoreUtils.STORE_INDEX_HEAD_LEN > 
currIndexOffset)) {
                 break;
@@ -220,7 +220,7 @@ public class MsgMemStore implements Closeable {
             cKeyCode = tmpIndexRdBuf.getInt();
             cTimeRecv = tmpIndexRdBuf.getLong();
             cDataOffset = (int) (cDataPos - this.writeDataStartPos);
-            // skip when mismatch condition
+            // skip when mismatch condition
             if ((cDataOffset < 0)
                     || (cDataSize <= 0)
                     || (cDataOffset >= currDataOffset)
@@ -234,7 +234,7 @@ public class MsgMemStore implements Closeable {
                 readedSize += DataStoreUtils.STORE_INDEX_HEAD_LEN;
                 continue;
             }
-            // read data file.
+            // read data file.
             byte[] tmpArray = new byte[cDataSize];
             final ByteBuffer buffer = ByteBuffer.wrap(tmpArray);
             tmpDataRdBuf.position(cDataOffset);
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/balance/DefaultLoadBalancer.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/balance/DefaultLoadBalancer.java
index 9a748c8..c8bfdab 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/balance/DefaultLoadBalancer.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/balance/DefaultLoadBalancer.java
@@ -77,7 +77,7 @@ public class DefaultLoadBalancer implements LoadBalancer {
             int defAllowBClientRate,
             StringBuilder strBuffer) {
         // #lizard forgives
-        // load balance according to group
+        // load balance according to group
         Map<String/* consumer */,
                 Map<String/* topic */, List<Partition>>> finalSubInfoMap =
                 new HashMap<>();
@@ -196,7 +196,7 @@ public class DefaultLoadBalancer implements LoadBalancer {
                     }
                 }
             }
-            // random allocate
+            // random allocate
             if (!partMap.isEmpty()) {
                 onlineOfflineGroupSet.add(group);
                 if (!newConsumerList2.isEmpty()) {
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/MasterNodeInfo.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/MasterNodeInfo.java
index a80c191..69a82de 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/MasterNodeInfo.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/MasterNodeInfo.java
@@ -22,7 +22,7 @@ public class MasterNodeInfo {
     private String nodeName;
     private String hostName;
     private int port;
-    private int nodeStatus = 0; // -1:invalid;0:replica; 1:master
+    private int nodeStatus = 0; // -1:invalid; 0: replica; 1: master
 
     public MasterNodeInfo() {
 
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbConsumeGroupSettingEntity.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbConsumeGroupSettingEntity.java
index fa54ad4..6be658c 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbConsumeGroupSettingEntity.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbConsumeGroupSettingEntity.java
@@ -33,7 +33,7 @@ public class BdbConsumeGroupSettingEntity implements 
Serializable {
     private static final long serialVersionUID = 6801442997689232316L;
     @PrimaryKey
     private String consumeGroupName;
-    private int enableBind = -2;   // -2: undefine; 0: not started,1: started
+    private int enableBind = -2;   // -2: undefine; 0: not started, 1: started
     private Date lastBindUsedDate;
     private int allowedBrokerClientRate = -2;
     private String attributes;
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbGroupFlowCtrlEntity.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbGroupFlowCtrlEntity.java
index aa6dbd2..a317c7e 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbGroupFlowCtrlEntity.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbGroupFlowCtrlEntity.java
@@ -35,7 +35,7 @@ public class BdbGroupFlowCtrlEntity implements Serializable {
     @PrimaryKey
     private String groupName;           //group name
     private long serialId = -1L;        //serial id
-    private int statusId = -1;         // 0:not active; 1:active
+    private int statusId = -1;         // 0:not active; 1: active
     private String flowCtrlInfo;
     private int ruleCnt = 0;            //flow control rule count
     private long ssdTranslateId = System.currentTimeMillis();
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicAuthControlEntity.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicAuthControlEntity.java
index 6bb20d5..f467236 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicAuthControlEntity.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicAuthControlEntity.java
@@ -33,7 +33,7 @@ public class BdbTopicAuthControlEntity implements 
Serializable {
     private static final long serialVersionUID = 7356175918639562340L;
     @PrimaryKey
     private String topicName;
-    private int enableAuthControl = -1; // -1 : undefine; 0:disable, 1:enable
+    private int enableAuthControl = -1; // -1 : undefine; 0: disable, 1: enable
     // ** Based on the data compatibility consideration of the original 
version:
     //     the creation information in this example is the last modified 
information,
     //     and the modified information is the creation information
diff --git 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
index 47ba4f0..32740f6 100644
--- 
a/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
+++ 
b/inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
@@ -35,7 +35,7 @@ public class BdbTopicConfEntity implements Serializable {
 
     @PrimaryKey
     private String recordKey;
-    private int topicStatusId = 0; // topic status,0: valid,1: soft deleted
+    private int topicStatusId = 0; // topic status, 0: valid, 1: soft deleted
     private int brokerId = -2;      //broker id
     private String brokerIp;        //broker ip
     private int brokerPort;         //broker port

Reply via email to