You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by yu...@apache.org on 2021/03/01 09:07:14 UTC

[incubator-tubemq] branch TUBEMQ-469 updated (9de68b6 -> 2045fee)

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

yuanbo pushed a change to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git.


    from 9de68b6  [TUBEMQ-510] Found a bug in MessageProducerExample class
     new 1a69395  rm -Werror
     new f733960  add change
     new 0476e75  [TUBEMQ-511]Replace the conditional operator (?:) with mid()
     new f6ce2be  [TUBEMQ-512] Add package length control based on Topic
     new b130dab  [TUBEMQ-518] fix parameter pass error
     new f25db30  [TUBEMQ-515]Add cluster Topic view web api
     new 71dfa84  [TUBEMQ-517] Add 0.8.0 version release modification to CHANGES.md (#399)
     new bf217f6  [TUBEMQ-526] Adjust the packaging script and version check list, remove the "-WIP" tag
     new 6fa82bf  [TUBEMQ-529] Update CHANGE.md
     new c7ab12a  [TUBEMQ-544]Adjust the LICENSE statement in the client.conf files of Python and C/C++ SDK
     new ffb5205  [TUBEMQ-546]Restore the original license header of the referenced external source files
     new c469352  [TUBEMQ-551] Adjust NOTICE file content
     new 1b0f455  [TUBEMQ-547]Recode the implementation of the *Startup.java classes in the Tool package
     new 444d55a  [TUBEMQ-550] Adjust LICENSE file content
     new ada8bed  [TUBEMQ-550] Adjust LICENSE file content
     new 35c0b45  [TUBEMQ-548] Handle the LICENSE authorization of font files in the resources
     new cd02720  [TUBEMQ-549] Handling the problem of compilation failure
     new 8a56cf2  [TUBEMQ-553]Update the CHANGES.md according to the 0.8.0-RC1 changes (#418)
     new 8a73c16  fix short conversation bug
     new 61b204a  [TUBEMQ-556]Index value is bigger than the actual number of records (#422)
     new d3ca3f0  [TUBEMQ-558] Adjust the LICENSE of the file header (#424)
     new cd21d8f  [TUBEMQ-555] short session data can only be written to a specific partition (addendum) (#423)
     new 97eeead  [TUBEMQ-560] Remove unprepared modules (#426)
     new a080e00  [TUBEMQ-559] Update the LICENSE file according to the 0.8.0-RC2 review (#425)
     new fdb0bd6  [TUBEMQ-561] Update the CHANGES.md according to the 0.8.0-RC2 changes (#428)
     new 5967037  [TUBEMQ-559] Update the LICENSE file according to the 0.8.0-RC2 review (#427)
     new 4c09c1f  [TUBEMQ-562]Update project contents according to the 0.8.0-RC3 review (#429)
     new 7fb91aa  [TUBEMQ-563]Update the CHANGES.md according to the 0.8.0-RC3 changes (#430)
     new 2045fee  [TUBEMQ-565]Replace simple scripts and code implementation (#432)

The 29 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.md                                         |  88 ++
 DISCLAIMER                                         |   6 -
 DISCLAIMER-WIP                                     |  18 +
 LICENSE                                            | 541 ++++++------
 NOTICE                                             | 143 +++-
 bin/broker.sh                                      | 151 ----
 bin/master.sh                                      | 154 ----
 bin/{tubemq => tubemq.sh}                          |   0
 pom.xml                                            |  19 +-
 resources/assets/public/css/fonts/icon.eot         | Bin 2340 -> 0 bytes
 resources/assets/public/css/fonts/icon.svg         |  16 +
 resources/assets/public/css/fonts/icon.ttf         | Bin 2188 -> 0 bytes
 resources/assets/public/css/fonts/icon.woff        | Bin 2264 -> 0 bytes
 resources/assets/public/css/style.css              |   3 +-
 resources/assets/scripts/topicList.js              |   8 +-
 .../tubemq-client-cpp/CMakeLists.txt               |   2 +-
 .../tubemq-client-cpp/conf/client.conf             |  22 +-
 tubemq-client-twins/tubemq-client-cpp/src/any.h    |  21 +-
 tubemq-client-twins/tubemq-client-cpp/src/buffer.h |  22 +-
 .../src/python/tubemq/client.conf                  |  22 +-
 .../client/producer/RoundRobinPartitionRouter.java |   3 +-
 tubemq-connectors/tubemq-connector-flume/pom.xml   |   2 +-
 tubemq-core/pom.xml                                |   4 +
 .../tubemq/corebase/utils/ConcurrentHashSet.java   |  59 +-
 .../apache/tubemq/corebase/utils/MapBackedSet.java |  76 --
 .../apache/tubemq/corebase/utils/TStringUtils.java | 947 ++-------------------
 ...ssUtilsTest.java => ConcurrentHashSetTest.java} |  27 +-
 tubemq-docker/tubemq-all/Dockerfile                |  20 +-
 tubemq-docker/tubemq-all/tubemq.sh                 |   8 +-
 tubemq-example/src/main/assembly/assembly.xml      |   2 +-
 tubemq-manager/READMe.md                           |  51 --
 tubemq-manager/bin/start-manager.sh                |  60 --
 tubemq-manager/bin/stop-manager.sh                 |  31 -
 tubemq-manager/conf/logback.xml                    |  64 --
 tubemq-manager/pom.xml                             | 130 ---
 tubemq-manager/src/main/assembly/assembly.xml      |  61 --
 .../org/apache/tubemq/manager/TubeMQManager.java   |  59 --
 .../controller/ManagerControllerAdvice.java        |  41 -
 .../tubemq/manager/controller/TubeResult.java      |  27 -
 .../controller/cluster/ClusterController.java      | 128 ---
 .../manager/controller/topic/TopicController.java  | 126 ---
 .../org/apache/tubemq/manager/entry/NodeEntry.java |  51 --
 .../apache/tubemq/manager/entry/TopicEntry.java    | 137 ---
 .../apache/tubemq/manager/entry/TopicStatus.java   |  33 -
 .../manager/exceptions/TubeMQManagerException.java |  28 -
 .../tubemq/manager/repository/NodeRepository.java  |  28 -
 .../tubemq/manager/repository/TopicRepository.java |  43 -
 .../apache/tubemq/manager/service/NodeService.java | 272 ------
 .../tubemq/manager/service/TopicBackendWorker.java | 137 ---
 .../apache/tubemq/manager/service/TopicFuture.java |  58 --
 .../tubemq/manager/service/TubeHttpConst.java      |  30 -
 .../service/tube/TubeHttpBrokerInfoList.java       | 135 ---
 .../manager/service/tube/TubeHttpResponse.java     |  30 -
 .../service/tube/TubeHttpTopicInfoList.java        |  97 ---
 .../src/main/resources/application.properties      |  17 -
 .../manager/controller/TestBusinessController.java |  99 ---
 .../manager/controller/TestClusterController.java  | 150 ----
 .../manager/repository/TestBusinessRepository.java |  67 --
 .../service/tube/TestTubeHttpBrokerResponse.java   |  48 --
 .../service/tube/TestTubeHttpTopicInfoList.java    |  52 --
 .../tubemq/server/broker/BrokerServiceServer.java  |  12 +-
 .../broker/metadata/ClusterConfigHolder.java       |  25 +-
 .../server/broker/metadata/TopicMetadata.java      |  43 +-
 .../server/broker/msgstore/MessageStore.java       |  27 +-
 .../server/broker/offset/DefaultOffsetManager.java |  10 +-
 .../server/broker/web/BrokerAdminServlet.java      |  29 +-
 .../tubemq/server/common/TServerConstants.java     |   1 +
 .../tubemq/server/common/fielddef/CliArgDef.java   |   6 +-
 .../server/common/paramcheck/PBParameterUtils.java |   2 +-
 .../server/common/utils/WebParameterUtils.java     |  21 +-
 .../server/common/webbase/WebMethodMapper.java     |   2 +-
 .../apache/tubemq/server/master/MasterConfig.java  |   3 +-
 .../bdbstore/bdbentitys/BdbTopicConfEntity.java    |  18 +
 .../nodemanage/nodebroker/BrokerConfManager.java   |   6 +
 .../nodebroker/BrokerSyncStatusInfo.java           |  15 +
 .../web/handler/WebAdminGroupCtrlHandler.java      |   2 -
 .../web/handler/WebBrokerTopicConfHandler.java     |  76 +-
 .../master/web/handler/WebMasterInfoHandler.java   | 115 ++-
 .../master/web/handler/WebOtherInfoHandler.java    |   3 +-
 .../apache/tubemq/server/tools/BrokerStartup.java  |  24 +-
 .../org/apache/tubemq/server/tools/CliUtils.java   |  72 ++
 .../apache/tubemq/server/tools/MasterStartup.java  |  21 +-
 .../org/apache/tubemq/server/tools/ToolUtils.java  |  78 --
 .../tubemq/server/tools/cli/CliConsumer.java       |   2 +-
 .../tubemq/server/tools/cli/CliProducer.java       |   2 +-
 tubemq-web/.env                                    |   2 -
 tubemq-web/.eslintignore                           |   5 -
 tubemq-web/.eslintrc                               |  28 -
 tubemq-web/.gitignore                              |  26 -
 tubemq-web/.prettierrc                             |   4 -
 tubemq-web/.stylelintrc                            |   3 -
 tubemq-web/README.md                               |  33 -
 tubemq-web/config-overrides.js                     |  52 --
 tubemq-web/mock/_constant.js                       |   3 -
 tubemq-web/mock/app.js                             |   6 -
 tubemq-web/package.json                            | 110 ---
 tubemq-web/public/favicon.ico                      | Bin 1226 -> 0 bytes
 tubemq-web/public/index.html                       |  43 -
 tubemq-web/public/logo192.png                      | Bin 33077 -> 0 bytes
 tubemq-web/public/logo512.png                      | Bin 9664 -> 0 bytes
 tubemq-web/public/manifest.json                    |  24 -
 tubemq-web/public/robots.txt                       |   3 -
 tubemq-web/src/components/Breadcrumb/index.less    |   8 -
 tubemq-web/src/components/Breadcrumb/index.tsx     |  47 -
 tubemq-web/src/components/Layout/index.less        |  31 -
 tubemq-web/src/components/Layout/index.tsx         |  76 --
 tubemq-web/src/components/Modalx/index.less        |  17 -
 tubemq-web/src/components/Modalx/index.tsx         |  49 --
 tubemq-web/src/components/Tablex/index.less        |  16 -
 tubemq-web/src/components/Tablex/index.tsx         | 114 ---
 .../src/components/Tablex/tableFilterHelper.ts     |  32 -
 tubemq-web/src/components/TitleWrap/index.less     |  11 -
 tubemq-web/src/components/TitleWrap/index.tsx      |  22 -
 tubemq-web/src/components/index.tsx                |   3 -
 tubemq-web/src/configs/index.ts                    |   3 -
 tubemq-web/src/configs/menus/index.tsx             |  50 --
 tubemq-web/src/constants/broker.ts                 |  22 -
 tubemq-web/src/constants/person.ts                 |   4 -
 tubemq-web/src/constants/topic.ts                  |  10 -
 tubemq-web/src/context/globalContext.ts            |  12 -
 tubemq-web/src/defaultSettings.js                  |   6 -
 tubemq-web/src/hooks/index.ts                      |  52 --
 tubemq-web/src/index.tsx                           |  11 -
 tubemq-web/src/pages/Broker/commonModal.tsx        | 274 ------
 tubemq-web/src/pages/Broker/detail.tsx             | 378 --------
 tubemq-web/src/pages/Broker/index.less             |   9 -
 tubemq-web/src/pages/Broker/index.tsx              | 280 ------
 tubemq-web/src/pages/Broker/query.tsx              | 128 ---
 tubemq-web/src/pages/Cluster/index.less            |   0
 tubemq-web/src/pages/Cluster/index.tsx             | 143 ----
 tubemq-web/src/pages/Issue/consumeGroupDetail.tsx  |  95 ---
 tubemq-web/src/pages/Issue/index.less              |   0
 tubemq-web/src/pages/Issue/index.tsx               |  98 ---
 tubemq-web/src/pages/NotFound/index.tsx            |   5 -
 tubemq-web/src/pages/Topic/commonModal.tsx         | 349 --------
 tubemq-web/src/pages/Topic/detail.tsx              | 510 -----------
 tubemq-web/src/pages/Topic/index.less              |   9 -
 tubemq-web/src/pages/Topic/index.tsx               | 279 ------
 tubemq-web/src/pages/Topic/query.tsx               | 180 ----
 tubemq-web/src/react-app-env.d.ts                  |   1 -
 tubemq-web/src/router.tsx                          |  55 --
 tubemq-web/src/routes/index.tsx                    |  37 -
 tubemq-web/src/serviceWorker.ts                    | 146 ----
 tubemq-web/src/setupProxy.js                       |  12 -
 tubemq-web/src/store/global.ts                     |  30 -
 tubemq-web/src/typings/index.ts                    |   1 -
 tubemq-web/src/typings/router.ts                   |  14 -
 tubemq-web/src/utils/index.ts                      |  45 -
 tubemq-web/tsconfig.json                           |  33 -
 tubemq-web/tsconfig.paths.json                     |   8 -
 150 files changed, 1154 insertions(+), 8192 deletions(-)
 delete mode 100644 DISCLAIMER
 create mode 100644 DISCLAIMER-WIP
 delete mode 100644 bin/broker.sh
 delete mode 100644 bin/master.sh
 rename bin/{tubemq => tubemq.sh} (100%)
 delete mode 100644 resources/assets/public/css/fonts/icon.eot
 delete mode 100644 resources/assets/public/css/fonts/icon.ttf
 delete mode 100644 resources/assets/public/css/fonts/icon.woff
 delete mode 100644 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
 copy tubemq-core/src/test/java/org/apache/tubemq/corebase/utils/{AddressUtilsTest.java => ConcurrentHashSetTest.java} (50%)
 delete mode 100644 tubemq-manager/READMe.md
 delete mode 100755 tubemq-manager/bin/start-manager.sh
 delete mode 100755 tubemq-manager/bin/stop-manager.sh
 delete mode 100644 tubemq-manager/conf/logback.xml
 delete mode 100644 tubemq-manager/pom.xml
 delete mode 100644 tubemq-manager/src/main/assembly/assembly.xml
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/TubeMQManager.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/ManagerControllerAdvice.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/TubeResult.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/cluster/ClusterController.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/topic/TopicController.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/NodeEntry.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicEntry.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicStatus.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/exceptions/TubeMQManagerException.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/NodeRepository.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/TopicRepository.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/NodeService.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicBackendWorker.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicFuture.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TubeHttpConst.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpBrokerInfoList.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpResponse.java
 delete mode 100644 tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpTopicInfoList.java
 delete mode 100644 tubemq-manager/src/main/resources/application.properties
 delete mode 100644 tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestBusinessController.java
 delete mode 100644 tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestClusterController.java
 delete mode 100644 tubemq-manager/src/test/java/org/apache/tubemq/manager/repository/TestBusinessRepository.java
 delete mode 100644 tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpBrokerResponse.java
 delete mode 100644 tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpTopicInfoList.java
 create mode 100644 tubemq-server/src/main/java/org/apache/tubemq/server/tools/CliUtils.java
 delete mode 100644 tubemq-server/src/main/java/org/apache/tubemq/server/tools/ToolUtils.java
 delete mode 100644 tubemq-web/.env
 delete mode 100644 tubemq-web/.eslintignore
 delete mode 100644 tubemq-web/.eslintrc
 delete mode 100644 tubemq-web/.gitignore
 delete mode 100644 tubemq-web/.prettierrc
 delete mode 100644 tubemq-web/.stylelintrc
 delete mode 100644 tubemq-web/README.md
 delete mode 100644 tubemq-web/config-overrides.js
 delete mode 100644 tubemq-web/mock/_constant.js
 delete mode 100644 tubemq-web/mock/app.js
 delete mode 100644 tubemq-web/package.json
 delete mode 100644 tubemq-web/public/favicon.ico
 delete mode 100644 tubemq-web/public/index.html
 delete mode 100644 tubemq-web/public/logo192.png
 delete mode 100644 tubemq-web/public/logo512.png
 delete mode 100644 tubemq-web/public/manifest.json
 delete mode 100644 tubemq-web/public/robots.txt
 delete mode 100644 tubemq-web/src/components/Breadcrumb/index.less
 delete mode 100644 tubemq-web/src/components/Breadcrumb/index.tsx
 delete mode 100644 tubemq-web/src/components/Layout/index.less
 delete mode 100644 tubemq-web/src/components/Layout/index.tsx
 delete mode 100644 tubemq-web/src/components/Modalx/index.less
 delete mode 100644 tubemq-web/src/components/Modalx/index.tsx
 delete mode 100644 tubemq-web/src/components/Tablex/index.less
 delete mode 100644 tubemq-web/src/components/Tablex/index.tsx
 delete mode 100644 tubemq-web/src/components/Tablex/tableFilterHelper.ts
 delete mode 100644 tubemq-web/src/components/TitleWrap/index.less
 delete mode 100644 tubemq-web/src/components/TitleWrap/index.tsx
 delete mode 100644 tubemq-web/src/components/index.tsx
 delete mode 100644 tubemq-web/src/configs/index.ts
 delete mode 100644 tubemq-web/src/configs/menus/index.tsx
 delete mode 100644 tubemq-web/src/constants/broker.ts
 delete mode 100644 tubemq-web/src/constants/person.ts
 delete mode 100644 tubemq-web/src/constants/topic.ts
 delete mode 100644 tubemq-web/src/context/globalContext.ts
 delete mode 100644 tubemq-web/src/defaultSettings.js
 delete mode 100644 tubemq-web/src/hooks/index.ts
 delete mode 100644 tubemq-web/src/index.tsx
 delete mode 100644 tubemq-web/src/pages/Broker/commonModal.tsx
 delete mode 100644 tubemq-web/src/pages/Broker/detail.tsx
 delete mode 100644 tubemq-web/src/pages/Broker/index.less
 delete mode 100644 tubemq-web/src/pages/Broker/index.tsx
 delete mode 100644 tubemq-web/src/pages/Broker/query.tsx
 delete mode 100644 tubemq-web/src/pages/Cluster/index.less
 delete mode 100644 tubemq-web/src/pages/Cluster/index.tsx
 delete mode 100644 tubemq-web/src/pages/Issue/consumeGroupDetail.tsx
 delete mode 100644 tubemq-web/src/pages/Issue/index.less
 delete mode 100644 tubemq-web/src/pages/Issue/index.tsx
 delete mode 100644 tubemq-web/src/pages/NotFound/index.tsx
 delete mode 100644 tubemq-web/src/pages/Topic/commonModal.tsx
 delete mode 100644 tubemq-web/src/pages/Topic/detail.tsx
 delete mode 100644 tubemq-web/src/pages/Topic/index.less
 delete mode 100644 tubemq-web/src/pages/Topic/index.tsx
 delete mode 100644 tubemq-web/src/pages/Topic/query.tsx
 delete mode 100644 tubemq-web/src/react-app-env.d.ts
 delete mode 100644 tubemq-web/src/router.tsx
 delete mode 100644 tubemq-web/src/routes/index.tsx
 delete mode 100644 tubemq-web/src/serviceWorker.ts
 delete mode 100644 tubemq-web/src/setupProxy.js
 delete mode 100644 tubemq-web/src/store/global.ts
 delete mode 100644 tubemq-web/src/typings/index.ts
 delete mode 100644 tubemq-web/src/typings/router.ts
 delete mode 100644 tubemq-web/src/utils/index.ts
 delete mode 100644 tubemq-web/tsconfig.json
 delete mode 100644 tubemq-web/tsconfig.paths.json


[incubator-tubemq] 03/29: [TUBEMQ-511]Replace the conditional operator (?:) with mid()

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 0476e759db9886d775a3ee7f0393e10ca2f5f768
Author: gosonzhang <go...@tencent.com>
AuthorDate: Wed Jan 13 19:51:52 2021 +0800

    [TUBEMQ-511]Replace the conditional operator (?:) with mid()
---
 .../apache/tubemq/server/broker/msgstore/MessageStore.java  | 13 +++++--------
 .../tubemq/server/broker/offset/DefaultOffsetManager.java   | 10 ++++------
 .../apache/tubemq/server/broker/web/BrokerAdminServlet.java | 13 +++++--------
 .../java/org/apache/tubemq/server/master/MasterConfig.java  |  3 ++-
 .../org/apache/tubemq/server/tools/cli/CliConsumer.java     |  2 +-
 .../org/apache/tubemq/server/tools/cli/CliProducer.java     |  2 +-
 6 files changed, 18 insertions(+), 25 deletions(-)

diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java
index 8f650b4..1987c32 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java
@@ -35,6 +35,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.TErrCodeConstants;
 import org.apache.tubemq.corebase.protobuf.generated.ClientBroker;
+import org.apache.tubemq.corebase.utils.MixedUtils;
 import org.apache.tubemq.corebase.utils.ThreadUtils;
 import org.apache.tubemq.server.broker.BrokerConfig;
 import org.apache.tubemq.server.broker.metadata.ClusterConfigHolder;
@@ -133,10 +134,8 @@ public class MessageStore implements Closeable {
         this.writeCacheMaxSize = validAndGetMemCacheSize(topicMetadata.getMemCacheMsgSize());
         this.writeCacheFlushIntvl = topicMetadata.getMemCacheFlushIntvl();
         int tmpIndexReadCnt = tubeConfig.getIndexTransCount() * partitionNum;
-        memMaxIndexReadCnt.set(tmpIndexReadCnt <= 6000
-                ? 6000 : (Math.min(tmpIndexReadCnt, 10000)));
-        fileMaxIndexReadCnt.set(tmpIndexReadCnt < 8000
-                ? 8000 : (Math.min(tmpIndexReadCnt, 13500)));
+        memMaxIndexReadCnt.set(MixedUtils.mid(tmpIndexReadCnt, 6000, 10000));
+        fileMaxIndexReadCnt.set(MixedUtils.mid(tmpIndexReadCnt, 8000, 13500));
         memMaxFilterIndexReadCnt.set(memMaxIndexReadCnt.get() * 2);
         fileMaxFilterIndexReadCnt.set(fileMaxIndexReadCnt.get() * 3);
         fileLowReqMaxFilterIndexReadCnt.set(fileMaxFilterIndexReadCnt.get() * 10);
@@ -408,10 +407,8 @@ public class MessageStore implements Closeable {
         unflushDataHold.set(topicMetadata.getUnflushDataHold());
         maxFileValidDurMs.set(parseDeletePolicy(topicMetadata.getDeletePolicy()));
         int tmpIndexReadCnt = tubeConfig.getIndexTransCount() * partitionNum;
-        memMaxIndexReadCnt.set(tmpIndexReadCnt <= 6000
-                ? 6000 : (Math.min(tmpIndexReadCnt, 10000)));
-        fileMaxIndexReadCnt.set(tmpIndexReadCnt < 8000
-                ? 8000 : (Math.min(tmpIndexReadCnt, 13500)));
+        memMaxIndexReadCnt.set(MixedUtils.mid(tmpIndexReadCnt, 6000, 10000));
+        fileMaxIndexReadCnt.set(MixedUtils.mid(tmpIndexReadCnt, 8000, 13500));
         memMaxFilterIndexReadCnt.set(memMaxIndexReadCnt.get() * 2);
         fileMaxFilterIndexReadCnt.set(fileMaxIndexReadCnt.get() * 3);
         fileLowReqMaxFilterIndexReadCnt.set(fileMaxFilterIndexReadCnt.get() * 10);
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/offset/DefaultOffsetManager.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/offset/DefaultOffsetManager.java
index 0e91dc2..50c8bd3 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/offset/DefaultOffsetManager.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/offset/DefaultOffsetManager.java
@@ -26,6 +26,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.daemon.AbstractDaemonService;
+import org.apache.tubemq.corebase.utils.MixedUtils;
 import org.apache.tubemq.corebase.utils.TStringUtils;
 import org.apache.tubemq.corebase.utils.Tuple2;
 import org.apache.tubemq.corebase.utils.Tuple3;
@@ -121,8 +122,7 @@ public class DefaultOffsetManager extends AbstractDaemonService implements Offse
                 || (readStatus == TBaseConstants.CONSUME_MODEL_READ_FROM_MAX_ALWAYS)) {
             long adjOffset = indexMaxOffset;
             if (readStatus != TBaseConstants.CONSUME_MODEL_READ_FROM_MAX_ALWAYS) {
-                adjOffset = Math.min(reqOffset, indexMaxOffset);
-                adjOffset = Math.max(adjOffset, indexMinOffset);
+                adjOffset = MixedUtils.mid(reqOffset, indexMinOffset, indexMaxOffset);
             }
             regInfo.getAndSetOffset(adjOffset);
         }
@@ -287,10 +287,8 @@ public class DefaultOffsetManager extends AbstractDaemonService implements Offse
                             long reSetOffset, final String modifier) {
         long oldOffset = -1;
         if (store != null) {
-            long firstOffset = store.getIndexMinOffset();
-            long lastOffset = store.getIndexMaxOffset();
-            reSetOffset = reSetOffset < firstOffset
-                    ? firstOffset : Math.min(reSetOffset, lastOffset);
+            reSetOffset = MixedUtils.mid(reSetOffset,
+                    store.getIndexMinOffset(), store.getIndexMaxOffset());
             String offsetCacheKey = getOffsetCacheKey(topic, partitionId);
             getAndResetTmpOffset(group, offsetCacheKey);
             OffsetStorageInfo regInfo =
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java
index d35ba91..dd4bbdf 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java
@@ -28,6 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.tubemq.corebase.TokenConstants;
+import org.apache.tubemq.corebase.utils.MixedUtils;
 import org.apache.tubemq.corebase.utils.TStringUtils;
 import org.apache.tubemq.corebase.utils.Tuple2;
 import org.apache.tubemq.corebase.utils.Tuple3;
@@ -959,11 +960,9 @@ public class BrokerAdminServlet extends AbstractWebHandler {
                 if (store == null) {
                     continue;
                 }
-                long firstOffset = store.getIndexMinOffset();
-                long lastOffset = store.getIndexMaxOffset();
                 // adjust reset offset value
-                adjOffset = offsetTuple.getF0() < firstOffset
-                        ? firstOffset : Math.min(offsetTuple.getF0(), lastOffset);
+                adjOffset = MixedUtils.mid(offsetTuple.getF0(),
+                        store.getIndexMinOffset(), store.getIndexMaxOffset());
                 result.add(new Tuple3<>(entry.getKey(), entry1.getKey(), adjOffset));
             }
         }
@@ -1059,10 +1058,8 @@ public class BrokerAdminServlet extends AbstractWebHandler {
             if (store == null) {
                 continue;
             }
-            long firstOffset = store.getIndexMinOffset();
-            long lastOffset = store.getIndexMaxOffset();
-            adjOffset = entry.getValue() < firstOffset
-                    ? firstOffset : Math.min(entry.getValue(), lastOffset);
+            adjOffset = MixedUtils.mid(entry.getValue(),
+                    store.getIndexMinOffset(), store.getIndexMaxOffset());
             offsetVals.add(new Tuple3<>(topicName, partitionId, adjOffset));
         }
         if (offsetVals.isEmpty()) {
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/MasterConfig.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/MasterConfig.java
index b112d66..c2a8007 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/MasterConfig.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/MasterConfig.java
@@ -22,6 +22,7 @@ import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.config.TLSConfig;
 import org.apache.tubemq.corebase.utils.AddressUtils;
+import org.apache.tubemq.corebase.utils.MixedUtils;
 import org.apache.tubemq.corebase.utils.TStringUtils;
 import org.apache.tubemq.corerpc.RpcConstants;
 import org.apache.tubemq.server.common.TServerConstants;
@@ -467,7 +468,7 @@ public class MasterConfig extends AbstractFileConfig {
         }
         if (TStringUtils.isNotBlank(masterConf.get("rebalanceParallel"))) {
             int tmpParallel = this.getInt(masterConf, "rebalanceParallel");
-            this.rebalanceParallel = (tmpParallel <= 0) ? 1 : (Math.min(tmpParallel, 20));
+            this.rebalanceParallel = MixedUtils.mid(tmpParallel, 1, 20);
         }
     }
 
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliConsumer.java b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliConsumer.java
index c8938a6..52f0800 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliConsumer.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliConsumer.java
@@ -177,7 +177,7 @@ public class CliConsumer extends CliAbstractBase {
         String fetchThreadCntStr = cli.getOptionValue(CliArgDef.FETCHTHREADS.longOpt);
         if (TStringUtils.isNotBlank(fetchThreadCntStr)) {
             int tmpFetchThreadCnt = Integer.parseInt(fetchThreadCntStr);
-            tmpFetchThreadCnt = (tmpFetchThreadCnt < 1) ? 1 : Math.min(tmpFetchThreadCnt, 100);
+            tmpFetchThreadCnt = MixedUtils.mid(tmpFetchThreadCnt, 1, 100);
             fetchThreadCnt = tmpFetchThreadCnt;
         }
         return true;
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliProducer.java b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliProducer.java
index a6e7e38..8a01e29 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliProducer.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/cli/CliProducer.java
@@ -152,7 +152,7 @@ public class CliProducer extends CliAbstractBase {
         String sendThreadCntStr = cli.getOptionValue(CliArgDef.SENDTHREADS.longOpt);
         if (TStringUtils.isNotBlank(sendThreadCntStr)) {
             int tmpThreadCnt = Integer.parseInt(sendThreadCntStr);
-            tmpThreadCnt = (tmpThreadCnt < 1) ? 1 : Math.min(tmpThreadCnt, 200);
+            tmpThreadCnt = MixedUtils.mid(tmpThreadCnt, 1, 200);
             sendThreadCnt = tmpThreadCnt;
         }
         String rpcTimeoutStr = cli.getOptionValue(CliArgDef.RPCTIMEOUT.longOpt);


[incubator-tubemq] 22/29: [TUBEMQ-555] short session data can only be written to a specific partition (addendum) (#423)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit cd21d8f1a58882cacaf63c8f8db3b2bcf387185a
Author: gosonzhang <46...@qq.com>
AuthorDate: Mon Feb 8 22:34:08 2021 +0800

    [TUBEMQ-555] short session data can only be written to a specific partition (addendum) (#423)
    
    Co-authored-by: 曹显乐 <xi...@vivo.com>
    
    Co-authored-by: gosonzhang <go...@tencent.com>
    Co-authored-by: 曹显乐 <xi...@vivo.com>
---
 .../org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
index 109abdf..ec74ce5 100644
--- a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
+++ b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
@@ -18,8 +18,8 @@
 package org.apache.tubemq.client.producer;
 
 import java.util.List;
-import java.util.Random;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.tubemq.client.exception.TubeClientException;
 import org.apache.tubemq.corebase.Message;
@@ -41,7 +41,7 @@ public class RoundRobinPartitionRouter implements PartitionRouter {
         }
         AtomicInteger currRouterCount = partitionRouterMap.get(message.getTopic());
         if (null == currRouterCount) {
-            AtomicInteger newCounter = new AtomicInteger(new Random().nextInt());
+            AtomicInteger newCounter = new AtomicInteger(ThreadLocalRandom.current().nextInt());
             currRouterCount = partitionRouterMap.putIfAbsent(message.getTopic(), newCounter);
             if (null == currRouterCount) {
                 currRouterCount = newCounter;


[incubator-tubemq] 18/29: [TUBEMQ-553]Update the CHANGES.md according to the 0.8.0-RC1 changes (#418)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 8a56cf2d19f60fc95e7a72ee5ee99a705c16eb1a
Author: gosonzhang <46...@qq.com>
AuthorDate: Mon Feb 1 10:07:47 2021 +0800

    [TUBEMQ-553]Update the CHANGES.md according to the 0.8.0-RC1 changes (#418)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 CHANGES.md | 74 ++++++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 43 insertions(+), 31 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 3e14289..43e5034 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -24,70 +24,82 @@
 ## Release 0.8.0-incubating - Released (as of 2021-01-18)
 
 ### IMPROVEMENTS:
-
 | JIRA  | Summary  | Priority |
 | :---- | :------- | :------- |
 | [TUBEMQ-430](https://issues.apache.org/jira/browse/TUBEMQ-430) | Optimizing the implementation of HTTP API for broke  | Major    |
-| [TUBEMQ-433](https://issues.apache.org/jira/browse/TUBEMQ-433) | add tubemq perf-consumer/producer scripts  | Major    |
-| [TUBEMQ-440](https://issues.apache.org/jira/browse/TUBEMQ-440) | Add feature package tube-manager to zip  | Major    |
-| [TUBEMQ-442](https://issues.apache.org/jira/browse/TUBEMQ-442) | Modifying the jvm parameters when the broker starts does not take effect  | Major    |
-| [TUBEMQ-444](https://issues.apache.org/jira/browse/TUBEMQ-444) | Add consume and produce Cli commands  | Major    |
 | [TUBEMQ-445](https://issues.apache.org/jira/browse/TUBEMQ-445) | Adjust the status check default sleep interval of pullConsumeReadyChkSliceMs  | Major    |
-| [TUBEMQ-447](https://issues.apache.org/jira/browse/TUBEMQ-447) | Add Broker-Admin Cli  | Major    |
+| [TUBEMQ-448](https://issues.apache.org/jira/browse/TUBEMQ-448) | Add Committer and PPMC operation process  | Major    |
 | [TUBEMQ-449](https://issues.apache.org/jira/browse/TUBEMQ-449) | Adjust Example implementation  | Major    |
-| [TUBEMQ-450](https://issues.apache.org/jira/browse/TUBEMQ-450) | TubeClientException: Generate producer id failed  | Major    |
-| [TUBEMQ-451](https://issues.apache.org/jira/browse/TUBEMQ-451) | Replace ConsumeTupleInfo with Tuple2  | Major    |
-| [TUBEMQ-463](https://issues.apache.org/jira/browse/TUBEMQ-463) | Adjust Master rebalance process implementation  | Major    |
-| [TUBEMQ-470](https://issues.apache.org/jira/browse/TUBEMQ-470) | Add query API of TopicName and BrokerId collection  | Major    |
-| [TUBEMQ-472](https://issues.apache.org/jira/browse/TUBEMQ-472) | Adjust Broker's AbstractWebHandler class implementation  | Major    |
-| [TUBEMQ-475](https://issues.apache.org/jira/browse/TUBEMQ-475) | add the offset clone api of the consume group  | Major    |
-| [TUBEMQ-482](https://issues.apache.org/jira/browse/TUBEMQ-482) | Add offset query api  | Major    |
-| [TUBEMQ-484](https://issues.apache.org/jira/browse/TUBEMQ-484) | Add query API for topic publication information  | Major    |
-| [TUBEMQ-485](https://issues.apache.org/jira/browse/TUBEMQ-485) | Add the batch setting API of consume group offset  | Major    |
-| [TUBEMQ-486](https://issues.apache.org/jira/browse/TUBEMQ-486) | Add the delete API of consumer group offset  | Major    |
-| [TUBEMQ-499](https://issues.apache.org/jira/browse/TUBEMQ-499) | Add configure store  | Major    |
-| [TUBEMQ-500](https://issues.apache.org/jira/browse/TUBEMQ-500) | Add setting operate API  | Major    |
-| [TUBEMQ-501](https://issues.apache.org/jira/browse/TUBEMQ-501) | Adjust max message size check logic  | Major    |
-| [TUBEMQ-502](https://issues.apache.org/jira/browse/TUBEMQ-502) | Add setting API interface document  | Major    |
-| [TUBEMQ-504](https://issues.apache.org/jira/browse/TUBEMQ-504) | Adjust the WebMethodMapper class interfaces  | Major    |
-| [TUBEMQ-505](https://issues.apache.org/jira/browse/TUBEMQ-505) | Remove the "WIP" label of the DISCLAIMER file  | Major    |
-| [TUBEMQ-508](https://issues.apache.org/jira/browse/TUBEMQ-508) | Optimize Broker's PB parameter check processing logic  | Major    |
-| [TUBEMQ-509](https://issues.apache.org/jira/browse/TUBEMQ-509) | Adjust the packet length check when data is loaded  | Major    |
+| [TUBEMQ-452](https://issues.apache.org/jira/browse/TUBEMQ-452) | Optimize rebalance performance | Major |
+| [TUBEMQ-467](https://issues.apache.org/jira/browse/TUBEMQ-467) | Add WEB APIs of Master and Broker | Major |
+| [TUBEMQ-489](https://issues.apache.org/jira/browse/TUBEMQ-489) | Add the maximum message length parameter setting | Major |
+| [TUBEMQ-495](https://issues.apache.org/jira/browse/TUBEMQ-495) | Code implementation adjustment based on SpotBugs check | Major |
 | [TUBEMQ-511](https://issues.apache.org/jira/browse/TUBEMQ-511) | Replace the conditional operator (?:) with mid()  | Major    |
 | [TUBEMQ-512](https://issues.apache.org/jira/browse/TUBEMQ-512) | Add package length control based on Topic  | Major    |
 | [TUBEMQ-515](https://issues.apache.org/jira/browse/TUBEMQ-515) | Add cluster Topic view web api  | Major    |
-| [TUBEMQ-526](https://issues.apache.org/jira/browse/TUBEMQ-526) | Adjust the packaging script and version check list, remove the "-WIP" tag  | Major    |
 
 ### BUG FIXES:
 | JIRA  | Summary  | Priority |
 | :---- | :------- | :------- |
-| [TUBEMQ-441](https://issues.apache.org/jira/browse/TUBEMQ-441) | An error occurred when using the Tubemq class to create a sink table | Major |
 | [TUBEMQ-437](https://issues.apache.org/jira/browse/TUBEMQ-437) | Fix tubemq table source sink factory instance creating problem | Major |
+| [TUBEMQ-441](https://issues.apache.org/jira/browse/TUBEMQ-441) | An error occurred when using the Tubemq class to create a sink table | Major |
+| [TUBEMQ-442](https://issues.apache.org/jira/browse/TUBEMQ-442) | Modifying the jvm parameters when the broker starts does not take effect  | Major    |
 | [TUBEMQ-443](https://issues.apache.org/jira/browse/TUBEMQ-443) | TubemqSourceFunction class prints too many logs problem | Major |
 | [TUBEMQ-446](https://issues.apache.org/jira/browse/TUBEMQ-446) | Small bugs fix that do not affect the main logics | Major |
+| [TUBEMQ-450](https://issues.apache.org/jira/browse/TUBEMQ-450) | TubeClientException: Generate producer id failed  | Major    |
 | [TUBEMQ-453](https://issues.apache.org/jira/browse/TUBEMQ-453) | TubemqSourceFunction class prints too many logs problem | Major |
-| [TUBEMQ-457](https://issues.apache.org/jira/browse/TUBEMQ-457) | There is no need to return StringBuilder in Master.java | Major |
-| [TUBEMQ-495](https://issues.apache.org/jira/browse/TUBEMQ-495) | Code implementation adjustment based on SpotBugs check | Major |
 | [TUBEMQ-506](https://issues.apache.org/jira/browse/TUBEMQ-506) | cmakelist error | Major |
 | [TUBEMQ-510](https://issues.apache.org/jira/browse/TUBEMQ-510) | Found a bug in MessageProducerExample class | Major |
 | [TUBEMQ-518](https://issues.apache.org/jira/browse/TUBEMQ-518) | fix parameter pass error | Major |
+| [TUBEMQ-526](https://issues.apache.org/jira/browse/TUBEMQ-526) | Adjust the packaging script and version check list, remove the "-WIP" tag  | Major    |
 
-### SUB-TASK:
+### TASK:
+| JIRA | Summary | Priority |
+|:---- |:---- | :--- |
+| [TUBEMQ-505](https://issues.apache.org/jira/browse/TUBEMQ-505) | Remove the "WIP" label of the DISCLAIMER file  | Major    |
+| [TUBEMQ-543](https://issues.apache.org/jira/browse/TUBEMQ-543) | Modify the LICENSE statement of multiple files and others  | Major    |
 
+### SUB-TASK:
 | JIRA  | Summary  | Priority |
 | :---- | :------- | :------- |
+| [TUBEMQ-428](https://issues.apache.org/jira/browse/TUBEMQ-433) | Bumped version to 0.8.0-SNAPSHOT | Major |
 | [TUBEMQ-433](https://issues.apache.org/jira/browse/TUBEMQ-433) | add tubemq perf-consumer/producer scripts | Major |
 | [TUBEMQ-434](https://issues.apache.org/jira/browse/TUBEMQ-434) | Adjust Broker API mapping | Major |
 | [TUBEMQ-435](https://issues.apache.org/jira/browse/TUBEMQ-435) | Create Web field Mapping | Major |
 | [TUBEMQ-436](https://issues.apache.org/jira/browse/TUBEMQ-436) | Adjust Broker's HTTP API implementation | Major |
 | [TUBEMQ-439](https://issues.apache.org/jira/browse/TUBEMQ-439) | Add Cli field Scheme definition | Major |
+| [TUBEMQ-440](https://issues.apache.org/jira/browse/TUBEMQ-440) | Add feature package tube-manager to zip  | Major    |
 | [TUBEMQ-444](https://issues.apache.org/jira/browse/TUBEMQ-444) | Add consume and produce Cli commands | Major |
 | [TUBEMQ-447](https://issues.apache.org/jira/browse/TUBEMQ-447) | Add Broker-Admin Cli | Major |
-| [TUBEMQ-452](https://issues.apache.org/jira/browse/TUBEMQ-452) | Optimize rebalance performance | Major |
+| [TUBEMQ-451](https://issues.apache.org/jira/browse/TUBEMQ-451) | Replace ConsumeTupleInfo with Tuple2  | Major    |
+| [TUBEMQ-457](https://issues.apache.org/jira/browse/TUBEMQ-457) | There is no need to return StringBuilder in Master.java | Major |
+| [TUBEMQ-463](https://issues.apache.org/jira/browse/TUBEMQ-463) | Adjust Master rebalance process implementation  | Major    |
 | [TUBEMQ-464](https://issues.apache.org/jira/browse/TUBEMQ-464) | Add parameter rebalanceParallel in master.ini | Major |
-| [TUBEMQ-467](https://issues.apache.org/jira/browse/TUBEMQ-467) | Add WEB APIs of Master and Broker | Major |
+| [TUBEMQ-470](https://issues.apache.org/jira/browse/TUBEMQ-470) | Add query API of TopicName and BrokerId collection  | Major    |
 | [TUBEMQ-471](https://issues.apache.org/jira/browse/TUBEMQ-471) | Add query API Introduction of TopicName and BrokerId collection | Major |
+| [TUBEMQ-472](https://issues.apache.org/jira/browse/TUBEMQ-472) | Adjust Broker's AbstractWebHandler class implementation  | Major    |
+| [TUBEMQ-475](https://issues.apache.org/jira/browse/TUBEMQ-475) | add the offset clone api of the consume group  | Major    |
+| [TUBEMQ-482](https://issues.apache.org/jira/browse/TUBEMQ-482) | Add offset query api  | Major    |
+| [TUBEMQ-484](https://issues.apache.org/jira/browse/TUBEMQ-484) | Add query API for topic publication information  | Major    |
+| [TUBEMQ-485](https://issues.apache.org/jira/browse/TUBEMQ-485) | Add the batch setting API of consume group offset  | Major    |
+| [TUBEMQ-486](https://issues.apache.org/jira/browse/TUBEMQ-486) | Add the delete API of consumer group offset  | Major    |
 | [TUBEMQ-494](https://issues.apache.org/jira/browse/TUBEMQ-494) | Update API interface instruction document | Major |
+| [TUBEMQ-499](https://issues.apache.org/jira/browse/TUBEMQ-499) | Add configure store  | Major    |
+| [TUBEMQ-500](https://issues.apache.org/jira/browse/TUBEMQ-500) | Add setting operate API  | Major    |
+| [TUBEMQ-501](https://issues.apache.org/jira/browse/TUBEMQ-501) | Adjust max message size check logic  | Major    |
+| [TUBEMQ-502](https://issues.apache.org/jira/browse/TUBEMQ-502) | Add setting API interface document  | Major    |
+| [TUBEMQ-504](https://issues.apache.org/jira/browse/TUBEMQ-504) | Adjust the WebMethodMapper class interfaces  | Major    |
+| [TUBEMQ-508](https://issues.apache.org/jira/browse/TUBEMQ-508) | Optimize Broker's PB parameter check processing logic  | Major    |
+| [TUBEMQ-509](https://issues.apache.org/jira/browse/TUBEMQ-509) | Adjust the packet length check when data is loaded  | Major    |
+| [TUBEMQ-522](https://issues.apache.org/jira/browse/TUBEMQ-522) | Add admin_query_cluster_topic_view API document  | Major    |
+| [TUBEMQ-544](https://issues.apache.org/jira/browse/TUBEMQ-544) | Adjust the LICENSE statement in the client.conf files of Python and C/C++ SDK | Major |
+| [TUBEMQ-546](https://issues.apache.org/jira/browse/TUBEMQ-546) | Restore the original license header of the referenced external source files | Major |
+| [TUBEMQ-547](https://issues.apache.org/jira/browse/TUBEMQ-547) | Recode the implementation of the *Startup.java classes in the Tool package | Major |
+| [TUBEMQ-548](https://issues.apache.org/jira/browse/TUBEMQ-548) | Handle the LICENSE authorization of font files in the resources | Major |
+| [TUBEMQ-549](https://issues.apache.org/jira/browse/TUBEMQ-549) | Handling the problem of compilation failure | Major |
+| [TUBEMQ-550](https://issues.apache.org/jira/browse/TUBEMQ-550) | Adjust LICENSE file content | Major |
+| [TUBEMQ-551](https://issues.apache.org/jira/browse/TUBEMQ-551) | Adjust NOTICE file content | Major |
+
 
 ## Release 0.7.0-incubating - Released (as of 2020-11-25)
 


[incubator-tubemq] 17/29: [TUBEMQ-549] Handling the problem of compilation failure

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit cd027203e89a6dfc74ba1696b0340daf4e1246ed
Author: yuanbo <yu...@apache.org>
AuthorDate: Fri Jan 29 16:41:49 2021 +0800

    [TUBEMQ-549] Handling the problem of compilation failure
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a1e5478..0e6a5ce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,7 @@
         <repository>
             <id>berkeleydb-je</id>
             <name>berkeleydb-je</name>
-            <url>https://download.dcache.org/nexus/repository/berkeleydb-je/</url>
+            <url>https://download.oracle.com/maven/</url>
             <releases>
                 <enabled>true</enabled>
             </releases>


[incubator-tubemq] 26/29: [TUBEMQ-559] Update the LICENSE file according to the 0.8.0-RC2 review (#427)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 5967037702d800569e21874305cdc28cf9de55a7
Author: gosonzhang <46...@qq.com>
AuthorDate: Sun Feb 14 09:50:22 2021 +0800

    [TUBEMQ-559] Update the LICENSE file according to the 0.8.0-RC2 review (#427)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 LICENSE                                            | 255 +++++++++++++++----
 pom.xml                                            |   1 -
 tubemq-connectors/tubemq-connector-flume/pom.xml   |   2 +-
 tubemq-manager/READMe.md                           |  51 ----
 tubemq-manager/bin/start-manager.sh                |  66 -----
 tubemq-manager/bin/stop-manager.sh                 |  37 ---
 tubemq-manager/conf/logback.xml                    |  67 -----
 tubemq-manager/pom.xml                             | 130 ----------
 tubemq-manager/src/main/assembly/assembly.xml      |  64 -----
 .../org/apache/tubemq/manager/TubeMQManager.java   |  59 -----
 .../controller/ManagerControllerAdvice.java        |  41 ----
 .../tubemq/manager/controller/TubeResult.java      |  27 --
 .../controller/cluster/ClusterController.java      | 128 ----------
 .../manager/controller/topic/TopicController.java  | 126 ----------
 .../org/apache/tubemq/manager/entry/NodeEntry.java |  51 ----
 .../apache/tubemq/manager/entry/TopicEntry.java    | 137 -----------
 .../apache/tubemq/manager/entry/TopicStatus.java   |  33 ---
 .../manager/exceptions/TubeMQManagerException.java |  28 ---
 .../tubemq/manager/repository/NodeRepository.java  |  28 ---
 .../tubemq/manager/repository/TopicRepository.java |  43 ----
 .../apache/tubemq/manager/service/NodeService.java | 272 ---------------------
 .../tubemq/manager/service/TopicBackendWorker.java | 137 -----------
 .../apache/tubemq/manager/service/TopicFuture.java |  58 -----
 .../tubemq/manager/service/TubeHttpConst.java      |  30 ---
 .../service/tube/TubeHttpBrokerInfoList.java       | 135 ----------
 .../manager/service/tube/TubeHttpResponse.java     |  30 ---
 .../service/tube/TubeHttpTopicInfoList.java        |  97 --------
 .../src/main/resources/application.properties      |  17 --
 .../manager/controller/TestBusinessController.java |  99 --------
 .../manager/controller/TestClusterController.java  | 150 ------------
 .../manager/repository/TestBusinessRepository.java |  67 -----
 .../service/tube/TestTubeHttpBrokerResponse.java   |  48 ----
 .../service/tube/TestTubeHttpTopicInfoList.java    |  52 ----
 33 files changed, 207 insertions(+), 2359 deletions(-)

diff --git a/LICENSE b/LICENSE
index 744f075..7ef57fd 100644
--- a/LICENSE
+++ b/LICENSE
@@ -208,11 +208,11 @@
 1. Third party MIT license licenses
 =========
 
-The following components are provided under the MIT license.
+1.1 The following modified/copied source files are provided under the MIT license.
 
 ----
 
-1.1 resources/assets/lib/jquery.min.js
+1.1.1 resources/assets/lib/jquery.min.js
  Source  : jquery 1.11.3
  License : https://github.com/jquery/jquery/blob/1.11.3/MIT-LICENSE.txt
 
@@ -240,7 +240,7 @@ The following components are provided under the MIT license.
 
 ----
 
-1.2 resources/assets/lib/DataTables/*
+1.1.2 resources/assets/lib/DataTables/*
  Source  : datatables  1.10.7
  License : https://github.com/DataTables/DataTables/blob/1.10.7/license.txt
 
@@ -265,18 +265,33 @@ The following components are provided under the MIT license.
 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | THE SOFTWARE.
 
+------------------
+
+1.2 The following binary dependency packages are provided under the MIT license.
+
 ----
 
+1.2.1 org.slf4j:slf4j-api
+      org.slf4j:slf4j-log4j12
+ Version : 1.6.2
+ License : For details, see https://github.com/qos-ch/slf4j/blob/master/LICENSE.txt
+
+1.2.1 org.mockito:mockito-all:1.9.0
+      org.mockito:mockito-core:2.18.0
+ License : For details, see https://github.com/mockito/mockito/blob/release/1.x/LICENSE
+                            https://github.com/mockito/mockito/blob/release/2.x/LICENSE
+
+
 =========
 2. Third party BSD 3-Clause license
 =========
 
-The following components are provided under the BSD 3-Clause license.
+2.1 The following modified/copied source files are provided under the BSD 3-Clause license.
 
 ----
 
-2.1 tubemq-client-twins/tubemq-client-cpp/src/any.h
-    tubemq-client-twins/tubemq-client-cpp/src/buffer.h
+2.1.1 tubemq-client-twins/tubemq-client-cpp/src/any.h
+      tubemq-client-twins/tubemq-client-cpp/src/buffer.h
  Source  : https://github.com/Qihoo360/evpp/blob/master/evpp/any.h version c5038a6
            https://github.com/Qihoo360/evpp/blob/master/evpp/buffer.h version b2535d7
  License : https://github.com/Qihoo360/evpp/blob/master/LICENSE
@@ -311,67 +326,208 @@ The following components are provided under the BSD 3-Clause license.
 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+------------------
+
+2.2 The following binary dependency packages are provided under the BSD 3-Clause license.
+
 ----
 
+2.2.1 com.google.protobuf:protobuf-java
+ Version : 2.5.0
+ License : For details, see https://github.com/protocolbuffers/protobuf/blob/v2.5.0/COPYING.txt
+
+2.2.2 com.googlecode.protobuf-java-format:protobuf-java-format
+ Version : 1.4
+ License : For details, see https://github.com/bivas/protobuf-java-format/blob/master/LICENSE.txt
+
+
 =========
 3. Third party Apache 2.0 Licenses
 =========
 
-The following components are provided under the Apache 2.0 License.
+3.1 The following modified/copied source files are provided under the Apache 2.0 License.
 
 ----
 
-3.1 tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/Bytes.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HashedBytes.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HasThread.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/RecoverableZooKeeper.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperWatcher.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperListener.java
-    tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ThreadUtils.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperConnectionException.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/master/utils/Chore.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZKUtil.java
-    tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/RowLock.java
+3.1.1 tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/Bytes.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HashedBytes.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HasThread.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/RecoverableZooKeeper.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperWatcher.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperListener.java
+      tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ThreadUtils.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperConnectionException.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/master/utils/Chore.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZKUtil.java
+      tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/RowLock.java
  Source  : hbase 0.94.27 (Please note that the software have been modified.)
  License : https://github.com/apache/hbase/blob/rel/0.94.27/LICENSE.txt
 
-3.2 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
-    tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
+3.1.2 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
+      tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
  Source  : mina 2.0.12
  License : https://github.com/apache/mina/blob/2.0.12/LICENSE.txt
 
-3.3 bin/broker.sh
-    bin/master.sh
+3.1.3 bin/broker.sh
+      bin/master.sh
  Source  : Metamorphosis  metamorphosis-all-1.4.4 (Please note that the software have been modified.)
  License : https://github.com/killme2008/Metamorphosis/blob/metamorphosis-all-1.4.4/COPYING.txt
 
-3.4 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
-    tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferOutputStream.java
+3.1.4 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
+      tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferOutputStream.java
  Source  : Apache Avro 1.7.6
  License : https://github.com/apache/avro/blob/release-1.7.6/LICENSE.txt
 
-3.5 tubemq-client-twins/tubemq-client-cpp/src/future.h
+3.1.5 tubemq-client-twins/tubemq-client-cpp/src/future.h
  Source  : Apache Pulsar
  License : https://github.com/apache/pulsar/blob/master/LICENSE
 
+------------------
+
+3.2 The following binary dependency packages are provided under the Apache 2.0 License.
+
+----
+
+3.2.1 io.netty:netty
+ Version : 3.8.0.Final
+ License : For details, see https://github.com/netty/netty/blob/netty-3.8.0.Final/LICENSE.txt
+
+3.2.2 commons-cli:commons-cli
+ Version : 1.4
+ License : For details, see https://github.com/apache/commons-cli/blob/master/LICENSE.txt
+
+3.2.3 commons-codec:commons-codec
+ Version : 1.10
+ License : For details, see https://github.com/apache/commons-codec/blob/1.10/LICENSE.txt
+
+3.2.4 com.google.code.gson:gson
+ Version : 2.8.5
+ License : For details, see https://github.com/google/gson/blob/master/LICENSE
+
+3.2.5 commons-lang:commons-lang
+ Version : 2.6
+ License : For details, see https://github.com/apache/commons-lang/blob/master/LICENSE.txt
+
+3.2.6 org.apache.commons:commons-lang3
+ Version :
+ License : For details, see https://github.com/apache/commons-lang/blob/master/LICENSE.txt
+
+3.2.7 org.apache.httpcomponents:httpclient
+ Version : 4.5.2
+ License : For details, see https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt
+
+3.2.8 commons-io:commons-io
+ Version : 2.1
+ License : For details, see https://github.com/apache/commons-io/blob/master/LICENSE.txt
+
+3.2.9 org.apache.zookeeper:zookeeper
+ Version : 3.4.3
+ License : For details, see https://github.com/apache/zookeeper/blob/master/LICENSE.txt
+
+3.2.10 com.google.guava:guava
+ Version : 13.0
+ License : For details, see https://github.com/google/guava/blob/master/COPYING
+
+3.2.11 org.apache.velocity:velocity:1.7
+       org.apache.velocity:velocity-tools:2.0
+ License : For details, see https://github.com/apache/velocity-master/blob/master/pom/pom.xml
+                            https://github.com/apache/velocity-tools/blob/2.0/LICENSE
+
+3.2.12 org.springframework:spring-core
+       org.springframework:spring-context
+       org.springframework:spring-jdbc
+       org.springframework:spring-orm
+ Version : 4.1.6.RELEASE
+ License : For details, see https://github.com/spring-projects/spring-framework/tree/v4.1.6.RELEASE#license
+
+3.2.13 org.mortbay.jetty:jetty
+ Version : 6.1.26
+ License : For details, see https://github.com/jetty-project/codehaus-jetty6
+
+3.2.14 org.ini4j:ini4j
+ Version : 0.5.1
+ License : For details, see https://github.com/facebookarchive/ini4j/blob/master/LICENSE.txt
+
+3.2.15 org.easymock:easymock
+       org.easymock:easymockclassextension
+ Version : 2.5.2
+ License : For details, see https://github.com/easymock/easymock/blob/master/header.txt
+
+3.2.16 org.eclipse.jetty:jetty-server
+       org.eclipse.jetty:jetty-servlet
+ Version : 9.4.31.v20200723
+ License : For details, see https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/LICENSE
+
+3.2.17 org.powermock:powermock-module-junit4
+       org.powermock:powermock-api-mockito2
+ Version : 2.0.4
+ License : For details, see https://github.com/powermock/powermock/blob/release/2.x/LICENSE.txt
+
+3.2.18 org.apache.flink:flink-core
+       org.apache.flink:flink-table-common
+       org.apache.flink:flink-runtime_2.11
+       org.apache.flink:flink-streaming-java_2.11
+       org.apache.flink:flink-table-api-java-bridge_2.11
+ Version : 1.9.2
+ License : For details, see https://github.com/apache/flink/blob/release-1.9/LICENSE
+
+3.2.19 org.apache.flume:flume-ng-core
+ Version : 1.9.0
+ License : For details, see https://github.com/apache/flume/blob/flume-1.9/LICENSE
+
+3.2.20 org.awaitility:awaitility
+ Version : 4.0.3
+ License : For details, see https://github.com/awaitility/awaitility/blob/master/LICENSE
+
+3.2.21 org.apache.spark:spark-core_2.11
+       org.apache.spark:spark-sql_2.11
+       org.apache.spark:spark-streaming_2.11
+ Version : 2.4.4
+ License : For details, see https://github.com/apache/spark/blob/branch-2.4/LICENSE
+
 
 =========
-4. Third party category X Licenses
+4. Third party Eclipse Public License 1.0 Licenses
 =========
 
+4.1 The following binary dependency packages are provided under Eclipse Public License 1.0 Licenses.
+
 ----
 
-NOTICE:
-The project does not contain the LICENSE file, but analyzed from
-the project’s pom.xml content and the file header of the source code file,
-the following components are provided under the Apache 2.0 License.
+4.1.1 junit:junit
+ Version : 4.11
+ License : For details, see https://github.com/junit-team/junit4/blob/main/LICENSE-junit.txt
+
+
+=========
+5. Third party CDDL + GPLv2 with classpath exception Licenses
+=========
 
-4.1 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
+5.1 The following binary dependency packages are provided under CDDL + GPLv2 with classpath exception Licenses.
+
+----
+
+5.1.1 javax.servlet:javax.servlet-api
+ Version : 4.0.1
+ License : For details, see https://github.com/javaee/servlet-spec/blob/master/LICENSE
+
+
+=========
+6. Third party category X Licenses
+=========
+
+6.1 The following modified/copied source files are provided under category X Licenses.
+
+----
+
+6.1.1 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
  Source  : citrus r3.1.4 (Please note that the software have been modified.)
            https://github.com/webx/citrus/blob/r3.1.4/common/util/src/main/java/com/alibaba/citrus/util/StringUtil.java
- License: https://github.com/webx/citrus/blob/r3.1.4/pom.xml
+ License: The project does not contain the LICENSE file, but analyzed from
+          the project’s pom.xml content and the file header of the source code file,
+          the following components are provided under the Apache 2.0 License.
 
- pom.xml includes:
+ pom.xml includes: see https://github.com/webx/citrus/blob/r3.1.4/pom.xml
  |    <licenses>
  |        <license>
  |            <name>The Apache Software License, Version 2.0</name>
@@ -400,14 +556,11 @@ the following components are provided under the Apache 2.0 License.
 
 ----
 
-NOTICE:
-
-According to the content of the project’s README.markdown and LICENSE.markdown,
-the following components are provided under the slightly modified MIT License.
-
-4.2 resources/assets/public/css/style.css
-    resources/assets/public/css/ie.css
+6.1.2 resources/assets/public/css/style.css
+      resources/assets/public/css/ie.css
  Source  : Compass
+ License : According to the content of the project’s README.markdown and LICENSE.markdown,
+           the following components are provided under the slightly modified MIT License.
 
  README.markdown includes:(https://github.com/Compass/compass/blob/stable/README.markdown)
  | License
@@ -428,19 +581,22 @@ the following components are provided under the slightly modified MIT License.
  |
  | Contributors to this project agree to grant all rights to the copyright holder of the primary product. Attribution is maintained in the source control history of the product.
 
-----
-
-NOTICE:
+------------------
 
-We found that different versions of berkeleydb-je use different authorization protocols.
-The 7.3.7 version we choose uses the Apache V2 LICENSE, we choose to use this component
-based on Apache V2 LICENSE.
+6.2 The following binary dependency packages are provided under category X Licenses.
 
-If users modify the berkeleydb-je version, please pay attention to this issue.
-The following is the content of the LICENSE file in the component source package:
+----
 
-4.3 berkeleydb-je
+6.2.1 berkeleydb-je
+ Version : 7.3.7
  Source  : Oracle
+ License :We found that different versions of Berkeley DB JE (Java Edition) use different authorization protocols.
+           The 7.3.7 version we choose uses the Apache V2 LICENSE, we choose to use this component based on Apache V2 LICENSE.
+
+           If you modify the version of Berkeley DB JE (Java Edition), please ** pay attention ** to this issue,
+           please the appropriate version with Apache V2 LICENSE.
+
+           The following is the content of the LICENSE file in the component source package:
 
  LICENSE information notice in webpage: https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html
  | Oracle Berkeley DB Licensing Information
@@ -528,6 +684,7 @@ The following is the content of the LICENSE file in the component source package
  |  * THE POSSIBILITY OF SUCH DAMAGE.
  |  */
 
+----
 
 
 
diff --git a/pom.xml b/pom.xml
index 3ca5c29..bca1abf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,7 +85,6 @@
         <dockerfile-maven.version>1.4.13</dockerfile-maven.version>
         <spring.boot.version>2.3.3.RELEASE</spring.boot.version>
         <mysql.java.version>8.0.21</mysql.java.version>
-        <junit.platform.version>1.6.2</junit.platform.version>
     </properties>
 
     <repositories>
diff --git a/tubemq-connectors/tubemq-connector-flume/pom.xml b/tubemq-connectors/tubemq-connector-flume/pom.xml
index c2b2f0a..cd78a97 100644
--- a/tubemq-connectors/tubemq-connector-flume/pom.xml
+++ b/tubemq-connectors/tubemq-connector-flume/pom.xml
@@ -31,7 +31,7 @@
     <properties>
         <flume.version>1.9.0</flume.version>
         <mockito.version>1.9.0</mockito.version>
-        <junit.version>4.10</junit.version>
+        <junit.version>4.11</junit.version>
         <awaitility.version>4.0.3</awaitility.version>
     </properties>
 
diff --git a/tubemq-manager/READMe.md b/tubemq-manager/READMe.md
deleted file mode 100644
index 29f5fdc..0000000
--- a/tubemq-manager/READMe.md
+++ /dev/null
@@ -1,51 +0,0 @@
-License
-=======
-
-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.
-
-# introduction
-tubemq-manager is used to manage multiple tubemq cluster. It works with tubemq-web project. 
-tubemq-manager provide restful api and tubemq-web use them to provide front-end web pages.
-This page is going to introduce how to set up tubemq-manager environment.
-
-
-# build
-```shell script
-mvn clean package
-```
-
-
-# distribution
-env requirements:
-  1. mysql
-  2. java(1.8+)
-
-In the dist directory, you can find a installable file called `tubemq-manager-bin.zip`. Unzip it
-and add mysql address configuration in `conf/application.properties`
-
-```properties
-spring.jpa.hibernate.ddl-auto=update
-# configuration for manager
-spring.datasource.url=jdbc:mysql://x.x.x.x:3306/tubemanager
-spring.datasource.username=xx
-spring.datasource.password=xxx
-```
-Then setup mysql database called `tubemanager`, start this project by this command
-```shell script
-bin/start-manager.sh
-```
diff --git a/tubemq-manager/bin/start-manager.sh b/tubemq-manager/bin/start-manager.sh
deleted file mode 100755
index a81953d..0000000
--- a/tubemq-manager/bin/start-manager.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-
-#
-# 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.
-#
-
-base_dir=$(dirname $0)
-
-DAEMON_NAME=${DAEMON_NAME:-"tubemq-manager"}
-LOG_DIR=${LOG_DIR:-"$base_dir/../logs"}
-CONF_DIR=${CONF_DIR:-"$base_dir/../conf"}
-LIB_DIR=${LIB_DIR:-"$base_dir/../lib"}
-CONSOLE_OUTPUT_FILE=$LOG_DIR/$DAEMON_NAME.out
-MANAGER_HEAP_OPTS="-Xmx16G -Xms16G"
-MANAGER_GC_OPTS="-XX:+UseG1GC -verbose:gc -verbose:sizes -Xloggc:${LOG_DIR}/gc.log.`date +%Y-%m-%d-%H-%M-%S` -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution"
-
-# create logs directory
-if [ ! -d "$LOG_DIR" ]; then
-  mkdir -p "$LOG_DIR"
-fi
-
-# Exclude jars not necessary for running commands.
-regex="(-(test|test-sources|src|scaladoc|javadoc)\.jar|jar.asc)$"
-should_include_file() {
-  if [ "$INCLUDE_TEST_JARS" = true ]; then
-    return 0
-  fi
-  file=$1
-  if [ -z "$(echo "$file" | egrep "$regex")" ] ; then
-    return 0
-  else
-    return 1
-  fi
-}
-
-for file in ${LIB_DIR}/*.jar;
-do
-  if should_include_file "$file"; then
-    CLASSPATH="$CLASSPATH":"$file"
-  fi
-done
-
-CLASSPATH="${CONF_DIR}":$CLASSPATH
-export MANAGER_JVM_OPTS="${MANAGER_HEAP_OPTS} ${MANAGER_GC_OPTS} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${LOG_DIR}"
-
-# Which java to use
-if [ -z "$JAVA_HOME" ]; then
-  JAVA="java"
-else
-  JAVA="$JAVA_HOME/bin/java"
-fi
-
-nohup "$JAVA" $MANAGER_JVM_OPTS -cp "$CLASSPATH" org.apache.tubemq.manager.TubeMQManager "$@" > "$CONSOLE_OUTPUT_FILE" 2>&1 < /dev/null &
diff --git a/tubemq-manager/bin/stop-manager.sh b/tubemq-manager/bin/stop-manager.sh
deleted file mode 100755
index e26d999..0000000
--- a/tubemq-manager/bin/stop-manager.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-#
-# 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.
-#
-
-SIGNAL=${SIGNAL:-TERM}
-
-if [[ $(uname -s) == "OS/390" ]]; then
-    if [ -z $JOBNAME ]; then
-        JOBNAME="TubeMQManager"
-    fi
-    PIDS=$(ps -A -o pid,jobname,comm | grep -i $JOBNAME | grep java | grep -v grep | awk '{print $1}')
-else
-    PIDS=$(jcmd  | grep -i 'TubeMQManager'  | awk '{print $1}')
-fi
-
-if [ -z "$PIDS" ]; then
-  echo "No tubemq manager server to stop"
-  exit 1
-else
-  kill -s $SIGNAL $PIDS
-  echo "stop tubemq manager .... $PIDS"
-fi
diff --git a/tubemq-manager/conf/logback.xml b/tubemq-manager/conf/logback.xml
deleted file mode 100644
index 97130b2..0000000
--- a/tubemq-manager/conf/logback.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-// 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.
--->
-<configuration>
-    <property name="FILE_ERROR_PATTERN"
-        value="${FILE_LOG_PATTERN:-%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %file:%line: %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
-    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
-    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
-        <filter class="ch.qos.logback.classic.filter.LevelFilter">
-            <level>INFO</level>
-        </filter>
-        <encoder>
-            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <appender name="FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <FileNamePattern>../logs/tubemq-manager.info.%d{yyyy-MM-dd}.part_%i.log</FileNamePattern>
-            <maxHistory>10</maxHistory>
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <maxFileSize>100MB</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-        </rollingPolicy>
-        <encoder>
-            <pattern>${FILE_LOG_PATTERN}</pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <FileNamePattern>../logs/tubemq-manager.error.%d{yyyy-MM-dd}.part_%i.log</FileNamePattern>
-            <maxHistory>10</maxHistory>
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <maxFileSize>100MB</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-        </rollingPolicy>
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>Error</level>
-        </filter>
-        <encoder>
-            <pattern>${FILE_ERROR_PATTERN}</pattern>
-            <charset>UTF-8</charset>
-        </encoder>
-    </appender>
-
-    <root level="info">
-        <appender-ref ref="FILE_INFO"/>
-        <appender-ref ref="FILE_ERROR"/>
-    </root>
-</configuration>
diff --git a/tubemq-manager/pom.xml b/tubemq-manager/pom.xml
deleted file mode 100644
index 16339e0..0000000
--- a/tubemq-manager/pom.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-// 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.3.3.RELEASE</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>tubemq-manager</artifactId>
-
-    <name>Apache TubeMQ - Manager</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-rest</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-validation</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-jpa</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>3.4.1</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>3.3.0</version>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/assembly.xml</descriptor>
-                    </descriptors>
-                    <archive>
-                        <manifest>
-                            <mainClass>com.cyy.MvnPackageApplication</mainClass>
-                        </manifest>
-                    </archive>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <configuration>
-                            <finalName>${project.artifactId}</finalName>
-                            <descriptors>
-                                <descriptor>src/main/assembly/assembly.xml</descriptor>
-                            </descriptors>
-                            <outputDirectory>./dist/</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/tubemq-manager/src/main/assembly/assembly.xml b/tubemq-manager/src/main/assembly/assembly.xml
deleted file mode 100644
index d1ca6ee..0000000
--- a/tubemq-manager/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-// 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.
--->
-<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
-    <id>bin</id>
-    <formats>
-        <format>zip</format>
-    </formats>
-    <dependencySets>
-        <dependencySet>
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>lib</outputDirectory>
-        </dependencySet>
-    </dependencySets>
-    <fileSets>
-        <fileSet>
-            <directory>bin</directory>
-            <outputDirectory>/bin</outputDirectory>
-            <includes>
-                <include>*.sh</include>
-                <include>*.bat</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>conf</directory>
-            <outputDirectory>/conf</outputDirectory>
-            <includes>
-                <include>*.xml</include>
-                <include>*.properties</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/resources</directory>
-            <outputDirectory>/conf</outputDirectory>
-            <includes>
-                <include>*.xml</include>
-                <include>*.properties</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target</directory>
-            <includes>
-                <include>tubemq-manager-*.jar</include>
-            </includes>
-            <outputDirectory>/lib</outputDirectory>
-        </fileSet>
-
-    </fileSets>
-</assembly>
\ No newline at end of file
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/TubeMQManager.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/TubeMQManager.java
deleted file mode 100644
index 114c0bc..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/TubeMQManager.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager;
-
-import java.util.concurrent.Executor;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-
-@SpringBootApplication
-@EnableJpaAuditing
-@EnableAsync
-public class TubeMQManager {
-
-    @Value("${manager.async.core.pool.size:2}")
-    private int asyncCorePoolSize;
-
-    @Value("${manager.async.max.pool.size:20}")
-    private int asyncMaxPoolSize;
-
-    @Value("${manager.async.queue.capacity:100}")
-    private int asyncQueueCapacity;
-
-    @Value("${manager.async.thread.prefix:AsyncThread-}")
-    private String threadPrefix;
-
-    public static void main(String[] args) {
-        SpringApplication.run(TubeMQManager.class);
-    }
-
-    @Bean(name = "asyncExecutor")
-    public Executor asyncExecutor() {
-        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-        executor.setCorePoolSize(asyncCorePoolSize);
-        executor.setMaxPoolSize(asyncMaxPoolSize);
-        executor.setQueueCapacity(asyncQueueCapacity);
-        executor.setThreadNamePrefix(threadPrefix);
-        executor.initialize();
-        return executor;
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/ManagerControllerAdvice.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/ManagerControllerAdvice.java
deleted file mode 100644
index 5053834..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/ManagerControllerAdvice.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.controller;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-
-/**
- * Controller advice for handling exceptions
- */
-@RestControllerAdvice
-public class ManagerControllerAdvice {
-
-    /**
-     * handling exception, and return json format string.
-     *
-     * @param ex
-     * @return
-     */
-    @ExceptionHandler(Exception.class)
-    public TubeResult handlingParameterException(Exception ex) {
-        TubeResult result = new TubeResult();
-        result.setErrMsg(ex.getClass().getName() + " " + ex.getMessage());
-        result.setErrCode(-1);
-        return result;
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/TubeResult.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/TubeResult.java
deleted file mode 100644
index 144d975..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/TubeResult.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.controller;
-
-import lombok.Data;
-
-@Data
-public class TubeResult {
-    private String errMsg;
-    private int errCode = 0;
-    private boolean result = true;
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/cluster/ClusterController.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/cluster/ClusterController.java
deleted file mode 100644
index 58fe8f9..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/cluster/ClusterController.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.controller.cluster;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static org.apache.tubemq.manager.service.TubeHttpConst.SCHEMA;
-
-import com.google.gson.Gson;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
-import org.apache.tubemq.manager.controller.TubeResult;
-import org.apache.tubemq.manager.entry.NodeEntry;
-import org.apache.tubemq.manager.repository.NodeRepository;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequestMapping(path = "/v1/cluster")
-@Slf4j
-public class ClusterController {
-
-    private final CloseableHttpClient httpclient = HttpClients.createDefault();
-    private final Gson gson = new Gson();
-
-    private static final String TUBE_REQUEST_PATH = "webapi.htm";
-
-    @Autowired
-    private NodeRepository nodeRepository;
-
-
-    private String covertMapToQueryString(Map<String, String> requestMap) throws Exception {
-        List<String> queryList = new ArrayList<>();
-
-        for (Map.Entry<String, String> entry : requestMap.entrySet()) {
-            queryList.add(entry.getKey() + "=" + URLEncoder.encode(
-                    entry.getValue(), UTF_8.toString()));
-        }
-        return StringUtils.join(queryList, "&");
-    }
-
-    private String queryMaster(String url) {
-        log.info("start to request {}", url);
-        HttpGet httpGet = new HttpGet(url);
-        TubeResult defaultResult = new TubeResult();
-        try (CloseableHttpResponse response = httpclient.execute(httpGet)) {
-            // return result json to response
-            return EntityUtils.toString(response.getEntity());
-        } catch (Exception ex) {
-            log.error("exception caught while requesting broker status", ex);
-            defaultResult.setErrCode(-1);
-            defaultResult.setResult(false);
-            defaultResult.setErrMsg(ex.getMessage());
-        }
-        return gson.toJson(defaultResult);
-    }
-
-    @RequestMapping(value = "/query", method = RequestMethod.GET,
-            produces = MediaType.APPLICATION_JSON_VALUE)
-    public @ResponseBody String queryInfo(
-            @RequestParam Map<String, String> queryBody) throws Exception {
-        int clusterId = Integer.parseInt(queryBody.get("clusterId"));
-        queryBody.remove("clusterId");
-        NodeEntry nodeEntry =
-                nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(clusterId);
-        String url = SCHEMA + nodeEntry.getIp() + ":" + nodeEntry.getWebPort()
-                + "/" + TUBE_REQUEST_PATH + "?" + covertMapToQueryString(queryBody);
-        return queryMaster(url);
-    }
-
-    /**
-     * modify cluster info, need to check token and
-     * make sure user has authorization to modify it.
-     */
-    @RequestMapping(value = "/modify", method = RequestMethod.POST,
-            produces = MediaType.APPLICATION_JSON_VALUE)
-    public @ResponseBody String modifyClusterInfo(
-            @RequestBody Map<String, String> requestBody) throws Exception {
-        String token = requestBody.get("confModAuthToken");
-        log.info("token is {}, request body size is {}", token, requestBody.keySet());
-        int clusterId = Integer.parseInt(requestBody.get("clusterId"));
-        if (StringUtils.isNotBlank(token)) {
-            requestBody.remove("clusterId");
-            NodeEntry nodeEntry = nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(
-                    clusterId);
-            String url = SCHEMA + nodeEntry.getIp() + ":" + nodeEntry.getWebPort()
-                    + "/" + TUBE_REQUEST_PATH + "?" + covertMapToQueryString(requestBody);
-            return queryMaster(url);
-        } else {
-            TubeResult result = new TubeResult();
-            result.setErrCode(-1);
-            result.setResult(false);
-            result.setErrMsg("token is not correct");
-            return gson.toJson(result);
-        }
-    }
-
-
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/topic/TopicController.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/topic/TopicController.java
deleted file mode 100644
index fdeac4e..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/controller/topic/TopicController.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.controller.topic;
-
-import java.util.List;
-import java.util.Optional;
-import java.util.concurrent.CompletableFuture;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.tubemq.manager.controller.TubeResult;
-import org.apache.tubemq.manager.entry.TopicEntry;
-import org.apache.tubemq.manager.entry.TopicStatus;
-import org.apache.tubemq.manager.exceptions.TubeMQManagerException;
-import org.apache.tubemq.manager.repository.TopicRepository;
-import org.apache.tubemq.manager.service.TopicBackendWorker;
-import org.apache.tubemq.manager.service.TopicFuture;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequestMapping(path = "/business")
-@Slf4j
-public class TopicController {
-
-    @Autowired
-    private TopicRepository topicRepository;
-
-    @Autowired
-    private TopicBackendWorker topicBackendWorker;
-
-    /**
-     * add new topic.
-     *
-     * @return - businessResult
-     * @throws Exception - exception
-     */
-    @PostMapping("/add")
-    public TubeResult addTopic(@RequestBody TopicEntry entry) {
-        // entry in adding status
-        entry.setStatus(TopicStatus.ADDING.value());
-        topicRepository.saveAndFlush(entry);
-        CompletableFuture<TopicEntry> future = new CompletableFuture<>();
-        topicBackendWorker.addTopicFuture(new TopicFuture(entry, future));
-        future.whenComplete((entry1, throwable) -> {
-            entry1.setStatus(TopicStatus.SUCCESS.value());
-            if (throwable != null) {
-                // if throwable is not success, mark it as failed.
-                entry1.setStatus(TopicStatus.FAILED.value());
-                log.error("exception caught", throwable);
-            }
-            topicRepository.saveAndFlush(entry1);
-        });
-        return new TubeResult();
-    }
-
-    /**
-     * update topic
-     *
-     * @return
-     * @throws Exception
-     */
-    @PostMapping("/update")
-    public TubeResult updateTopic(@RequestBody TopicEntry entry) {
-        return new TubeResult();
-    }
-
-    /**
-     * Check topic status by business name.
-     *
-     * @return
-     * @throws Exception
-     */
-    @GetMapping("/check")
-    public TubeResult checkTopicByBusinessName(
-            @RequestParam String businessName) {
-        List<TopicEntry> result = topicRepository.findAllByBusinessName(businessName);
-        return new TubeResult();
-    }
-
-    /**
-     * get topic by id.
-     *
-     * @param id business id
-     * @return BusinessResult
-     * @throws Exception
-     */
-    @GetMapping("/get/{id}")
-    public TubeResult getBusinessByID(
-            @PathVariable Long id) {
-        Optional<TopicEntry> businessEntry = topicRepository.findById(id);
-        TubeResult result = new TubeResult();
-        if (!businessEntry.isPresent()) {
-            result.setErrCode(-1);
-            result.setErrMsg("business not found");
-        }
-        return result;
-    }
-
-    /**
-     * test for exception situation.
-     * @return
-     */
-    @GetMapping("/throwException")
-    public TubeResult throwException() {
-        throw new TubeMQManagerException("exception for test");
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/NodeEntry.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/NodeEntry.java
deleted file mode 100644
index 54c4236..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/NodeEntry.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.entry;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import lombok.Data;
-
-/**
- * node machine for tube cluster. broker/master/standby
- */
-@Entity
-@Table(name = "node")
-@Data
-public class NodeEntry {
-    @Id
-    @GeneratedValue(strategy= GenerationType.AUTO)
-    private long brokerId;
-
-    private boolean master;
-
-    private boolean standby;
-
-    private boolean broker;
-
-    private String ip;
-
-    private int port;
-
-    private int webPort;
-
-    private int clusterId;
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicEntry.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicEntry.java
deleted file mode 100644
index 17b7711..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicEntry.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.entry;
-
-import java.sql.Date;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EntityListeners;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import lombok.Data;
-import org.hibernate.annotations.CreationTimestamp;
-import org.springframework.data.jpa.domain.support.AuditingEntityListener;
-
-@Entity
-@Table(name = "topic")
-@Data
-@EntityListeners(AuditingEntityListener.class) // support CreationTimestamp annotation
-public class TopicEntry {
-    @Id
-    @GeneratedValue(strategy=GenerationType.AUTO)
-    private long businessId;
-
-    @Size(max = 30)
-    @NotNull
-    private String businessName;
-
-    @Size(max = 64)
-    private String messageType;
-
-    @Size(max = 256)
-    private String businessCnName;
-
-    @Size(max = 256)
-    private String description;
-
-    private String bg;
-
-    @Size(max = 240)
-    @NotNull
-    private String schemaName;
-
-    @Size(max = 32)
-    @NotNull
-    private String username;
-
-    @Size(max = 64)
-    @NotNull
-    private String passwd;
-
-    @Size(max = 64)
-    @NotNull
-    private String topic;
-
-    @Size(max = 10)
-    private String fieldSplitter;
-
-    @Size(max = 256)
-    private String predefinedFields;
-
-    private int isHybridDataSource = 0;
-
-    @Size(max = 64)
-    @NotNull
-    private String encodingType;
-
-    private int isSubSort = 0;
-
-    private String topologyName;
-
-    private String targetServer;
-
-    private String targetServerPort;
-
-    private String netTarget;
-
-    private int status;
-
-    private String category;
-
-    private int clusterId;
-
-    private String inCharge;
-
-    private String sourceServer;
-
-    private String baseDir;
-
-    @CreationTimestamp
-    private Date createTime;
-
-    private String importType;
-
-    private String exampleData;
-
-    private String tdwAppgroup;
-
-    @Column(name = "SN")
-    private int sn;
-
-    @Size(max = 32)
-    private String issueMethod;
-
-
-    public TopicEntry(String businessName, String schemaName,
-            String username, String passwd, String topic, String encodingType) {
-        this.businessName = businessName;
-        this.schemaName = schemaName;
-        this.username = username;
-        this.passwd = passwd;
-        this.topic = topic;
-        this.encodingType = encodingType;
-    }
-
-    public TopicEntry() {
-
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicStatus.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicStatus.java
deleted file mode 100644
index e5796af..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/entry/TopicStatus.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.entry;
-
-public enum TopicStatus {
-
-    ADDING(0), SUCCESS(1), FAILED(2), RETRY(3);
-
-    private int value = 0;
-
-    private TopicStatus(int value) {
-        this.value = value;
-    }
-
-    public int value() {
-        return this.value;
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/exceptions/TubeMQManagerException.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/exceptions/TubeMQManagerException.java
deleted file mode 100644
index 46c888c..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/exceptions/TubeMQManagerException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.exceptions;
-
-/**
- * TubeMQ runtime exception.
- */
-public class TubeMQManagerException extends RuntimeException {
-
-    public TubeMQManagerException(final String message) {
-        super(message);
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/NodeRepository.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/NodeRepository.java
deleted file mode 100644
index 4bf6ec7..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/NodeRepository.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.repository;
-
-import org.apache.tubemq.manager.entry.NodeEntry;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface NodeRepository extends JpaRepository<NodeEntry, Long> {
-
-    NodeEntry findNodeEntryByClusterIdIsAndMasterIsTrue(int clusterId);
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/TopicRepository.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/TopicRepository.java
deleted file mode 100644
index 4c88949..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/repository/TopicRepository.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.repository;
-
-import java.util.List;
-import org.apache.tubemq.manager.entry.TopicEntry;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface TopicRepository extends JpaRepository<TopicEntry, Long> {
-
-   /**
-    * get all topicEntry list by business name
-    * @param businessName
-    * @return
-    */
-   List<TopicEntry> findAllByBusinessName(String businessName);
-
-   /**
-    * get one topicEntry by business name
-    * @param businessName
-    * @return
-    */
-   TopicEntry findByBusinessName(String businessName);
-
-}
-
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/NodeService.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/NodeService.java
deleted file mode 100644
index 4e0db3e..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/NodeService.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service;
-
-
-import static org.apache.tubemq.manager.service.TubeHttpConst.ADD_TUBE_TOPIC;
-import static org.apache.tubemq.manager.service.TubeHttpConst.BROKER_RUN_STATUS;
-import static org.apache.tubemq.manager.service.TubeHttpConst.RELOAD_BROKER;
-import static org.apache.tubemq.manager.service.TubeHttpConst.SCHEMA;
-import static org.apache.tubemq.manager.service.TubeHttpConst.TOPIC_CONFIG_INFO;
-
-import com.google.gson.Gson;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.tubemq.manager.entry.NodeEntry;
-import org.apache.tubemq.manager.repository.NodeRepository;
-import org.apache.tubemq.manager.service.tube.TubeHttpBrokerInfoList;
-import org.apache.tubemq.manager.service.tube.TubeHttpResponse;
-import org.apache.tubemq.manager.service.tube.TubeHttpTopicInfoList;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-
-/**
- * node service to query broker/master/standby status of tube cluster.
- */
-@Slf4j
-public class NodeService {
-
-    private final CloseableHttpClient httpclient = HttpClients.createDefault();
-    private final Gson gson = new Gson();
-
-    @Value("${manager.max.configurable.broker.size:50}")
-    private int maxConfigurableBrokerSize;
-
-    @Value("${manager.max.retry.adding.topic:10}")
-    private int maxRetryAddingTopic;
-
-    private final TopicBackendWorker worker;
-
-    @Autowired
-    private NodeRepository nodeRepository;
-
-    public NodeService(TopicBackendWorker worker) {
-        this.worker = worker;
-    }
-
-    /**
-     * request node status via http.
-     *
-     * @param nodeEntry - node entry
-     * @return
-     * @throws IOException
-     */
-    private TubeHttpBrokerInfoList requestClusterNodeStatus(NodeEntry nodeEntry) throws IOException {
-        String url = SCHEMA + nodeEntry.getIp() + ":" + nodeEntry.getWebPort() + BROKER_RUN_STATUS;
-        HttpGet httpget = new HttpGet(url);
-        try (CloseableHttpResponse response = httpclient.execute(httpget)) {
-            TubeHttpBrokerInfoList brokerInfoList =
-                    gson.fromJson(new InputStreamReader(response.getEntity().getContent()),
-                            TubeHttpBrokerInfoList.class);
-            // request return normal.
-            if (brokerInfoList.getCode() == 0) {
-                // divide by state.
-                brokerInfoList.divideBrokerListByState();
-                return brokerInfoList;
-            }
-        } catch (Exception ex) {
-            log.error("exception caught while requesting broker status", ex);
-        }
-        return null;
-    }
-
-
-    private TubeHttpTopicInfoList requestTopicConfigInfo(NodeEntry nodeEntry, String topic) {
-        String url = SCHEMA + nodeEntry.getIp() + ":" + nodeEntry.getWebPort()
-                + TOPIC_CONFIG_INFO + "&topicName=" + topic;
-        HttpGet httpget = new HttpGet(url);
-        try (CloseableHttpResponse response = httpclient.execute(httpget)) {
-            TubeHttpTopicInfoList topicInfoList =
-                    gson.fromJson(new InputStreamReader(response.getEntity().getContent()),
-                            TubeHttpTopicInfoList.class);
-            if (topicInfoList.getErrCode() == 0) {
-                return topicInfoList;
-            }
-        } catch (Exception ex) {
-            log.error("exception caught while requesting broker status", ex);
-        }
-        return null;
-    }
-
-
-    private boolean configBrokersForTopics(NodeEntry nodeEntry,
-            Set<String> topics, List<Integer> brokerList, int maxBrokers) {
-        List<Integer> finalBrokerList = brokerList.subList(0, maxBrokers);
-        String brokerStr = StringUtils.join(finalBrokerList, ",");
-        String topicStr = StringUtils.join(topics, ",");
-        String url = SCHEMA + nodeEntry.getIp() + ":" + nodeEntry.getWebPort()
-                + ADD_TUBE_TOPIC  + "&topicName=" + topicStr + "&brokerId=" + brokerStr;
-        HttpGet httpget = new HttpGet(url);
-        try (CloseableHttpResponse response = httpclient.execute(httpget)) {
-            TubeHttpResponse result =
-                    gson.fromJson(new InputStreamReader(response.getEntity().getContent()),
-                            TubeHttpResponse.class);
-            return result.getCode() == 0 && result.getErrCode() == 0;
-        } catch (Exception ex) {
-            log.error("exception caught while requesting broker status", ex);
-        }
-        return false;
-    }
-
-    /**
-     * handle result, if success, complete it,
-     * if not success, add back to queue without exceeding max retry,
-     * otherwise complete it with exception.
-     *
-     * @param isSuccess
-     * @param topics
-     * @param pendingTopic
-     */
-    private void handleAddingResult(boolean isSuccess, Set<String> topics,
-            Map<String, TopicFuture> pendingTopic) {
-        for (String topic : topics) {
-            TopicFuture future = pendingTopic.get(topic);
-            if (future != null) {
-                if (isSuccess) {
-                    future.complete();
-                } else {
-                    future.increaseRetryTime();
-                    if (future.getRetryTime() > maxRetryAddingTopic) {
-                        future.completeExceptional();
-                    } else {
-                        // add back to queue.
-                        worker.addTopicFuture(future);
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Adding topic is an async operation, so this method should
-     * 1. check whether pendingTopic contains topic that has failed/succeeded to be added.
-     * 2. async add topic to tubemq cluster
-     *
-     * @param brokerInfoList - broker list
-     * @param pendingTopic - topicMap
-     */
-    private void handleAddingTopic(NodeEntry nodeEntry,
-            TubeHttpBrokerInfoList brokerInfoList,
-            Map<String, TopicFuture> pendingTopic) {
-        // 1. check tubemq cluster by topic name, remove pending topic if has added.
-        Set<String> brandNewTopics = new HashSet<>();
-        for (String topic : pendingTopic.keySet()) {
-            TubeHttpTopicInfoList topicInfoList = requestTopicConfigInfo(nodeEntry, topic);
-            if (topicInfoList != null) {
-                // get broker list by topic request
-                List<Integer> topicBrokerList = topicInfoList.getTopicBrokerIdList();
-                if (topicBrokerList.isEmpty()) {
-                    brandNewTopics.add(topic);
-                } else {
-                    // remove brokers which have been added.
-                    List<Integer> configurableBrokerIdList =
-                            brokerInfoList.getConfigurableBrokerIdList();
-                    configurableBrokerIdList.removeAll(topicBrokerList);
-                    // add topic to satisfy max broker number.
-                    Set<String> singleTopic = new HashSet<>();
-                    singleTopic.add(topic);
-                    int maxBrokers = maxConfigurableBrokerSize - topicBrokerList.size();
-                    boolean isSuccess = configBrokersForTopics(nodeEntry, singleTopic,
-                            configurableBrokerIdList, maxBrokers);
-                    handleAddingResult(isSuccess, singleTopic, pendingTopic);
-                }
-            }
-        }
-        // 2. add new topics to cluster
-        List<Integer> configurableBrokerIdList = brokerInfoList.getConfigurableBrokerIdList();
-        int maxBrokers = Math.min(maxConfigurableBrokerSize, configurableBrokerIdList.size());
-        boolean isSuccess = configBrokersForTopics(nodeEntry, brandNewTopics,
-                configurableBrokerIdList, maxBrokers);
-        handleAddingResult(isSuccess, brandNewTopics, pendingTopic);
-    }
-
-    /**
-     * reload broker list, cannot exceed maxConfigurableBrokerSize each time.
-     *
-     * @param nodeEntry
-     * @param needReloadList
-     */
-    private void handleReloadBroker(NodeEntry nodeEntry, List<Integer> needReloadList) {
-        // reload without exceed max broker.
-        int begin = 0;
-        int end = 0;
-        do {
-            end = Math.min(maxConfigurableBrokerSize + begin, needReloadList.size());
-            List<Integer> brokerIdList = needReloadList.subList(begin, end);
-            String brokerStr = StringUtils.join(brokerIdList, ",");
-            String url = SCHEMA + nodeEntry.getIp() + ":" + nodeEntry.getWebPort()
-                    + RELOAD_BROKER + "&brokerId=" + brokerStr;
-            HttpGet httpget = new HttpGet(url);
-            try (CloseableHttpResponse response = httpclient.execute(httpget)) {
-                TubeHttpResponse result =
-                        gson.fromJson(new InputStreamReader(response.getEntity().getContent()),
-                                TubeHttpResponse.class);
-                if (result.getErrCode() == 0 && result.getCode() == 0) {
-                    log.info("reload tube broker cgi: " +
-                            url + " ; return value : " + result.getCode());
-                }
-            } catch (Exception ex) {
-                log.error("exception caught while requesting broker status", ex);
-            }
-            begin = end;
-        } while (end >= needReloadList.size());
-    }
-
-
-
-    /**
-     * update broker status
-     */
-    public void updateBrokerStatus(int clusterId, Map<String, TopicFuture> pendingTopic) {
-        NodeEntry nodeEntry = nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(clusterId);
-        if (nodeEntry != null) {
-            try {
-                TubeHttpBrokerInfoList brokerInfoList = requestClusterNodeStatus(nodeEntry);
-                if (brokerInfoList != null) {
-                    handleAddingTopic(nodeEntry, brokerInfoList, pendingTopic);
-                }
-
-                // refresh broker list
-                brokerInfoList = requestClusterNodeStatus(nodeEntry);
-                if (brokerInfoList != null) {
-                    handleReloadBroker(nodeEntry, brokerInfoList.getNeedReloadList());
-                }
-
-            } catch (Exception ex) {
-                log.error("exception caught while requesting broker status", ex);
-            }
-        } else {
-            log.error("cannot get master ip by clusterId {}, please check it", clusterId);
-        }
-    }
-
-    public void close() throws IOException {
-        httpclient.close();
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicBackendWorker.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicBackendWorker.java
deleted file mode 100644
index 86b72d5..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicBackendWorker.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.tubemq.manager.repository.TopicRepository;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-/**
- * Topic backend thread worker.
- */
-@Component
-@Slf4j
-public class TopicBackendWorker implements DisposableBean, Runnable  {
-    private final AtomicBoolean runFlag = new AtomicBoolean(true);
-    private final ConcurrentHashMap<Integer, BlockingQueue<TopicFuture>> pendingTopics =
-            new ConcurrentHashMap<>();
-    private final AtomicInteger notSatisfiedCount = new AtomicInteger(0);
-    private final NodeService nodeService;
-
-    @Autowired
-    private TopicRepository topicRepository;
-
-    @Value("${manager.topic.queue.warning.size:100}")
-    private int queueWarningSize;
-
-    // value in seconds
-    @Value("${manager.topic.queue.thread.interval:10}")
-    private int queueThreadInterval;
-
-    @Value("${manager.topic.queue.max.wait:3}")
-    private int queueMaxWait;
-
-    @Value("${manager.topic.queue.max.running.size:20}")
-    private int queueMaxRunningSize;
-
-    TopicBackendWorker() {
-        Thread thread = new Thread(this);
-        // daemon thread
-        thread.setDaemon(true);
-        thread.start();
-        nodeService = new NodeService(this);
-    }
-
-    /**
-     * add topic future to pending executing queue.
-     * @param future - TopicFuture.
-     */
-    public void addTopicFuture(TopicFuture future) {
-        BlockingQueue<TopicFuture> tmpQueue = new LinkedBlockingQueue<>();
-        BlockingQueue<TopicFuture> queue = pendingTopics.putIfAbsent(
-                future.getEntry().getClusterId(), tmpQueue);
-        if (queue == null) {
-            queue = tmpQueue;
-        }
-        queue.add(future);
-        if (queue.size() > queueWarningSize) {
-            log.warn("queue size exceed {}, please check it", queueWarningSize);
-        }
-    }
-
-    /**
-     * batch executing adding topic, wait util max n seconds or max size satisfied.
-     */
-    private void batchAddTopic() {
-        pendingTopics.forEach((clusterId, queue) -> {
-            Map<String, TopicFuture> pendingTopicList = new HashMap<>();
-            if (notSatisfiedCount.get() > queueMaxWait || queue.size() > queueMaxRunningSize) {
-                notSatisfiedCount.set(0);
-                List<TopicFuture> tmpTopicList = new ArrayList<>();
-                queue.drainTo(tmpTopicList, queueMaxRunningSize);
-                for (TopicFuture topicFuture : tmpTopicList) {
-                    pendingTopicList.put(topicFuture.getEntry().getTopic(), topicFuture);
-                }
-            } else {
-                notSatisfiedCount.incrementAndGet();
-            }
-            // update broker status
-            nodeService.updateBrokerStatus(clusterId, pendingTopicList);
-        });
-
-    }
-
-    /**
-     * check topic from db
-     */
-    private void checkTopicFromDB() {
-    }
-
-    @Override
-    public void run() {
-        log.info("TopicBackendWorker has started");
-        while (runFlag.get()) {
-            try {
-                batchAddTopic();
-                checkTopicFromDB();
-                TimeUnit.SECONDS.sleep(queueThreadInterval);
-            } catch (Exception exception) {
-                log.warn("exception caught", exception);
-            }
-        }
-    }
-
-    @Override
-    public void destroy() throws Exception {
-        runFlag.set(false);
-        nodeService.close();
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicFuture.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicFuture.java
deleted file mode 100644
index 62b0e2d..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TopicFuture.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service;
-
-import java.util.concurrent.CompletableFuture;
-import lombok.Getter;
-import org.apache.tubemq.manager.entry.TopicEntry;
-
-/**
- * topic business with future.
- */
-public class TopicFuture {
-    @Getter
-    private int retryTime = 0;
-    @Getter
-    private final TopicEntry entry;
-    @Getter
-    private final CompletableFuture<TopicEntry> future;
-
-    public TopicFuture(TopicEntry entry, CompletableFuture<TopicEntry> future) {
-        this.entry = entry;
-        this.future = future;
-    }
-
-    /**
-     * record retry time.
-     */
-    public void increaseRetryTime() {
-        retryTime += 1;
-    }
-
-    /**
-     * when topic operation finished, complete it.
-     */
-    public void complete() {
-        this.future.complete(this.entry);
-    }
-
-    public void completeExceptional() {
-        this.future.completeExceptionally(new RuntimeException("exceed max retry "
-                + retryTime +" adding"));
-    }
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TubeHttpConst.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TubeHttpConst.java
deleted file mode 100644
index 81a360e..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/TubeHttpConst.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service;
-
-public class TubeHttpConst {
-    public static final String SCHEMA = "http://";
-    public static final String BROKER_RUN_STATUS =
-            "/webapi.htm?type=op_query&method=admin_query_broker_run_status";
-    public static final String TOPIC_CONFIG_INFO =
-            "/webapi.htm?type=op_query&method=admin_query_topic_info";
-    public static final String ADD_TUBE_TOPIC =
-            "/webapi.htm?type=op_modify&method=admin_add_new_topic_record";
-    public static final String RELOAD_BROKER =
-            "/webapi.htm?type=op_modify&method=admin_reload_broker_configure";
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpBrokerInfoList.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpBrokerInfoList.java
deleted file mode 100644
index c768aa1..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpBrokerInfoList.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service.tube;
-
-import java.util.ArrayList;
-import java.util.List;
-import lombok.Data;
-
-/**
- * json class for broker info list from master http service.
- */
-@Data
-public class TubeHttpBrokerInfoList {
-
-    /**
-     * json class for broker info.
-     */
-    @Data
-    public static class BrokerInfo {
-        private int brokerId;
-        private String brokerIp;
-        private int brokerPort;
-        private String manageStatus;
-        private String runStatus;
-        private String subStatus;
-        private int stepOp;
-        private boolean isConfChanged;
-        private boolean isConfLoaded;
-        private boolean isBrokerOnline;
-        private String brokerVersion;
-        private boolean acceptPublish;
-        private boolean acceptSubscribe;
-
-        public boolean isIdle() {
-            return subStatus != null && subStatus.equals("idle");
-        }
-
-        public boolean isWorking() {
-            if (runStatus != null && manageStatus != null) {
-                return runStatus.equals("running") && (
-                        manageStatus.equals("online") ||
-                        manageStatus.equals("only-read") ||
-                        manageStatus.equals("only-write"));
-            }
-            return false;
-        }
-
-        public boolean isConfigurable() {
-            return stepOp == -2 || stepOp == 31 || stepOp == 32;
-        }
-
-        @Override
-        public int hashCode() {
-            return brokerId;
-        }
-
-        @Override
-        public boolean equals(Object o) {
-
-            if (o == this) return true;
-            if (!(o instanceof BrokerInfo)) {
-                return false;
-            }
-
-            BrokerInfo brokerInfo = (BrokerInfo) o;
-
-            return brokerId == brokerInfo.brokerId;
-        }
-    }
-
-    private int code;
-    private String errMsg;
-    // total broker info list of brokers.
-    private List<BrokerInfo> data;
-    // configurable list of brokers.
-    private List<BrokerInfo> configurableList;
-    // working state list of brokers
-    private List<BrokerInfo> workingList;
-    // idle broker list
-    private List<BrokerInfo> idleList;
-    // need reload broker list
-    private List<Integer> needReloadList;
-
-    /**
-     * divide broker list into different list by broker state.
-     */
-    public void divideBrokerListByState() {
-        if (data != null) {
-            configurableList = new ArrayList<>();
-            workingList = new ArrayList<>();
-            idleList = new ArrayList<>();
-            needReloadList = new ArrayList<>();
-            for (BrokerInfo brokerInfo : data) {
-                if (brokerInfo.isConfigurable()) {
-                    configurableList.add(brokerInfo);
-                }
-                if (brokerInfo.isWorking()) {
-                    workingList.add(brokerInfo);
-                }
-                if (brokerInfo.isIdle()) {
-                    idleList.add(brokerInfo);
-                }
-                if (brokerInfo.isConfChanged) {
-                    needReloadList.add(brokerInfo.getBrokerId());
-                }
-            }
-        }
-    }
-
-    public List<Integer> getConfigurableBrokerIdList() {
-        List<Integer> tmpBrokerIdList = new ArrayList<>();
-        if (configurableList != null) {
-            for (BrokerInfo brokerInfo : configurableList) {
-                tmpBrokerIdList.add(brokerInfo.getBrokerId());
-            }
-        }
-        return tmpBrokerIdList;
-    }
-
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpResponse.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpResponse.java
deleted file mode 100644
index bc30025..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpResponse.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service.tube;
-
-import lombok.Data;
-
-/**
- * common response json str for tube htt request
- */
-@Data
-public class TubeHttpResponse {
-    private int code;
-    private String errMsg;
-    private int errCode;
-}
diff --git a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpTopicInfoList.java b/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpTopicInfoList.java
deleted file mode 100644
index 7131b83..0000000
--- a/tubemq-manager/src/main/java/org/apache/tubemq/manager/service/tube/TubeHttpTopicInfoList.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service.tube;
-
-import java.util.ArrayList;
-import java.util.List;
-import lombok.Data;
-import org.apache.tubemq.manager.service.tube.TubeHttpTopicInfoList.TopicInfoList.TopicInfo;
-
-/**
- * json class for topic info list from master http service.
- */
-@Data
-public class TubeHttpTopicInfoList {
-    private boolean result;
-
-    private String errMsg;
-
-    private int errCode;
-
-    private List<TopicInfoList> data;
-
-    @Data
-    public static class TopicInfoList {
-
-        @Data
-        public static class TopicInfo {
-
-            @Data
-            public static class RunInfo {
-                private boolean acceptPublish;
-                private boolean acceptSubscribe;
-                private int numPartitions;
-                private int numTopicStores;
-                private String brokerManageStatus;
-            }
-
-
-            private String topicName;
-            private int topicStatusId;
-            private int brokerId;
-            private String brokerIp;
-            private int brokerPort;
-            private int numPartitions;
-            private int unflushThreshold;
-            private int unflushInterval;
-            private int unFlushDataHold;
-            private String deleteWhen;
-            private String deletePolicy;
-            private boolean acceptPublish;
-            private boolean acceptSubscribe;
-            private int numTopicStores;
-            private int memCacheMsgSizeInMB;
-            private int memCacheFlushIntvl;
-            private int memCacheMsgCntInK;
-            private String createUser;
-            private String createDate;
-            private String modifyUser;
-            private String modifyDate;
-            private RunInfo runInfo;
-
-        }
-
-        private String topicName;
-        private List<TopicInfo> topicInfo;
-    }
-
-
-    public List<Integer> getTopicBrokerIdList() {
-        List<Integer> tmpBrokerIdList = new ArrayList<>();
-        if (data != null) {
-            for (TopicInfoList topicInfoList : data) {
-                if (topicInfoList.getTopicInfo() != null) {
-                    for (TopicInfo topicInfo : topicInfoList.getTopicInfo()) {
-                        tmpBrokerIdList.add(topicInfo.getBrokerId());
-                    }
-                }
-            }
-        }
-        return tmpBrokerIdList;
-    }
-}
diff --git a/tubemq-manager/src/main/resources/application.properties b/tubemq-manager/src/main/resources/application.properties
deleted file mode 100644
index dee51b7..0000000
--- a/tubemq-manager/src/main/resources/application.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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
-# <p>
-# http://www.apache.org/licenses/LICENSE-2.0
-# <p>
-# 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.
-
-spring.jpa.hibernate.ddl-auto=update
-# configuration for manager
diff --git a/tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestBusinessController.java b/tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestBusinessController.java
deleted file mode 100644
index 9a497cf..0000000
--- a/tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestBusinessController.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.controller;
-
-import java.net.URI;
-import java.util.Objects;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.tubemq.manager.controller.topic.TopicController;
-import org.apache.tubemq.manager.entry.TopicEntry;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-import org.springframework.boot.web.server.LocalServerPort;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.ResponseEntity;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.servlet.MockMvc;
-import org.springframework.test.web.servlet.RequestBuilder;
-import org.springframework.test.web.servlet.setup.MockMvcBuilders;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-
-@RunWith(SpringRunner.class)
-@AutoConfigureMockMvc
-@SpringBootTest(webEnvironment= WebEnvironment.RANDOM_PORT)
-@Slf4j
-public class TestBusinessController {
-
-    @Autowired
-    private TestRestTemplate client;
-
-    @LocalServerPort
-    private int randomServerPort;
-
-    private MockMvc mvc;
-
-    @Before
-    public void setUp() {
-        mvc = MockMvcBuilders.standaloneSetup(new TopicController()).build();
-    }
-
-    @Test
-    public void test404Controller() throws Exception {
-        RequestBuilder request;
-        // get request, path not exists
-        request = get("/business");
-        mvc.perform(request)
-                .andExpect(status().isNotFound());
-    }
-
-    @Test
-    public void testAddBusiness() throws Exception {
-        final String baseUrl = "http://localhost:" + randomServerPort + "/business/add";
-        URI uri = new URI(baseUrl);
-        String demoName = "test";
-        TopicEntry entry = new TopicEntry(demoName, demoName, demoName,
-                demoName, demoName, demoName);
-
-        HttpHeaders headers = new HttpHeaders();
-        HttpEntity<TopicEntry> request = new HttpEntity<>(entry, headers);
-
-        ResponseEntity<TubeResult> responseEntity =
-                client.postForEntity(uri, request, TubeResult.class);
-        assertThat(responseEntity.getStatusCode().is2xxSuccessful()).isEqualTo(true);
-    }
-
-    @Test
-    public void testControllerException() throws Exception {
-        final String baseUrl = "http://localhost:" + randomServerPort + "/business/throwException";
-        URI uri = new URI(baseUrl);
-        ResponseEntity<TubeResult> responseEntity =
-                client.getForEntity(uri, TubeResult.class);
-        assertThat(Objects.requireNonNull(responseEntity.getBody()).getErrCode()).isEqualTo(-1);
-        assertTrue(responseEntity.getBody().getErrMsg().contains("exception for test"));
-    }
-}
diff --git a/tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestClusterController.java b/tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestClusterController.java
deleted file mode 100644
index efd1cb1..0000000
--- a/tubemq-manager/src/test/java/org/apache/tubemq/manager/controller/TestClusterController.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.controller;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.when;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
-import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
-
-import com.google.gson.Gson;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.tubemq.manager.controller.cluster.ClusterController;
-import org.apache.tubemq.manager.entry.NodeEntry;
-import org.apache.tubemq.manager.repository.NodeRepository;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.mock.mockito.MockBean;
-import org.springframework.http.MediaType;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.web.servlet.MockMvc;
-import org.springframework.test.web.servlet.MvcResult;
-import org.springframework.test.web.servlet.RequestBuilder;
-
-@Slf4j
-@RunWith(SpringRunner.class)
-@SpringBootTest
-@AutoConfigureMockMvc
-public class TestClusterController {
-
-    private final Gson gson = new Gson();
-
-    @MockBean
-    private NodeRepository nodeRepository;
-
-    @InjectMocks
-    private ClusterController clusterController;
-
-    @Autowired
-    private MockMvc mockMvc;
-
-    private NodeEntry getNodeEntry() {
-        NodeEntry nodeEntry = new NodeEntry();
-        nodeEntry.setMaster(true);
-        nodeEntry.setIp("127.0.0.1");
-        nodeEntry.setWebPort(8080);
-        return nodeEntry;
-    }
-
-    @Test
-    public void testExceptionQuery() throws Exception {
-        NodeEntry nodeEntry = getNodeEntry();
-        when(nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(any(Integer.class)))
-                .thenReturn(nodeEntry);
-        RequestBuilder request = get(
-                "/v1/cluster/query?method=admin_query_topic_info&type=op_query");
-        MvcResult result = mockMvc.perform(request).andReturn();
-        String resultStr = result.getResponse().getContentAsString();
-        TubeResult clusterResult = gson.fromJson(resultStr, TubeResult.class);
-        Assert.assertEquals(-1, clusterResult.getErrCode());
-        Assert.assertTrue(clusterResult.getErrMsg().contains("NumberFormatException"));
-    }
-
-    @Test
-    public void testTopicQuery() throws Exception {
-        NodeEntry nodeEntry = getNodeEntry();
-        when(nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(any(Integer.class)))
-                .thenReturn(nodeEntry);
-        RequestBuilder request = get(
-                "/v1/cluster/query?method=admin_query_topic_info&type=op_query&clusterId=1");
-        MvcResult result = mockMvc.perform(request).andReturn();
-        String resultStr = result.getResponse().getContentAsString();
-        log.info("result json string is {}, response type is {}", resultStr,
-                result.getResponse().getContentType());
-    }
-
-    @Test
-    public void testBrokerQuery() throws Exception {
-        NodeEntry nodeEntry = getNodeEntry();
-        when(nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(any(Integer.class)))
-                .thenReturn(nodeEntry);
-        RequestBuilder request = get(
-                "/v1/cluster/query?method=admin_query_broker_run_status&type=op_query&clusterId=1&brokerIp=");
-        MvcResult result = mockMvc.perform(request).andReturn();
-        String resultStr = result.getResponse().getContentAsString();
-        log.info("result json string is {}, response type is {}", resultStr,
-                result.getResponse().getContentType());
-    }
-
-    @Test
-    public void testTopicAndGroupQuery() throws Exception {
-        NodeEntry nodeEntry = getNodeEntry();
-        when(nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(any(Integer.class)))
-                .thenReturn(nodeEntry);
-        RequestBuilder request = get(
-                "/v1/cluster/query?method=admin_query_sub_info&type=op_query&clusterId=1&topicName=test&groupName=test");
-        MvcResult result = mockMvc.perform(request).andReturn();
-        String resultStr = result.getResponse().getContentAsString();
-        log.info("result json string is {}, response type is {}", resultStr,
-                result.getResponse().getContentType());
-    }
-
-    @Test
-    public void testTopicAdd() throws Exception {
-        String jsonStr = "{\n"
-                + "  \"type\": \"op_modify\",\n"
-                + "  \"method\": \"admin_add_new_topic_record\",\n"
-                + "  \"confModAuthToken\": \"test\",\n"
-                + "  \"clusterId\": 1,\n"
-                + "  \"createUser\": \"webapi\",\n"
-                + "  \"topicName\": \"test\",\n"
-                + "  \"deleteWhen\": \"0 0 0 0 0\",\n"
-                + "  \"unflushThreshold\": 1000,\n"
-                + "  \"acceptPublish\": true,\n"
-                + "  \"numPartitions\": 3,\n"
-                + "  \"deletePolicy\": \"\",\n"
-                + "  \"unflushInterval\": 1000,\n"
-                + "  \"acceptSubscribe\": true,\n"
-                + "  \"brokerId\": 12323\n"
-                + "}\n";
-        NodeEntry nodeEntry = getNodeEntry();
-        when(nodeRepository.findNodeEntryByClusterIdIsAndMasterIsTrue(any(Integer.class)))
-                .thenReturn(nodeEntry);
-        RequestBuilder request = post("/v1/cluster/modify")
-                .contentType(MediaType.APPLICATION_JSON).content(jsonStr);
-        MvcResult result = mockMvc.perform(request).andReturn();
-        String resultStr = result.getResponse().getContentAsString();
-        log.info("result json string is {}, response type is {}", resultStr,
-                result.getResponse().getContentType());
-    }
-}
diff --git a/tubemq-manager/src/test/java/org/apache/tubemq/manager/repository/TestBusinessRepository.java b/tubemq-manager/src/test/java/org/apache/tubemq/manager/repository/TestBusinessRepository.java
deleted file mode 100644
index 7bd8c73..0000000
--- a/tubemq-manager/src/test/java/org/apache/tubemq/manager/repository/TestBusinessRepository.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.repository;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import org.apache.tubemq.manager.entry.TopicEntry;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
-import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@DataJpaTest
-public class TestBusinessRepository {
-    @Autowired
-    private TestEntityManager entityManager;
-
-    @Autowired
-    private TopicRepository businessRepository;
-
-    @Test
-    public void whenFindByNameThenReturnBusiness() {
-        String demoName = "alex";
-        TopicEntry businessEntry = new TopicEntry(demoName, demoName,
-                demoName, demoName, demoName, demoName);
-        entityManager.persist(businessEntry);
-        entityManager.flush();
-
-        TopicEntry businessEntry1 = businessRepository.findByBusinessName("alex");
-        assertThat(businessEntry1.getBusinessName()).isEqualTo(businessEntry.getBusinessName());
-    }
-
-    @Test
-    public void checkValidation() throws Exception {
-        String demoName = "a";
-        TopicEntry businessEntry = new TopicEntry(demoName, demoName, demoName,
-                demoName, demoName, demoName);
-        StringBuilder builder = new StringBuilder();
-
-        for (int i = 0; i < 512; i ++) {
-            builder.append("a");
-        }
-        businessEntry.setBusinessName(builder.toString());
-        try {
-            entityManager.persist(businessEntry);
-            entityManager.flush();
-        } catch (Exception ex) {
-            assertThat(ex.getMessage()).contains("size must be between");
-        }
-    }
-}
diff --git a/tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpBrokerResponse.java b/tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpBrokerResponse.java
deleted file mode 100644
index 2d79f69..0000000
--- a/tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpBrokerResponse.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service.tube;
-
-import com.google.gson.Gson;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.Assert;
-import org.junit.Test;
-
-@Slf4j
-public class TestTubeHttpBrokerResponse {
-
-    private final Gson gson = new Gson();
-
-    @Test
-    public void testJsonStr() {
-        String jsonStr = "{\"code\":0,\"errMsg\":\"OK\",\"data\":"
-                + "[{\"brokerId\":136,\"brokerIp\":\"127.0.0.1\","
-                + "\"brokerPort\":8123,\"manageStatus\":\"online\","
-                + "\"runStatus\":\"notRegister\",\"subStatus\":\"processing_event\","
-                + "\"stepOp\":32,\"isConfChanged\":\"true\",\"isConfLoaded\":\"false\","
-                + "\"isBrokerOnline\":\"false\",\"brokerVersion\":\"-\","
-                + "\"acceptPublish\":\"false\",\"acceptSubscribe\":\"false\"}]}";
-        TubeHttpBrokerInfoList brokerInfoList =
-                gson.fromJson(jsonStr, TubeHttpBrokerInfoList.class);
-        Assert.assertEquals(1, brokerInfoList.getData().size());
-        Assert.assertEquals(0, brokerInfoList.getCode());
-        Assert.assertEquals("OK", brokerInfoList.getErrMsg());
-        Assert.assertTrue(brokerInfoList.getData().get(0).isConfChanged());
-        Assert.assertFalse(brokerInfoList.getData().get(0).isAcceptPublish());
-        Assert.assertFalse(brokerInfoList.getData().get(0).isBrokerOnline());
-    }
-}
diff --git a/tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpTopicInfoList.java b/tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpTopicInfoList.java
deleted file mode 100644
index 82a9fda..0000000
--- a/tubemq-manager/src/test/java/org/apache/tubemq/manager/service/tube/TestTubeHttpTopicInfoList.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.manager.service.tube;
-
-import com.google.gson.Gson;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestTubeHttpTopicInfoList {
-
-    private final Gson gson = new Gson();
-
-    @Test
-    public void testJsonStr() {
-        String jsonStr = "{\"result\":true,\"errCode\":0,\"errMsg\":\"OK\",\""
-                + "data\":[{\"topicName\":\"test1\",\"topicInfo\":[{\"topicName\":\"test1\",\""
-                + "topicStatusId\":0,\"brokerId\":152509201,\"brokerIp\":\"127.0.0.1\",\""
-                + "brokerPort\":8123,\"numPartitions\":1,\"unflushThreshold\":1000,\""
-                + "unflushInterval\":10000,\"unFlushDataHold\":1000,\"deleteWhen\":\"\",\""
-                + "deletePolicy\":\"delete,32h\",\"acceptPublish\":true,"
-                + "\"acceptSubscribe\":true,\"numTopicStores\":1,\"memCacheMsgSizeInMB\":2,\""
-                + "memCacheFlushIntvl\":20000,\"memCacheMsgCntInK\":10,"
-                + "\"createUser\":\"Alice\",\"createDate\":\"20200917122645\","
-                + "\"modifyUser\":\"Alice\",\"modifyDate\":\"20200917122645\","
-                + "\"runInfo\":{\"acceptPublish\":true,\"acceptSubscribe\":true,"
-                + "\"numPartitions\":1,\"numTopicStores\":1,"
-                + "\"brokerManageStatus\":\"online\"}}]}]}";
-        TubeHttpTopicInfoList topicInfoList = gson.fromJson(jsonStr, TubeHttpTopicInfoList.class);
-        Assert.assertTrue(topicInfoList.isResult());
-        Assert.assertEquals(0, topicInfoList.getErrCode());
-        Assert.assertEquals(1, topicInfoList.getData().size());
-        Assert.assertEquals("Alice", topicInfoList.getData().get(0)
-                .getTopicInfo().get(0).getCreateUser());
-        Assert.assertEquals("online", topicInfoList.getData().get(0)
-                .getTopicInfo().get(0).getRunInfo().getBrokerManageStatus());
-    }
-}


[incubator-tubemq] 12/29: [TUBEMQ-551] Adjust NOTICE file content

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit c46935289a25f178969912d985af9bb0d601f7b0
Author: gosonzhang <go...@tencent.com>
AuthorDate: Thu Jan 28 20:06:36 2021 +0800

    [TUBEMQ-551] Adjust NOTICE file content
---
 NOTICE | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 154 insertions(+), 1 deletion(-)

diff --git a/NOTICE b/NOTICE
index c5234a8..bcefb45 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,6 +1,159 @@
 Apache TubeMQ
-Copyright 2019-2020 The Apache Software Foundation.
+Copyright 2019-2021 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (https://www.apache.org/).
 
+
+Apache HBase includes the following in its NOTICE file:
+
+| Apache HBase
+| Copyright 2007-2020 The Apache Software Foundation
+| 
+| This product includes software developed at
+| The Apache Software Foundation (http://www.apache.org/).
+| 
+| --
+| This product incorporates portions of the 'Hadoop' project
+| 
+| Copyright 2007-2009 The Apache Software Foundation
+| 
+| Licensed under the Apache License v2.0
+| --
+| Our Orca logo we got here: http://www.vectorfree.com/jumping-orca
+| It is licensed Creative Commons Attribution 3.0.
+| See https://creativecommons.org/licenses/by/3.0/us/
+| We changed the logo by stripping the colored background, inverting
+| it and then rotating it some.
+| 
+| Later we found that vectorfree.com image is not properly licensed.
+| The original is owned by vectorportal.com. The original was
+| relicensed so we could use it as Creative Commons Attribution 3.0.
+| The license is bundled with the download available here:
+| http://www.vectorportal.com/subcategory/205/KILLER-WHALE-FREE-VECTOR.eps/ifile/9136/detailtest.asp
+| --
+| This product includes portions of the Bootstrap project v3.0.0
+| 
+| Copyright 2013 Twitter, Inc.
+| 
+| Licensed under the Apache License v2.0
+| 
+| This product uses the Glyphicons Halflings icon set.
+| 
+| http://glyphicons.com/
+| 
+| Copyright Jan Kovařík
+| 
+| Licensed under the Apache License v2.0 as a part of the Bootstrap project.
+| 
+| --
+| This product includes portions of the Guava project v14 and v21, specifically
+| 'hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java'
+| 'hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java'
+| 
+| Copyright (C) 2007 The Guava Authors
+| 
+| Licensed under the Apache License, Version 2.0
+| --
+| This product includes portions of Jetty project, specially
+| 'hbase-shaded-hbase-shaded-testing-util/src/main/resources/org/apache/hadoop/hbase/shaded/org/mortbay/jetty/webapp/webdefault.xml'
+
+
+Apache MINA includes the following in its NOTICE file:
+
+| Apache MINA
+| Copyright 2007-2016 The Apache Software Foundation.
+| 
+| This product includes software developed at
+| The Apache Software Foundation (http://www.apache.org/).
+
+
+Apache Avro includes the following in its NOTICE file:
+
+| Apache Avro
+| Copyright 2010-2019 The Apache Software Foundation
+| 
+| This product includes software developed at
+| The Apache Software Foundation (https://www.apache.org/).
+| 
+| NUnit license acknowledgement:
+| 
+| | Portions Copyright © 2002-2012 Charlie Poole or Copyright © 2002-2004 James
+| | W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002
+| | Philip A. Craig 
+| 
+| Based upon the representations of upstream licensors, it is understood that
+| portions of the mapreduce API included in the Java implementation are licensed
+| from various contributors under one or more contributor license agreements to
+| Odiago, Inc. and were then contributed by Odiago to Apache Avro, which has now
+| made them available under the Apache 2.0 license. The original file header text
+| is:
+| 
+| | Licensed to Odiago, Inc. under one or more contributor license
+| | agreements.  See the NOTICE file distributed with this work for
+| | additional information regarding copyright ownership.  Odiago, Inc.
+| | 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
+| |
+| |     https://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.
+| 
+| The Odiago NOTICE at the time of the contribution:
+| 
+| | This product includes software developed by Odiago, Inc.
+| | (https://www.wibidata.com).
+| 
+| Apache Ivy includes the following in its NOTICE file:
+| 
+| | Apache Ivy
+| | Copyright 2007-2010 The Apache Software Foundation
+| |
+| | This product includes software developed by
+| | The Apache Software Foundation (https://www.apache.org/).
+| |
+| | Portions of Ivy were originally developed by
+| | Jayasoft SARL (http://www.jayasoft.fr/)
+| | and are licensed to the Apache Software Foundation under the
+| | "Software Grant License Agreement"
+| |
+| | SSH and SFTP support is provided by the JCraft JSch package, 
+| | which is open source software, available under
+| | the terms of a BSD style license.  
+| | The original software and related information is available
+| | at http://www.jcraft.com/jsch/. 
+| 
+| Apache Log4Net includes the following in its NOTICE file:
+| 
+| | Apache log4net
+| | Copyright 2004-2015 The Apache Software Foundation
+| |
+| | This product includes software developed at
+| | The Apache Software Foundation (https://www.apache.org/).
+| 
+| csharp reflect serializers were contributed by Pitney Bowes Inc.
+| 
+| | Copyright 2019 Pitney Bowes Inc.
+| | Licensed 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 https://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.
+
+
+Apache Pulsar includes the following in its NOTICE file:
+
+| Apache Pulsar
+| Copyright 2017-2019 The Apache Software Foundation
+| 
+| This product includes software developed at
+| The Apache Software Foundation (http://www.apache.org/).
+
+
+
+


[incubator-tubemq] 01/29: rm -Werror

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 1a6939534802686a39757a1f620eb319b0fdf615
Author: jianxzhang <ji...@tencent.com>
AuthorDate: Mon Jan 11 19:16:34 2021 +0800

    rm -Werror
---
 tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt b/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
index 94ac9f1..83d0ba5 100644
--- a/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
+++ b/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
@@ -24,7 +24,7 @@ project (TubeMQ)
 
 find_package(Protobuf REQUIRED)
 
-SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Werror -Wsign-compare -Wfloat-equal -fno-strict-aliasing -fPIC -DASIO_STANDALONE")
+SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Wsign-compare -Wfloat-equal -fno-strict-aliasing -fPIC -DASIO_STANDALONE")
 
 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/proto)
 


[incubator-tubemq] 27/29: [TUBEMQ-562]Update project contents according to the 0.8.0-RC3 review (#429)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 4c09c1f59eefe8001838003eb1f8f6055f425359
Author: gosonzhang <46...@qq.com>
AuthorDate: Thu Feb 18 20:43:49 2021 +0800

    [TUBEMQ-562]Update project contents according to the 0.8.0-RC3 review (#429)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 DISCLAIMER                                         |   6 -
 DISCLAIMER-WIP                                     |  18 +
 LICENSE                                            | 343 ++------
 NOTICE                                             |  13 +-
 pom.xml                                            |   3 +-
 tubemq-client/src/main/assembly/assembly.xml       |   2 +-
 .../apache/tubemq/corebase/utils/TStringUtils.java | 886 ++++-----------------
 tubemq-server/src/main/assembly/assembly.xml       |   2 +-
 8 files changed, 231 insertions(+), 1042 deletions(-)

diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644
index 06b6195..0000000
--- a/DISCLAIMER
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache TubeMQ is an effort undergoing incubation at The Apache Software Foundation (ASF),
-sponsored by the Apache Incubator. Incubation is required of all newly accepted projects
-until a further review indicates that the infrastructure, communications, and decision
-making process have stabilized in a manner consistent with other successful ASF projects.
-While incubation status is not necessarily a reflection of the completeness or stability
-of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
\ No newline at end of file
diff --git a/DISCLAIMER-WIP b/DISCLAIMER-WIP
new file mode 100644
index 0000000..6c72cf3
--- /dev/null
+++ b/DISCLAIMER-WIP
@@ -0,0 +1,18 @@
+Apache TubeMQ is an effort undergoing incubation at The Apache Software Foundation (ASF),
+sponsored by the Apache Incubator. Incubation is required of all newly accepted projects
+until a further review indicates that the infrastructure, communications, and decision
+making process have stabilized in a manner consistent with other successful ASF projects.
+While incubation status is not necessarily a reflection of the completeness or stability
+of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
+
+Some of the incubating project's releases may not be fully compliant with ASF policy. For
+example, releases may have incomplete or un-reviewed licensing conditions. What follows is
+a list of known issues the project is currently aware of (note that this list, by definition,
+is likely to be incomplete):
+
+ * Releases may have incomplete licensing conditions
+
+If you are planning to incorporate this work into your product/project, please be aware that
+you will need to conduct a thorough licensing review to determine the overall implications of
+including this work. For the current status of this project through the Apache Incubator
+visit: https://incubator.apache.org/projects/tubemq.html
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 7ef57fd..c6bfcd6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -204,18 +204,15 @@
 
 =======================================================================
 
+1 This projects includes modified/copied source files with the following licenses:
+
 =========
-1. Third party MIT license licenses
+1.1 Third party MIT license licenses
 =========
 
-1.1 The following modified/copied source files are provided under the MIT license.
-
-----
-
 1.1.1 resources/assets/lib/jquery.min.js
  Source  : jquery 1.11.3
  License : https://github.com/jquery/jquery/blob/1.11.3/MIT-LICENSE.txt
-
 | Copyright 2014 jQuery Foundation and other contributors
 | http://jquery.com/
 |
@@ -243,7 +240,6 @@
 1.1.2 resources/assets/lib/DataTables/*
  Source  : datatables  1.10.7
  License : https://github.com/DataTables/DataTables/blob/1.10.7/license.txt
-
 | Copyright (c) 2008-2013 SpryMedia Limited
 | http://datatables.net
 |
@@ -265,91 +261,72 @@
 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | THE SOFTWARE.
 
-------------------
-
-1.2 The following binary dependency packages are provided under the MIT license.
-
 ----
 
-1.2.1 org.slf4j:slf4j-api
-      org.slf4j:slf4j-log4j12
- Version : 1.6.2
- License : For details, see https://github.com/qos-ch/slf4j/blob/master/LICENSE.txt
-
-1.2.1 org.mockito:mockito-all:1.9.0
-      org.mockito:mockito-core:2.18.0
- License : For details, see https://github.com/mockito/mockito/blob/release/1.x/LICENSE
-                            https://github.com/mockito/mockito/blob/release/2.x/LICENSE
+1.1.3 resources/assets/public/css/style.css
+      resources/assets/public/css/ie.css
+ Source  : Compass
+ License :  https://github.com/Compass/compass/blob/stable/LICENSE.markdown
+ | Copyright (c) 2009-2014 Christopher M. Eppstein
+ |
+ | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ |
+ | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. No attribution is required by products that make use of this software.
+ |
+ | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ |
+ | Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
+ |
+ | Contributors to this project agree to grant all rights to the copyright holder of the primary product. Attribution is maintained in the source control history of the product.
 
+----
 
 =========
-2. Third party BSD 3-Clause license
+1.2 Third party BSD 3-Clause license
 =========
 
-2.1 The following modified/copied source files are provided under the BSD 3-Clause license.
-
-----
-
-2.1.1 tubemq-client-twins/tubemq-client-cpp/src/any.h
+1.2.1 tubemq-client-twins/tubemq-client-cpp/src/any.h
       tubemq-client-twins/tubemq-client-cpp/src/buffer.h
  Source  : https://github.com/Qihoo360/evpp/blob/master/evpp/any.h version c5038a6
            https://github.com/Qihoo360/evpp/blob/master/evpp/buffer.h version b2535d7
  License : https://github.com/Qihoo360/evpp/blob/master/LICENSE
-
-| BSD 3-Clause License
-|
-| Copyright (c) 2017, Qihoo 360
-| All rights reserved.
-|
-| Redistribution and use in source and binary forms, with or without
-| modification, are permitted provided that the following conditions are met:
-|
-| * Redistributions of source code must retain the above copyright notice, this
-|   list of conditions and the following disclaimer.
-|
-| * Redistributions in binary form must reproduce the above copyright notice,
-|   this list of conditions and the following disclaimer in the documentation
-|   and/or other materials provided with the distribution.
-|
-| * Neither the name of the copyright holder nor the names of its
-|   contributors may be used to endorse or promote products derived from
-|   this software without specific prior written permission.
-|
-| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-| FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-| DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-| CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-------------------
-
-2.2 The following binary dependency packages are provided under the BSD 3-Clause license.
+ | BSD 3-Clause License
+ |
+ | Copyright (c) 2017, Qihoo 360
+ | All rights reserved.
+ |
+ | Redistribution and use in source and binary forms, with or without
+ | modification, are permitted provided that the following conditions are met:
+ |
+ | * Redistributions of source code must retain the above copyright notice, this
+ |   list of conditions and the following disclaimer.
+ |
+ | * Redistributions in binary form must reproduce the above copyright notice,
+ |   this list of conditions and the following disclaimer in the documentation
+ |   and/or other materials provided with the distribution.
+ |
+ | * Neither the name of the copyright holder nor the names of its
+ |   contributors may be used to endorse or promote products derived from
+ |   this software without specific prior written permission.
+ |
+ | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ----
 
-2.2.1 com.google.protobuf:protobuf-java
- Version : 2.5.0
- License : For details, see https://github.com/protocolbuffers/protobuf/blob/v2.5.0/COPYING.txt
-
-2.2.2 com.googlecode.protobuf-java-format:protobuf-java-format
- Version : 1.4
- License : For details, see https://github.com/bivas/protobuf-java-format/blob/master/LICENSE.txt
-
-
 =========
-3. Third party Apache 2.0 Licenses
+1.3 Third party Apache 2.0 Licenses
 =========
 
-3.1 The following modified/copied source files are provided under the Apache 2.0 License.
-
-----
-
-3.1.1 tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/Bytes.java
+1.3.1 tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/Bytes.java
       tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HashedBytes.java
       tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HasThread.java
       tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/RecoverableZooKeeper.java
@@ -363,231 +340,38 @@
  Source  : hbase 0.94.27 (Please note that the software have been modified.)
  License : https://github.com/apache/hbase/blob/rel/0.94.27/LICENSE.txt
 
-3.1.2 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
+1.3.2 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
       tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
  Source  : mina 2.0.12
  License : https://github.com/apache/mina/blob/2.0.12/LICENSE.txt
 
-3.1.3 bin/broker.sh
+1.3.3 bin/broker.sh
       bin/master.sh
  Source  : Metamorphosis  metamorphosis-all-1.4.4 (Please note that the software have been modified.)
  License : https://github.com/killme2008/Metamorphosis/blob/metamorphosis-all-1.4.4/COPYING.txt
 
-3.1.4 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
+1.3.4 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
       tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferOutputStream.java
  Source  : Apache Avro 1.7.6
  License : https://github.com/apache/avro/blob/release-1.7.6/LICENSE.txt
 
-3.1.5 tubemq-client-twins/tubemq-client-cpp/src/future.h
+1.3.5 tubemq-client-twins/tubemq-client-cpp/src/future.h
  Source  : Apache Pulsar
  License : https://github.com/apache/pulsar/blob/master/LICENSE
 
-------------------
-
-3.2 The following binary dependency packages are provided under the Apache 2.0 License.
+1.3.6 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
+ Source  : commons-lang (Please note that the software have been modified.)
+           https://github.com/apache/commons-lang/blob/LANG_2_X/src/
+                 main/java/org/apache/commons/lang/StringUtils.java
+ License : https://github.com/apache/commons-lang/blob/LANG_2_X/LICENSE.txt
 
 ----
 
-3.2.1 io.netty:netty
- Version : 3.8.0.Final
- License : For details, see https://github.com/netty/netty/blob/netty-3.8.0.Final/LICENSE.txt
-
-3.2.2 commons-cli:commons-cli
- Version : 1.4
- License : For details, see https://github.com/apache/commons-cli/blob/master/LICENSE.txt
-
-3.2.3 commons-codec:commons-codec
- Version : 1.10
- License : For details, see https://github.com/apache/commons-codec/blob/1.10/LICENSE.txt
-
-3.2.4 com.google.code.gson:gson
- Version : 2.8.5
- License : For details, see https://github.com/google/gson/blob/master/LICENSE
-
-3.2.5 commons-lang:commons-lang
- Version : 2.6
- License : For details, see https://github.com/apache/commons-lang/blob/master/LICENSE.txt
-
-3.2.6 org.apache.commons:commons-lang3
- Version :
- License : For details, see https://github.com/apache/commons-lang/blob/master/LICENSE.txt
-
-3.2.7 org.apache.httpcomponents:httpclient
- Version : 4.5.2
- License : For details, see https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt
-
-3.2.8 commons-io:commons-io
- Version : 2.1
- License : For details, see https://github.com/apache/commons-io/blob/master/LICENSE.txt
-
-3.2.9 org.apache.zookeeper:zookeeper
- Version : 3.4.3
- License : For details, see https://github.com/apache/zookeeper/blob/master/LICENSE.txt
-
-3.2.10 com.google.guava:guava
- Version : 13.0
- License : For details, see https://github.com/google/guava/blob/master/COPYING
-
-3.2.11 org.apache.velocity:velocity:1.7
-       org.apache.velocity:velocity-tools:2.0
- License : For details, see https://github.com/apache/velocity-master/blob/master/pom/pom.xml
-                            https://github.com/apache/velocity-tools/blob/2.0/LICENSE
-
-3.2.12 org.springframework:spring-core
-       org.springframework:spring-context
-       org.springframework:spring-jdbc
-       org.springframework:spring-orm
- Version : 4.1.6.RELEASE
- License : For details, see https://github.com/spring-projects/spring-framework/tree/v4.1.6.RELEASE#license
-
-3.2.13 org.mortbay.jetty:jetty
- Version : 6.1.26
- License : For details, see https://github.com/jetty-project/codehaus-jetty6
-
-3.2.14 org.ini4j:ini4j
- Version : 0.5.1
- License : For details, see https://github.com/facebookarchive/ini4j/blob/master/LICENSE.txt
-
-3.2.15 org.easymock:easymock
-       org.easymock:easymockclassextension
- Version : 2.5.2
- License : For details, see https://github.com/easymock/easymock/blob/master/header.txt
-
-3.2.16 org.eclipse.jetty:jetty-server
-       org.eclipse.jetty:jetty-servlet
- Version : 9.4.31.v20200723
- License : For details, see https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/LICENSE
-
-3.2.17 org.powermock:powermock-module-junit4
-       org.powermock:powermock-api-mockito2
- Version : 2.0.4
- License : For details, see https://github.com/powermock/powermock/blob/release/2.x/LICENSE.txt
-
-3.2.18 org.apache.flink:flink-core
-       org.apache.flink:flink-table-common
-       org.apache.flink:flink-runtime_2.11
-       org.apache.flink:flink-streaming-java_2.11
-       org.apache.flink:flink-table-api-java-bridge_2.11
- Version : 1.9.2
- License : For details, see https://github.com/apache/flink/blob/release-1.9/LICENSE
-
-3.2.19 org.apache.flume:flume-ng-core
- Version : 1.9.0
- License : For details, see https://github.com/apache/flume/blob/flume-1.9/LICENSE
-
-3.2.20 org.awaitility:awaitility
- Version : 4.0.3
- License : For details, see https://github.com/awaitility/awaitility/blob/master/LICENSE
-
-3.2.21 org.apache.spark:spark-core_2.11
-       org.apache.spark:spark-sql_2.11
-       org.apache.spark:spark-streaming_2.11
- Version : 2.4.4
- License : For details, see https://github.com/apache/spark/blob/branch-2.4/LICENSE
-
-
 =========
-4. Third party Eclipse Public License 1.0 Licenses
+2 Third party category X Licenses
 =========
 
-4.1 The following binary dependency packages are provided under Eclipse Public License 1.0 Licenses.
-
-----
-
-4.1.1 junit:junit
- Version : 4.11
- License : For details, see https://github.com/junit-team/junit4/blob/main/LICENSE-junit.txt
-
-
-=========
-5. Third party CDDL + GPLv2 with classpath exception Licenses
-=========
-
-5.1 The following binary dependency packages are provided under CDDL + GPLv2 with classpath exception Licenses.
-
-----
-
-5.1.1 javax.servlet:javax.servlet-api
- Version : 4.0.1
- License : For details, see https://github.com/javaee/servlet-spec/blob/master/LICENSE
-
-
-=========
-6. Third party category X Licenses
-=========
-
-6.1 The following modified/copied source files are provided under category X Licenses.
-
-----
-
-6.1.1 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
- Source  : citrus r3.1.4 (Please note that the software have been modified.)
-           https://github.com/webx/citrus/blob/r3.1.4/common/util/src/main/java/com/alibaba/citrus/util/StringUtil.java
- License: The project does not contain the LICENSE file, but analyzed from
-          the project’s pom.xml content and the file header of the source code file,
-          the following components are provided under the Apache 2.0 License.
-
- pom.xml includes: see https://github.com/webx/citrus/blob/r3.1.4/pom.xml
- |    <licenses>
- |        <license>
- |            <name>The Apache Software License, Version 2.0</name>
- |            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- |            <distribution>repo</distribution>
- |        </license>
- |    </licenses>
-
- source file includes:
- |
- | Copyright (c) 2002-2012 Alibaba Group Holding Limited.
- | All rights reserved.
- |
- | Licensed 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.
- |
-
-----
-
-6.1.2 resources/assets/public/css/style.css
-      resources/assets/public/css/ie.css
- Source  : Compass
- License : According to the content of the project’s README.markdown and LICENSE.markdown,
-           the following components are provided under the slightly modified MIT License.
-
- README.markdown includes:(https://github.com/Compass/compass/blob/stable/README.markdown)
- | License
- | Copyright (c) 2008-2014 Christopher M. Eppstein
- | All Rights Reserved.
- | Released under a slightly modified MIT License.
-
- LICENSE.markdown includes: (https://github.com/Compass/compass/blob/stable/LICENSE.markdown)
- | Copyright (c) 2009-2014 Christopher M. Eppstein
- |
- | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- |
- | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. No attribution is required by products that make use of this software.
- |
- | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- |
- | Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
- |
- | Contributors to this project agree to grant all rights to the copyright holder of the primary product. Attribution is maintained in the source control history of the product.
-
-------------------
-
-6.2 The following binary dependency packages are provided under category X Licenses.
-
-----
-
-6.2.1 berkeleydb-je
+2.1 berkeleydb-je
  Version : 7.3.7
  Source  : Oracle
  License :We found that different versions of Berkeley DB JE (Java Edition) use different authorization protocols.
@@ -684,7 +468,6 @@
  |  * THE POSSIBILITY OF SUCH DAMAGE.
  |  */
 
-----
 
 
 
diff --git a/NOTICE b/NOTICE
index bcefb45..85f6960 100644
--- a/NOTICE
+++ b/NOTICE
@@ -4,9 +4,9 @@ Copyright 2019-2021 The Apache Software Foundation.
 This product includes software developed at
 The Apache Software Foundation (https://www.apache.org/).
 
+=======================================================================
 
 Apache HBase includes the following in its NOTICE file:
-
 | Apache HBase
 | Copyright 2007-2020 The Apache Software Foundation
 | 
@@ -60,7 +60,6 @@ Apache HBase includes the following in its NOTICE file:
 
 
 Apache MINA includes the following in its NOTICE file:
-
 | Apache MINA
 | Copyright 2007-2016 The Apache Software Foundation.
 | 
@@ -69,7 +68,6 @@ Apache MINA includes the following in its NOTICE file:
 
 
 Apache Avro includes the following in its NOTICE file:
-
 | Apache Avro
 | Copyright 2010-2019 The Apache Software Foundation
 | 
@@ -146,8 +144,15 @@ Apache Avro includes the following in its NOTICE file:
 | | See the License for the specific language governing permissions and limitations under the License.
 
 
-Apache Pulsar includes the following in its NOTICE file:
+Apache Commons Lang includes the following in its NOTICE file:
+| Apache Commons Lang
+| Copyright 2001-2011 The Apache Software Foundation
+|
+| This product includes software developed by
+| The Apache Software Foundation (http://www.apache.org/).
+
 
+Apache Pulsar includes the following in its NOTICE file:
 | Apache Pulsar
 | Copyright 2017-2019 The Apache Software Foundation
 | 
diff --git a/pom.xml b/pom.xml
index bca1abf..fe34837 100644
--- a/pom.xml
+++ b/pom.xml
@@ -261,11 +261,10 @@
                         <!-- Front-end -->
                         <exclude>resources/assets/lib/**</exclude>
                         <exclude>resources/assets/public/**</exclude>
-                        <exclude>DISCLAIMER</exclude>
+                        <exclude>DISCLAIMER-WIP</exclude>
                         <!-- copy or modify files from other projects -->
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/src/any.h</exclude>
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/src/buffer.h</exclude>
-                        <exclude>**/tubemq-core/src/corebase/utils/TStringUtils.java</exclude>
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/third_party/**</exclude>
                     </excludes>
                 </configuration>
diff --git a/tubemq-client/src/main/assembly/assembly.xml b/tubemq-client/src/main/assembly/assembly.xml
index 52cad36..ee48ac7 100644
--- a/tubemq-client/src/main/assembly/assembly.xml
+++ b/tubemq-client/src/main/assembly/assembly.xml
@@ -34,7 +34,7 @@
                 <include>./conf/tools.log4j.properties</include>
                 <include>LICENSE</include>
                 <include>NOTICE</include>
-                <include>DISCLAIMER</include>
+                <include>DISCLAIMER-WIP</include>
             </includes>
             <excludes>
                 <exclude>**/src/**</exclude>
diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
index f99ba52..b5dc005 100644
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
+++ b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
@@ -1,12 +1,12 @@
 /*
- * Copyright (c) 2002-2012 Alibaba Group Holding Limited.
- * All rights reserved.
+ * 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
  *
- * Licensed 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
+ *      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,
@@ -16,15 +16,13 @@
  */
 
 /*
- * Modified from citrus <a href="https://github.com/webx/citrus">citrus Project</a>
- *   file address: https://github.com/webx/citrus/blob/r3.1.4/common/util/src/
- *                          main/java/com/alibaba/citrus/util/StringUtil.java
+ * Modified from commons-lang <a href="https://github.com/apache/commons-lang"> Project</a>
+ *   file address: https://github.com/apache/commons-lang/blob/LANG_2_X/src/
+ *                         main/java/org/apache/commons/lang/StringUtils.java
  */
 
 package org.apache.tubemq.corebase.utils;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import org.apache.commons.codec.binary.Base64;
@@ -39,10 +37,11 @@ public class TStringUtils {
 
     public static final String EMPTY = "";
 
-
+    // Empty checks
+    //-----------------------------------------------------------------------
     /**
      * <p>Checks if a String is empty ("") or null.</p>
-     * <p>
+     *
      * <pre>
      * TStringUtils.isEmpty(null)      = true
      * TStringUtils.isEmpty("")        = true
@@ -50,11 +49,12 @@ public class TStringUtils {
      * TStringUtils.isEmpty("bob")     = false
      * TStringUtils.isEmpty("  bob  ") = false
      * </pre>
-     * <p>
-     * <p>NOTE: This method changed in Lang version 2.0. It no longer trims the String. That
-     * functionality is available in isBlank().</p>
      *
-     * @param str the String to check, may be null
+     * <p>NOTE: This method changed in Lang version 2.0.
+     * It no longer trims the String.
+     * That functionality is available in isBlank().</p>
+     *
+     * @param str  the String to check, may be null
      * @return <code>true</code> if the String is empty or null
      */
     public static boolean isEmpty(String str) {
@@ -63,7 +63,7 @@ public class TStringUtils {
 
     /**
      * <p>Checks if a String is not empty ("") and not null.</p>
-     * <p>
+     *
      * <pre>
      * TStringUtils.isNotEmpty(null)      = false
      * TStringUtils.isNotEmpty("")        = false
@@ -72,7 +72,7 @@ public class TStringUtils {
      * TStringUtils.isNotEmpty("  bob  ") = true
      * </pre>
      *
-     * @param str the String to check, may be null
+     * @param str  the String to check, may be null
      * @return <code>true</code> if the String is not empty and not null
      */
     public static boolean isNotEmpty(String str) {
@@ -81,7 +81,7 @@ public class TStringUtils {
 
     /**
      * <p>Checks if a String is whitespace, empty ("") or null.</p>
-     * <p>
+     *
      * <pre>
      * TStringUtils.isBlank(null)      = true
      * TStringUtils.isBlank("")        = true
@@ -90,7 +90,7 @@ public class TStringUtils {
      * TStringUtils.isBlank("  bob  ") = false
      * </pre>
      *
-     * @param str the String to check, may be null
+     * @param str  the String to check, may be null
      * @return <code>true</code> if the String is null, empty or whitespace
      * @since 2.0
      */
@@ -100,7 +100,7 @@ public class TStringUtils {
             return true;
         }
         for (int i = 0; i < strLen; i++) {
-            if ((!Character.isWhitespace(str.charAt(i)))) {
+            if (!Character.isWhitespace(str.charAt(i))) {
                 return false;
             }
         }
@@ -109,7 +109,7 @@ public class TStringUtils {
 
     /**
      * <p>Checks if a String is not empty (""), not null and not whitespace only.</p>
-     * <p>
+     *
      * <pre>
      * TStringUtils.isNotBlank(null)      = false
      * TStringUtils.isNotBlank("")        = false
@@ -118,293 +118,55 @@ public class TStringUtils {
      * TStringUtils.isNotBlank("  bob  ") = true
      * </pre>
      *
-     * @param str the String to check, may be null
-     * @return <code>true</code> if the String is not empty and not null and not whitespace
+     * @param str  the String to check, may be null
+     * @return <code>true</code> if the String is
+     *  not empty and not null and not whitespace
      * @since 2.0
      */
     public static boolean isNotBlank(String str) {
         return !isBlank(str);
     }
 
-    public static String trim(String str) {
-        return str == null ? null : str.trim();
-    }
-
-    public static String trimToNull(String str) {
-        String ts = trim(str);
-        return isEmpty(ts) ? null : ts;
-    }
-
-    public static String trimToEmpty(String str) {
-        return str == null ? EMPTY : str.trim();
-    }
-
-    public static boolean equals(String str1, String str2) {
-        return str1 == null ? str2 == null : str1.equals(str2);
-    }
-
-    public static boolean equalsIgnoreCase(String str1, String str2) {
-        return str1 == null ? str2 == null : str1.equalsIgnoreCase(str2);
-    }
-
-    // ==========================================================================
-    // Case conversion.
-    // ==========================================================================
-
-    /**
-     * Convert the first character of a string to uppercase
-     * (<code>Character.toTitleCase</code>) <p> if string is
-     * <code>null</code>return<code>null</code>。
-     * <p/>
-     * <pre>
-     * TStringUtils.capitalize(null)  = null
-     * TStringUtils.capitalize("")    = ""
-     * TStringUtils.capitalize("cat") = "Cat"
-     * TStringUtils.capitalize("cAt") = "CAt"
-     * </pre>
-     * <p/>
-     * </p>
-     *
-     * @param str The string to be converted
-     * @return Convert the first character of a string to upper case
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String capitalize(String str) {
-        int strLen;
-
-        if (str == null || (strLen = str.length()) == 0) {
-            return str;
-        }
-
-        return new StringBuilder(strLen)
-                .append(Character.toTitleCase(str.charAt(0)))
-                .append(str.substring(1))
-                .toString();
-    }
-
-    /**
-     * <p/>
-     * <pre>
-     * TStringUtils.uncapitalize(null)  = null
-     * TStringUtils.uncapitalize("")    = ""
-     * TStringUtils.uncapitalize("Cat") = "cat"
-     * TStringUtils.uncapitalize("CAT") = "CAT"
-     * </pre>
-     * <p/>
-     * </p>
-     *
-     * @param str The string to be converted
-     * @return Convert the first character of a string to lower case
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String uncapitalize(String str) {
-        int strLen;
-
-        if (str == null || (strLen = str.length()) == 0) {
-            return str;
-        }
-
-        if (strLen > 1
-                && Character.isUpperCase(str.charAt(1))
-                && Character.isUpperCase(str.charAt(0))) {
-            return str;
-        }
-
-        return new StringBuilder(strLen)
-                .append(Character.toLowerCase(str.charAt(0)))
-                .append(str.substring(1))
-                .toString();
-    }
-
     /**
-     * <p/>
-     * <pre>
-     * TStringUtils.swapCase(null)                 = null
-     * TStringUtils.swapCase("")                   = ""
-     * TStringUtils.swapCase("The dog has a BONE") = "tHE DOG HAS A bone"
-     * </pre>
-     * <p/>
-     * </p>
+     * <p>Removes control characters (char &lt;= 32) from both
+     * ends of this String, handling <code>null</code> by returning
+     * <code>null</code>.</p>
      *
-     * @param str The string to be converted
-     * @return Case inverted character string
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String swapCase(String str) {
-        int strLen;
-
-        if (str == null || (strLen = str.length()) == 0) {
-            return str;
-        }
-
-        StringBuilder buffer = new StringBuilder(strLen);
-
-        char ch = 0;
-
-        for (int i = 0; i < strLen; i++) {
-            ch = str.charAt(i);
-
-            if (Character.isUpperCase(ch)) {
-                ch = Character.toLowerCase(ch);
-            } else if (Character.isTitleCase(ch)) {
-                ch = Character.toLowerCase(ch);
-            } else if (Character.isLowerCase(ch)) {
-                ch = Character.toUpperCase(ch);
-            }
-
-            buffer.append(ch);
-        }
-
-        return buffer.toString();
-    }
-
-    /**
-     * <p/>
-     * <pre>
-     * TStringUtils.toUpperCase(null)  = null
-     * TStringUtils.toUpperCase("")    = ""
-     * TStringUtils.toUpperCase("aBc") = "ABC"
-     * </pre>
-     * <p/>
-     * </p>
+     * <p>The String is trimmed using {@link String#trim()}.
+     * Trim removes start and end characters &lt;= 32.</p>
      *
-     * @param str The string to be converted
-     * @return Convert the string to upper case
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String toUpperCase(String str) {
-        if (str == null) {
-            return null;
-        }
-
-        return str.toUpperCase();
-    }
-
-    /**
-     * <p/>
      * <pre>
-     * TStringUtils.toLowerCase(null)  = null
-     * TStringUtils.toLowerCase("")    = ""
-     * TStringUtils.toLowerCase("aBc") = "abc"
+     * TStringUtils.trim(null)          = null
+     * TStringUtils.trim("")            = ""
+     * TStringUtils.trim("     ")       = ""
+     * TStringUtils.trim("abc")         = "abc"
+     * TStringUtils.trim("    abc    ") = "abc"
      * </pre>
-     * <p/>
-     * </p>
      *
-     * @param str The string to be converted
-     * @return Convert the string to lower case
-     * if it is <code>null</code>,return<code>null</code>
+     * @param str  the String to be trimmed, may be null
+     * @return the trimmed string, <code>null</code> if null String input
      */
-    public static String toLowerCase(String str) {
-        if (str == null) {
-            return null;
-        }
-
-        return str.toLowerCase();
+    public static String trim(String str) {
+        return str == null ? null : str.trim();
     }
 
+    // Misc
+    //-----------------------------------------------------------------------
     /**
-     * <p/>
-     * <pre>
-     * TStringUtils.toCamelCase(null)  = null
-     * TStringUtils.toCamelCase("")    = ""
-     * TStringUtils.toCamelCase("aBc") = "aBc"
-     * TStringUtils.toCamelCase("aBc def") = "aBcDef"
-     * TStringUtils.toCamelCase("aBc def_ghi") = "aBcDefGhi"
-     * TStringUtils.toCamelCase("aBc def_ghi 123") = "aBcDefGhi123"
-     * </pre>
-     * <p/>
-     * </p> <p> This method preserves all separators except underscores and whitespace. </p>
+     * <p>Find the Levenshtein distance between two Strings.</p>
      *
-     * @param str The string to be converted
-     * @return Convert the string to Camel Case
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String toCamelCase(String str) {
-        return new MyWordTokenizer(1).parse(str);
-    }
-
-    /**
-     * <p/>
-     * <pre>
-     * TStringUtils.toPascalCase(null)  = null
-     * TStringUtils.toPascalCase("")    = ""
-     * TStringUtils.toPascalCase("aBc") = "ABc"
-     * TStringUtils.toPascalCase("aBc def") = "ABcDef"
-     * TStringUtils.toPascalCase("aBc def_ghi") = "ABcDefGhi"
-     * TStringUtils.toPascalCase("aBc def_ghi 123") = "aBcDefGhi123"
-     * </pre>
-     * <p/>
-     * </p> <p> This method preserves all separators except underscores and whitespace. </p>
+     * <p>This is the number of changes needed to change one String into
+     * another, where each change is a single character modification (deletion,
+     * insertion or substitution).</p>
      *
-     * @param str The string to be converted
-     * @return Convert the string to Pascal Case
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String toPascalCase(String str) {
-        return new MyWordTokenizer(3).parse(str);
-    }
-
-    /**
-     * <p/>
-     * <pre>
-     * TStringUtils.toUpperCaseWithUnderscores(null)  = null
-     * TStringUtils.toUpperCaseWithUnderscores("")    = ""
-     * TStringUtils.toUpperCaseWithUnderscores("aBc") = "A_BC"
-     * TStringUtils.toUpperCaseWithUnderscores("aBc def") = "A_BC_DEF"
-     * TStringUtils.toUpperCaseWithUnderscores("aBc def_ghi") = "A_BC_DEF_GHI"
-     * TStringUtils.toUpperCaseWithUnderscores("aBc def_ghi 123") = "A_BC_DEF_GHI_123"
-     * TStringUtils.toUpperCaseWithUnderscores("__a__Bc__") = "__A__BC__"
-     * </pre>
-     * <p/>
-     * </p> <p> This method preserves all separators except whitespace. </p>
+     * <p>The previous implementation of the Levenshtein distance algorithm
+     * was from <a href="http://www.merriampark.com/ld.htm">http://www.merriampark.com/ld.htm</a></p>
      *
-     * @param str The string to be converted
-     * @return Convert the string to Upper Case With Underscores
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String toUpperCaseWithUnderscores(String str) {
-        return new MyWordTokenizer(4).parse(str);
-    }
-
-    /**
-     * <p/>
-     * <pre>
-     * TStringUtils.toLowerCaseWithUnderscores(null)  = null
-     * TStringUtils.toLowerCaseWithUnderscores("")    = ""
-     * TStringUtils.toLowerCaseWithUnderscores("aBc") = "a_bc"
-     * TStringUtils.toLowerCaseWithUnderscores("aBc def") = "a_bc_def"
-     * TStringUtils.toLowerCaseWithUnderscores("aBc def_ghi") = "a_bc_def_ghi"
-     * TStringUtils.toLowerCaseWithUnderscores("aBc def_ghi 123") = "a_bc_def_ghi_123"
-     * TStringUtils.toLowerCaseWithUnderscores("__a__Bc__") = "__a__bc__"
-     * </pre>
-     * <p/>
-     * </p> <p> This method preserves all separators except whitespace. </p>
+     * <p>Chas Emerick has written an implementation in Java, which avoids an OutOfMemoryError
+     * which can occur when my Java implementation is used with very large strings.<br>
+     * This implementation of the Levenshtein distance algorithm
+     * is from <a href="http://www.merriampark.com/ldjava.htm">http://www.merriampark.com/ldjava.htm</a></p>
      *
-     * @param str The string to be converted
-     * @return Convert the string to lower Case With Underscores
-     * if it is <code>null</code>,return<code>null</code>
-     */
-    public static String toLowerCaseWithUnderscores(String str) {
-        return new MyWordTokenizer(2).parse(str);
-    }
-
-    // Misc
-    //-----------------------------------------------------------------------
-
-    /**
-     * <p>Find the Levenshtein distance between two Strings.</p>
-     * <p>
-     * <p>This is the number of changes needed to change one String into another, where each change
-     * is a single character modification (deletion, insertion or substitution).</p>
-     * <p>
-     * <p>The previous implementation of the Levenshtein distance algorithm was from <a
-     * href="http://www.merriampark.com/ld.htm">http://www.merriampark.com/ld.htm</a></p>
-     * <p>
-     * <p>Chas Emerick has written an implementation in Java, which avoids an OutOfMemoryError which
-     * can occur when my Java implementation is used with very large strings.<br> This
-     * implementation of the Levenshtein distance algorithm is from <a
-     * href="http://www.merriampark.com/ldjava.htm">http://www.merriampark.com/ldjava.htm</a></p>
-     * <p>
      * <pre>
      * TStringUtils.getLevenshteinDistance(null, *)             = IllegalArgumentException
      * TStringUtils.getLevenshteinDistance(*, null)             = IllegalArgumentException
@@ -419,8 +181,8 @@ public class TStringUtils {
      * TStringUtils.getLevenshteinDistance("hello", "hallo")    = 1
      * </pre>
      *
-     * @param s the first String, must not be null
-     * @param t the second String, must not be null
+     * @param s  the first String, must not be null
+     * @param t  the second String, must not be null
      * @return result distance
      * @throws IllegalArgumentException if either String input <code>null</code>
      */
@@ -441,7 +203,6 @@ public class TStringUtils {
            of the current cost count being calculated).  (Note that the arrays aren't really
            copied anymore, just switched...this is clearly much better than cloning an array
            or doing a System.arraycopy() each time  through the outer loop.)
-
            Effectively, the difference between the two implementations is this one does not
            cause an out of memory condition when calculating the LD over two very large strings.
          */
@@ -464,29 +225,30 @@ public class TStringUtils {
             m = t.length();
         }
 
-        int[] p = new int[n + 1]; //'previous' cost array, horizontally
-        int[] d = new int[n + 1]; // cost array, horizontally
-        int[] swap; // swap helper to assist in swapping p and d
+        int p[] = new int[n + 1]; //'previous' cost array, horizontally
+        int d[] = new int[n + 1]; // cost array, horizontally
+        int swap[]; //placeholder to assist in swapping p and d
 
         // indexes into strings s and t
         int i; // iterates through s
         int j; // iterates through t
 
+        char chkChar; // jth character of t
+
         int cost; // cost
 
         for (i = 0; i <= n; i++) {
             p[i] = i;
         }
 
-        char ch; // jth character of t
         for (j = 1; j <= m; j++) {
-            ch = t.charAt(j - 1);
+            chkChar = t.charAt(j - 1);
             d[0] = j;
 
             for (i = 1; i <= n; i++) {
-                cost = s.charAt(i - 1) == ch ? 0 : 1;
+                cost = s.charAt(i - 1) == chkChar ? 0 : 1;
                 // minimum of cell to the left+1, to the top+1, diagonally left and up +cost
-                d[i] = Math.min(Math.min(d[i - 1] + 1, p[i] + 1), p[i - 1] + cost);
+                d[i] = Math.min(Math.min(d[i - 1] + 1, p[i] + 1),  p[i - 1] + cost);
             }
 
             // copy current distance counts to 'previous row' distance counts
@@ -500,25 +262,81 @@ public class TStringUtils {
         return p[n];
     }
 
-    public static String arrayToString(String[] strs) {
-        if (strs.length == 0) {
-            return "";
-        }
-        StringBuilder sbuf = new StringBuilder();
-        sbuf.append(strs[0]);
-        for (int idx = 1; idx < strs.length; idx++) {
-            sbuf.append(",");
-            sbuf.append(strs[idx]);
-        }
-        return sbuf.toString();
+    public static boolean isLetter(char ch) {
+        return (Character.isUpperCase(ch)
+                || Character.isLowerCase(ch));
     }
 
-    public static String stringifyException(Throwable e) {
-        StringWriter stm = new StringWriter();
-        PrintWriter wrt = new PrintWriter(stm);
-        e.printStackTrace(wrt);
-        wrt.close();
-        return stm.toString();
+    public static boolean isLetterOrDigit(char ch) {
+        return isLetter(ch) || Character.isDigit(ch);
+    }
+
+    /**
+     * <p/>
+     * <pre>
+     * TStringUtils.toCamelCase(null)  = null
+     * TStringUtils.toCamelCase("")    = ""
+     * TStringUtils.toCamelCase("aBc") = "aBc"
+     * TStringUtils.toCamelCase("aBc def") = "aBcDef"
+     * TStringUtils.toCamelCase("aBc def_ghi") = "aBcDefGhi"
+     * TStringUtils.toCamelCase("aBc def_ghi 123") = "aBcDefGhi123"
+     * </pre>
+     * <p/>
+     * </p> <p> This method preserves all separators except underscores and whitespace. </p>
+     *
+     * @param origStr The string to be converted
+     * @return Convert the string to Camel Case
+     * if it is <code>null</code>,return<code>null</code>
+     */
+    public static String toCamelCase(String origStr) {
+        if (isEmpty(origStr)) {
+            return origStr;
+        }
+        origStr = origStr.trim();
+        int length = origStr.length();
+
+        char curChar;
+        char preChar;
+        int curWritePos = 0;
+        boolean upperCaseNext = false;
+        char[] tgtStr = new char[length];
+        for (int index = 0; index < length; ) {
+            curChar = origStr.charAt(index);
+            index += Character.charCount(curChar);
+            // ignore white space chars
+            if (Character.isWhitespace(curChar)) {
+                continue;
+            }
+            // process char and '_' delimiter
+            if (isLetter(curChar)) {
+                if (upperCaseNext) {
+                    upperCaseNext = false;
+                    curChar = Character.toUpperCase(curChar);
+                } else {
+                    if (curWritePos == 0) {
+                        curChar = Character.toLowerCase(curChar);
+                    } else {
+                        preChar = tgtStr[curWritePos - 1];
+                        // judge pre-read char not Letter or digit
+                        if (!isLetterOrDigit(preChar)) {
+                            curChar = Character.toLowerCase(curChar);
+                        } else {
+                            if (Character.isUpperCase(preChar)) {
+                                curChar = Character.toLowerCase(curChar);
+                            }
+                        }
+                    }
+                }
+                tgtStr[curWritePos++] = curChar;
+            } else {
+                if (curChar == '_') {
+                    upperCaseNext = true;
+                } else {
+                    tgtStr[curWritePos++] = curChar;
+                }
+            }
+        }
+        return new String(tgtStr, 0, curWritePos);
     }
 
     public static String getAuthSignature(final String usrName,
@@ -528,7 +346,8 @@ public class TStringUtils {
         StringBuilder sbuf = new StringBuilder(512);
         byte[] baseStr =
                 base64.encode(HmacUtils.hmacSha1(usrPassWord,
-                        sbuf.append(usrName).append(timestamp).append(randomValue).toString()));
+                        sbuf.append(usrName).append(timestamp)
+                                .append(randomValue).toString()));
         sbuf.delete(0, sbuf.length());
         String signature = "";
         try {
@@ -585,433 +404,4 @@ public class TStringUtils {
         return null;
     }
 
-    /**
-     * Parse the <code>SENTENCE</code> formed by the following grammar.
-     * <p/>
-     * <pre>
-     *  SENTENCE = WORD (DELIMITER* WORD)*
-     *
-     *  WORD = UPPER_CASE_WORD | LOWER_CASE_WORD | TITLE_CASE_WORD | DIGIT_WORD
-     *
-     *  UPPER_CASE_WORD = UPPER_CASE_LETTER+
-     *  LOWER_CASE_WORD = LOWER_CASE_LETTER+
-     *  TITLE_CASE_WORD = UPPER_CASE_LETTER LOWER_CASE_LETTER+
-     *  DIGIT_WORD      = DIGIT+
-     *
-     *  UPPER_CASE_LETTER = Character.isUpperCase()
-     *  LOWER_CASE_LETTER = Character.isLowerCase()
-     *  DIGIT             = Character.isDigit()
-     *  NON_LETTER_DIGIT  = !Character.isUpperCase() && !Character.isLowerCase() &&
-     * !Character.isDigit()
-     *
-     *  DELIMITER = WHITESPACE | NON_LETTER_DIGIT
-     * </pre>
-     */
-
-    // A tokenizer that performs string processing on a string according to a specified type
-    private static class MyWordTokenizer extends WordTokenizer {
-        // Participle type, wordTokenType range of values [-2,1,2,,3,4]
-        // -2,1 : toCamelCase
-        //    2 : toLowerCaseWithUnderscores
-        //    3 : toPascalCase
-        //    4 : toUpperCaseWithUnderscores
-        int wordTokenType = TBaseConstants.META_VALUE_UNDEFINED;
-
-        public MyWordTokenizer(int wordTokenType) {
-            this.wordTokenType = wordTokenType;
-        }
-
-        @Override
-        protected void startSentence(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    buffer.append(Character.toUpperCase(ch));
-                    break;
-                }
-
-                case 3: {
-                    buffer.append(Character.toUpperCase(ch));
-                    break;
-                }
-
-                case 2: {
-                    buffer.append(Character.toLowerCase(ch));
-                    break;
-                }
-
-                case 1:
-                default: {
-                    buffer.append(Character.toLowerCase(ch));
-                    break;
-                }
-            }
-        }
-
-        @Override
-        protected void startWord(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    if (!isDelimiter(buffer.charAt(buffer.length() - 1))) {
-                        buffer.append(UNDERSCORE);
-                    }
-                    buffer.append(Character.toUpperCase(ch));
-                    break;
-                }
-
-                case 3: {
-                    buffer.append(Character.toUpperCase(ch));
-                    break;
-                }
-
-                case 2: {
-                    if (!isDelimiter(buffer.charAt(buffer.length() - 1))) {
-                        buffer.append(UNDERSCORE);
-                    }
-                    buffer.append(Character.toLowerCase(ch));
-                    break;
-                }
-
-                case 1:
-                default: {
-                    if (!isDelimiter(buffer.charAt(buffer.length() - 1))) {
-                        buffer.append(Character.toUpperCase(ch));
-                    } else {
-                        buffer.append(Character.toLowerCase(ch));
-                    }
-                    break;
-                }
-            }
-        }
-
-        @Override
-        protected void inWord(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    buffer.append(Character.toUpperCase(ch));
-                    break;
-                }
-
-                case 3: {
-                    buffer.append(Character.toLowerCase(ch));
-                    break;
-                }
-
-                case 2: {
-                    buffer.append(Character.toLowerCase(ch));
-                    break;
-                }
-
-                case 1:
-                default: {
-                    buffer.append(Character.toLowerCase(ch));
-                    break;
-                }
-            }
-        }
-
-        @Override
-        protected void startDigitSentence(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 3: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 2: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 1:
-                default: {
-                    buffer.append(ch);
-                    break;
-                }
-            }
-        }
-
-        @Override
-        protected void startDigitWord(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    if (!isDelimiter(buffer.charAt(buffer.length() - 1))) {
-                        buffer.append(UNDERSCORE);
-                    }
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 3: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 2: {
-                    if (!isDelimiter(buffer.charAt(buffer.length() - 1))) {
-                        buffer.append(UNDERSCORE);
-                    }
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 1:
-                default: {
-                    buffer.append(ch);
-                    break;
-                }
-            }
-        }
-
-        @Override
-        protected void inDigitWord(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 3: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 2: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 1:
-                default: {
-                    buffer.append(ch);
-                    break;
-                }
-            }
-        }
-
-        @Override
-        protected void inDelimiter(StringBuilder buffer, char ch) {
-            switch (wordTokenType) {
-                case 4: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 3: {
-                    if (ch != UNDERSCORE) {
-                        buffer.append(ch);
-                    }
-                    break;
-                }
-
-                case 2: {
-                    buffer.append(ch);
-                    break;
-                }
-
-                case 1:
-                default: {
-                    if (ch != UNDERSCORE) {
-                        buffer.append(ch);
-                    }
-                    break;
-                }
-            }
-        }
-    }
-
-
-    private abstract static class WordTokenizer {
-        protected static final char UNDERSCORE = '_';
-
-        /**
-         * Parse sentence。
-         */
-        public String parse(String str) {
-            if (isEmpty(str)) {
-                return str;
-            }
-
-            int length = str.length();
-            StringBuilder buffer = new StringBuilder(length);
-
-            for (int index = 0; index < length; index++) {
-                char ch = str.charAt(index);
-
-                // Ignore white space.
-                if (Character.isWhitespace(ch)) {
-                    continue;
-                }
-
-                // Start with capital letters: UpperCaseWord or TitleCaseWord.
-                if (Character.isUpperCase(ch)) {
-                    int wordIndex = index + 1;
-
-                    while (wordIndex < length) {
-                        char wordChar = str.charAt(wordIndex);
-
-                        if (Character.isUpperCase(wordChar)) {
-                            wordIndex++;
-                        } else if (Character.isLowerCase(wordChar)) {
-                            wordIndex--;
-                            break;
-                        } else {
-                            break;
-                        }
-                    }
-
-                    // 1. wordIndex == length, indicating that the last letter is uppercase
-                    //      and is handled by upperCaseWord.
-                    // 2. wordIndex == index, indicating that index is a titleCaseWord.
-                    // 3. wordIndex > index, indicating that index to wordIndex - 1 is all uppercase,
-                    //      treated with upperCaseWord.
-                    if (wordIndex == length || wordIndex > index) {
-                        index = parseUpperCaseWord(buffer, str, index, wordIndex);
-                    } else {
-                        index = parseTitleCaseWord(buffer, str, index);
-                    }
-
-                    continue;
-                }
-
-                // start with LowerCaseWord。
-                if (Character.isLowerCase(ch)) {
-                    index = parseLowerCaseWord(buffer, str, index);
-                    continue;
-                }
-
-                // start with DigitWord。
-                if (Character.isDigit(ch)) {
-                    index = parseDigitWord(buffer, str, index);
-                    continue;
-                }
-
-                // start with Delimiter。
-                inDelimiter(buffer, ch);
-            }
-
-            return buffer.toString();
-        }
-
-        private int parseUpperCaseWord(StringBuilder buffer, String str, int index, int length) {
-            char ch = str.charAt(index++);
-
-            // The first letter must exist and be capitalized.
-            if (buffer.length() == 0) {
-                startSentence(buffer, ch);
-            } else {
-                startWord(buffer, ch);
-            }
-
-            //Subsequent letters must be lowercase.
-            for (; index < length; index++) {
-                ch = str.charAt(index);
-                inWord(buffer, ch);
-            }
-
-            return index - 1;
-        }
-
-        private int parseLowerCaseWord(StringBuilder buffer, String str, int index) {
-            char ch = str.charAt(index++);
-
-            // The first letter must exist and be lower case.
-            if (buffer.length() == 0) {
-                startSentence(buffer, ch);
-            } else {
-                startWord(buffer, ch);
-            }
-
-            // Subsequent letters must be lowercase.
-            int length = str.length();
-
-            for (; index < length; index++) {
-                ch = str.charAt(index);
-
-                if (Character.isLowerCase(ch)) {
-                    inWord(buffer, ch);
-                } else {
-                    break;
-                }
-            }
-
-            return index - 1;
-        }
-
-        private int parseTitleCaseWord(StringBuilder buffer, String str, int index) {
-            char ch = str.charAt(index++);
-
-            // The first letter must exist and be capitalized.
-            if (buffer.length() == 0) {
-                startSentence(buffer, ch);
-            } else {
-                startWord(buffer, ch);
-            }
-
-            // Subsequent letters must be lowercase.
-            int length = str.length();
-
-            for (; index < length; index++) {
-                ch = str.charAt(index);
-
-                if (Character.isLowerCase(ch)) {
-                    inWord(buffer, ch);
-                } else {
-                    break;
-                }
-            }
-
-            return index - 1;
-        }
-
-        private int parseDigitWord(StringBuilder buffer, String str, int index) {
-            char ch = str.charAt(index++);
-
-            // The first character, must exist and be a number.
-            if (buffer.length() == 0) {
-                startDigitSentence(buffer, ch);
-            } else {
-                startDigitWord(buffer, ch);
-            }
-
-            // Subsequent characters must be numbers.
-            int length = str.length();
-
-            for (; index < length; index++) {
-                ch = str.charAt(index);
-
-                if (Character.isDigit(ch)) {
-                    inDigitWord(buffer, ch);
-                } else {
-                    break;
-                }
-            }
-
-            return index - 1;
-        }
-
-        protected boolean isDelimiter(char ch) {
-            return ((!Character.isUpperCase(ch))
-                    && (!Character.isLowerCase(ch))
-                    && (!Character.isDigit(ch)));
-        }
-
-        protected abstract void startSentence(StringBuilder buffer, char ch);
-
-        protected abstract void startWord(StringBuilder buffer, char ch);
-
-        protected abstract void inWord(StringBuilder buffer, char ch);
-
-        protected abstract void startDigitSentence(StringBuilder buffer, char ch);
-
-        protected abstract void startDigitWord(StringBuilder buffer, char ch);
-
-        protected abstract void inDigitWord(StringBuilder buffer, char ch);
-
-        protected abstract void inDelimiter(StringBuilder buffer, char ch);
-    }
 }
diff --git a/tubemq-server/src/main/assembly/assembly.xml b/tubemq-server/src/main/assembly/assembly.xml
index d640901..ceb3012 100644
--- a/tubemq-server/src/main/assembly/assembly.xml
+++ b/tubemq-server/src/main/assembly/assembly.xml
@@ -37,7 +37,7 @@
                 <include>./resources/**</include>
                 <include>LICENSE</include>
                 <include>NOTICE</include>
-                <include>DISCLAIMER</include>
+                <include>DISCLAIMER-WIP</include>
             </includes>
             <excludes>
                 <exclude>**/src/**</exclude>


[incubator-tubemq] 08/29: [TUBEMQ-526] Adjust the packaging script and version check list, remove the "-WIP" tag

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit bf217f6be204d81aa7402859b8599fd54c0c92df
Author: gosonzhang <go...@tencent.com>
AuthorDate: Tue Jan 19 10:52:24 2021 +0800

    [TUBEMQ-526] Adjust the packaging script and version check list, remove the "-WIP" tag
---
 pom.xml                                       | 2 +-
 tubemq-client/src/main/assembly/assembly.xml  | 2 +-
 tubemq-example/src/main/assembly/assembly.xml | 2 +-
 tubemq-server/src/main/assembly/assembly.xml  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index f9b7342..bd51de2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -263,7 +263,7 @@
                         <!-- Front-end -->
                         <exclude>resources/assets/lib/**</exclude>
                         <exclude>resources/assets/public/**</exclude>
-                        <exclude>DISCLAIMER-WIP</exclude>
+                        <exclude>DISCLAIMER</exclude>
                         <exclude>tubemq-web/**</exclude>
 
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/third_party/**</exclude>
diff --git a/tubemq-client/src/main/assembly/assembly.xml b/tubemq-client/src/main/assembly/assembly.xml
index ee48ac7..52cad36 100644
--- a/tubemq-client/src/main/assembly/assembly.xml
+++ b/tubemq-client/src/main/assembly/assembly.xml
@@ -34,7 +34,7 @@
                 <include>./conf/tools.log4j.properties</include>
                 <include>LICENSE</include>
                 <include>NOTICE</include>
-                <include>DISCLAIMER-WIP</include>
+                <include>DISCLAIMER</include>
             </includes>
             <excludes>
                 <exclude>**/src/**</exclude>
diff --git a/tubemq-example/src/main/assembly/assembly.xml b/tubemq-example/src/main/assembly/assembly.xml
index 11edd32..34e53e3 100644
--- a/tubemq-example/src/main/assembly/assembly.xml
+++ b/tubemq-example/src/main/assembly/assembly.xml
@@ -34,7 +34,7 @@
                 <include>./conf/tools.log4j.properties</include>
                 <include>LICENSE</include>
                 <include>NOTICE</include>
-                <include>DISCLAIMER-WIP</include>
+                <include>DISCLAIMER</include>
             </includes>
             <excludes>
                 <exclude>**/src/**</exclude>
diff --git a/tubemq-server/src/main/assembly/assembly.xml b/tubemq-server/src/main/assembly/assembly.xml
index ceb3012..d640901 100644
--- a/tubemq-server/src/main/assembly/assembly.xml
+++ b/tubemq-server/src/main/assembly/assembly.xml
@@ -37,7 +37,7 @@
                 <include>./resources/**</include>
                 <include>LICENSE</include>
                 <include>NOTICE</include>
-                <include>DISCLAIMER-WIP</include>
+                <include>DISCLAIMER</include>
             </includes>
             <excludes>
                 <exclude>**/src/**</exclude>


[incubator-tubemq] 20/29: [TUBEMQ-556]Index value is bigger than the actual number of records (#422)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 61b204a2acd44102113a07f2c0b723c3e97df82f
Author: gosonzhang <46...@qq.com>
AuthorDate: Mon Feb 8 21:48:38 2021 +0800

    [TUBEMQ-556]Index value is bigger than the actual number of records (#422)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 .../tubemq/server/broker/web/BrokerAdminServlet.java     | 16 ++++++++--------
 .../tubemq/server/common/webbase/WebMethodMapper.java    |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java
index dd4bbdf..7f999ff 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/web/BrokerAdminServlet.java
@@ -110,10 +110,10 @@ public class BrokerAdminServlet extends AbstractWebHandler {
             if (index++ > 0) {
                 sBuilder.append(",");
             }
-            sBuilder.append("{\"id\":").append(index + 1)
+            sBuilder.append("{\"id\":").append(index)
                     .append(",\"method\":\"").append(method).append("\"}");
         }
-        sBuilder.append("],\"totalCnt\":").append(index + 1).append("}");
+        sBuilder.append("],\"totalCnt\":").append(index).append("}");
     }
 
     /***
@@ -150,10 +150,10 @@ public class BrokerAdminServlet extends AbstractWebHandler {
             int partitionId = Integer.parseInt(partitionIdArr[2]);
             String consumerId = entry.getValue().getConsumerId();
             boolean ifFilterConsume = entry.getValue().isFilterConsume();
-            if (index > 0) {
+            if (index++ > 0) {
                 sBuilder.append(",");
             }
-            sBuilder.append("{\"index\":").append(++index).append(",\"groupName\":\"")
+            sBuilder.append("{\"index\":").append(index).append(",\"groupName\":\"")
                     .append(groupName).append("\",\"topicName\":\"").append(topicName)
                     .append("\",\"partitionId\":").append(partitionId);
             Long regTime =
@@ -231,11 +231,11 @@ public class BrokerAdminServlet extends AbstractWebHandler {
                     || (!topicNameSet.isEmpty() && !topicNameSet.contains(entry.getKey()))) {
                 continue;
             }
-            if (recordId > 0) {
+            if (recordId++ > 0) {
                 sBuilder.append(",");
             }
             index = 0;
-            sBuilder.append("{\"index\":").append(++recordId).append(",\"topicName\":\"")
+            sBuilder.append("{\"index\":").append(recordId).append(",\"topicName\":\"")
                     .append(entry.getKey()).append("\",\"storeInfo\":[");
             ConcurrentHashMap<Integer, MessageStore> partStoreMap = entry.getValue();
             if (partStoreMap != null) {
@@ -564,13 +564,13 @@ public class BrokerAdminServlet extends AbstractWebHandler {
             if (entry.getKey() == null || entry.getValue() == null) {
                 continue;
             }
-            if (totalCnt > 0) {
+            if (totalCnt++ > 0) {
                 sBuilder.append(",");
             }
             sBuilder.append("{\"Partition\":\"").append(entry.getKey())
                     .append("\",\"Consumer\":\"")
                     .append(entry.getValue().getConsumerId())
-                    .append("\",\"index\":").append(++totalCnt).append("}");
+                    .append("\",\"index\":").append(totalCnt).append("}");
         }
         sBuilder.append("],\"totalCnt\":").append(totalCnt).append("}");
     }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/webbase/WebMethodMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/webbase/WebMethodMapper.java
index 147a388..c6885ec 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/webbase/WebMethodMapper.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/webbase/WebMethodMapper.java
@@ -52,7 +52,7 @@ public class WebMethodMapper {
             }
         }
         logger.error(new StringBuilder(512)
-                .append("registerWebMethod failure, not found Method by clsMethodName")
+                .append("registerWebMethod failure, not found Method by clsMethodName ")
                 .append(clsMethodName).append(" in WebHandler class ")
                 .append(webHandler.getClass().getName()).toString());
     }


[incubator-tubemq] 19/29: fix short conversation bug

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 8a73c1677e280de33b577d4786ea96346d781248
Author: 曹显乐 <xi...@vivo.com>
AuthorDate: Tue Feb 2 10:34:11 2021 +0800

    fix short conversation bug
---
 .../org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
index acd03c9..109abdf 100644
--- a/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
+++ b/tubemq-client/src/main/java/org/apache/tubemq/client/producer/RoundRobinPartitionRouter.java
@@ -18,6 +18,7 @@
 package org.apache.tubemq.client.producer;
 
 import java.util.List;
+import java.util.Random;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.tubemq.client.exception.TubeClientException;
@@ -40,7 +41,7 @@ public class RoundRobinPartitionRouter implements PartitionRouter {
         }
         AtomicInteger currRouterCount = partitionRouterMap.get(message.getTopic());
         if (null == currRouterCount) {
-            AtomicInteger newCounter = new AtomicInteger(0);
+            AtomicInteger newCounter = new AtomicInteger(new Random().nextInt());
             currRouterCount = partitionRouterMap.putIfAbsent(message.getTopic(), newCounter);
             if (null == currRouterCount) {
                 currRouterCount = newCounter;


[incubator-tubemq] 28/29: [TUBEMQ-563]Update the CHANGES.md according to the 0.8.0-RC3 changes (#430)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 7fb91aa25a6f9d113fc57b9f2e0a438c35cf7e72
Author: gosonzhang <46...@qq.com>
AuthorDate: Thu Feb 18 20:44:11 2021 +0800

    [TUBEMQ-563]Update the CHANGES.md according to the 0.8.0-RC3 changes (#430)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 CHANGES.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGES.md b/CHANGES.md
index 39a01a8..12d3903 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -62,6 +62,7 @@
 | [TUBEMQ-505](https://issues.apache.org/jira/browse/TUBEMQ-505) | Remove the "WIP" label of the DISCLAIMER file  | Major |
 | [TUBEMQ-543](https://issues.apache.org/jira/browse/TUBEMQ-543) | Modify the LICENSE statement of multiple files and others  | Major |
 | [TUBEMQ-557](https://issues.apache.org/jira/browse/TUBEMQ-557) | Handle the issues mentioned in the 0.8.0-RC2 review  | Major |
+| [TUBEMQ-562](https://issues.apache.org/jira/browse/TUBEMQ-562) | Update project contents according to the 0.8.0-RC3 review  | Major |
 
 ### SUB-TASK:
 | JIRA  | Summary  | Priority |


[incubator-tubemq] 14/29: [TUBEMQ-550] Adjust LICENSE file content

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 444d55aff232ca2956e485a0a124f3414db3d9c0
Author: gosonzhang <go...@tencent.com>
AuthorDate: Fri Jan 29 13:17:40 2021 +0800

    [TUBEMQ-550] Adjust LICENSE file content
---
 LICENSE | 490 ++++++++++++++++++++++++++--------------------------------------
 1 file changed, 198 insertions(+), 292 deletions(-)

diff --git a/LICENSE b/LICENSE
index a2d97e6..e34b43b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -201,299 +201,205 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
------------------------------------------------------------------------------------------------------------
-
-
-Open Source Software Licensed under the BSD 3-Clause License 
---------------------------------------------------------------------
-
-1. tubemq-client-twins/tubemq-client-cpp/src/any.h
-   tubemq-client-twins/tubemq-client-cpp/src/buffer.h
-evpp, Reference Version: https://github.com/Qihoo360/evpp/blob/master/evpp/any.h version c5038a6
-                         https://github.com/Qihoo360/evpp/blob/master/evpp/buffer.h version b2535d7  
-Copyright (c) 2017, Qihoo 360
-License: https://github.com/Qihoo360/evpp/blob/master/LICENSE
-
-
-Terms of the BSD 3-Clause License:
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of the copyright holder nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-
-Open Source Software Licensed under the MIT License 
---------------------------------------------------------------------
-
-1. resources/assets/lib/DataTables/*
-datatables  1.10.7
-Copyright (c) 2008-2013 SpryMedia Limited
-License: https://github.com/DataTables/DataTables/blob/1.10.7/license.txt
-
-2. resources/assets/lib/jquery.min.js
-jquery 1.11.3
-Copyright 2014 jQuery Foundation and other contributors
-License: https://github.com/jquery/jquery/blob/1.11.3/MIT-LICENSE.txt
-
-Terms of the MIT License:
---------------------------------------------------------------------
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-Open Source Software Licensed under the Apache License Version 2.0
------------------------------------------------------------------------------------------------------------
-1. tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/Bytes.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HashedBytes.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HasThread.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/RecoverableZooKeeper.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperWatcher.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperListener.java
-   tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ThreadUtils.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperConnectionException.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/master/utils/Chore.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZKUtil.java
-   tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/RowLock.java
-hbase 0.94.27 (Please note that the software have been modified.)
-Copyrighy (C)  The Apache Software Foundation
-License: https://github.com/apache/hbase/blob/rel/0.94.27/LICENSE.txt
-
-2. tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
-   tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
-mina 2.0.12
-Copyright 2007-2012 The Apache Software Foundation.
-License: https://github.com/apache/mina/blob/2.0.12/LICENSE.txt
-
-3. tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
-   tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferOutputStream.java
-Apache Avro 1.7.6
-Copyright 2010 The Apache Software Foundation
-License: https://github.com/apache/avro/blob/release-1.7.6/LICENSE.txt
-
-4. tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
-citrus	r3.1.4 (Please note that the software have been modified.)
-Copyrighy (C) Alibaba Group Holding Limited.
-License: https://github.com/webx/citrus/blob/r3.1.4/pom.xml
-
-5. bin/broker.sh
-   bin/master.sh
-Metamorphosis  metamorphosis-all-1.4.4 (Please note that the software have been modified.)
-Copyrighy (C) Alibaba Group Holding Limited.
-License: https://github.com/killme2008/Metamorphosis/blob/metamorphosis-all-1.4.4/COPYING.txt
-
-6. resources/assets/public/css/style.css
-1. openmct v0.9.0
-Copyright (c) 2014-2015, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. 
-License: https://gitee.com/ford25v6/openmct/blob/v0.9.0/LICENSES.md
-
-7. tubemq-client-twins/tubemq-client-cpp/src/future.h
-Apache Pulsar, Reference Version: https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/lib/Future.h b3596c4
-License: https://github.com/apache/pulsar/blob/master/LICENSE
-
-
-Terms of the Apache License Version 2.0:
---------------------------------------------------------------------
-                                    Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
 
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
+=======================================================================
+
+=========
+1. Third party MIT license licenses
+=========
+
+The following components are provided under the MIT license.
+
+----
+
+1.1 resources/assets/lib/jquery.min.js
+ Source  : jquery 1.11.3
+ License : https://github.com/jquery/jquery/blob/1.11.3/MIT-LICENSE.txt
+
+| Copyright 2014 jQuery Foundation and other contributors
+| http://jquery.com/
+|
+| Permission is hereby granted, free of charge, to any person obtaining
+| a copy of this software and associated documentation files (the
+| "Software"), to deal in the Software without restriction, including
+| without limitation the rights to use, copy, modify, merge, publish,
+| distribute, sublicense, and/or sell copies of the Software, and to
+| permit persons to whom the Software is furnished to do so, subject to
+| the following conditions:
+|
+| The above copyright notice and this permission notice shall be
+| included in all copies or substantial portions of the Software.
+|
+| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+----
+
+1.2 resources/assets/lib/DataTables/*
+ Source  : datatables  1.10.7
+ License : https://github.com/DataTables/DataTables/blob/1.10.7/license.txt
+
+| Copyright (c) 2008-2013 SpryMedia Limited
+| http://datatables.net
+|
+| Permission is hereby granted, free of charge, to any person obtaining a copy
+| of this software and associated documentation files (the "Software"), to deal
+| in the Software without restriction, including without limitation the rights
+| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+| copies of the Software, and to permit persons to whom the Software is
+| furnished to do so, subject to the following conditions:
+|
+| The above copyright notice and this permission notice shall be included in
+| all copies or substantial portions of the Software.
+|
+| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+| THE SOFTWARE.
+
+----
+
+=========
+2. Third party BSD 3-Clause license
+=========
+
+The following components are provided under the BSD 3-Clause license.
+
+----
+
+2.1 tubemq-client-twins/tubemq-client-cpp/src/any.h
+    tubemq-client-twins/tubemq-client-cpp/src/buffer.h
+ Source  : https://github.com/Qihoo360/evpp/blob/master/evpp/any.h version c5038a6
+           https://github.com/Qihoo360/evpp/blob/master/evpp/buffer.h version b2535d7
+ License : https://github.com/Qihoo360/evpp/blob/master/LICENSE
+
+| BSD 3-Clause License
+|
+| Copyright (c) 2017, Qihoo 360
+| All rights reserved.
+|
+| Redistribution and use in source and binary forms, with or without
+| modification, are permitted provided that the following conditions are met:
+|
+| * Redistributions of source code must retain the above copyright notice, this
+|   list of conditions and the following disclaimer.
+|
+| * Redistributions in binary form must reproduce the above copyright notice,
+|   this list of conditions and the following disclaimer in the documentation
+|   and/or other materials provided with the distribution.
+|
+| * Neither the name of the copyright holder nor the names of its
+|   contributors may be used to endorse or promote products derived from
+|   this software without specific prior written permission.
+|
+| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+| FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+| DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+| SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+| CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+| OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----
+
+=========
+3. Third party Apache 2.0 Licenses
+=========
+
+The following components are provided under the Apache 2.0 License.
+
+----
+
+3.1 tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/Bytes.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HashedBytes.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/HasThread.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/RecoverableZooKeeper.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperWatcher.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperListener.java
+    tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ThreadUtils.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZooKeeperConnectionException.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/master/utils/Chore.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/offsetstorage/zookeeper/ZKUtil.java
+    tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/RowLock.java
+ Source  : hbase 0.94.27 (Please note that the software have been modified.)
+ License : https://github.com/apache/hbase/blob/rel/0.94.27/LICENSE.txt
+
+3.2 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
+    tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
+ Source  : mina 2.0.12
+ License : https://github.com/apache/mina/blob/2.0.12/LICENSE.txt
+
+3.3 bin/broker.sh
+    bin/master.sh
+ Source  : Metamorphosis  metamorphosis-all-1.4.4 (Please note that the software have been modified.)
+ License : https://github.com/killme2008/Metamorphosis/blob/metamorphosis-all-1.4.4/COPYING.txt
+
+3.4 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
+    tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferOutputStream.java
+ Source  : Apache Avro 1.7.6
+ License : https://github.com/apache/avro/blob/release-1.7.6/LICENSE.txt
+
+3.5 tubemq-client-twins/tubemq-client-cpp/src/future.h
+ Source  : Apache Pulsar
+ License : https://github.com/apache/pulsar/blob/master/LICENSE
+
+3.6 resources/assets/public/css/style.css
+ Source  : openmct v0.9.0
+ License : https://gitee.com/ford25v6/openmct/blob/v0.9.0/LICENSES.md
+
+
+=========
+4. Third party Apache 2.0 Licenses
+=========
+
+The project does not contain the LICENSE file, but analyzed from
+the project’s pom.xml content and the file header of the source code file,
+the following components are provided under the Apache 2.0 License.
+
+----
+
+4.1 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
+ Source  : citrus r3.1.4 (Please note that the software have been modified.)
+           https://github.com/webx/citrus/blob/r3.1.4/common/util/src/main/java/com/alibaba/citrus/util/StringUtil.java
+ License: https://github.com/webx/citrus/blob/r3.1.4/pom.xml
+
+ pom.xml includes:
+ |    <licenses>
+ |        <license>
+ |            <name>The Apache Software License, Version 2.0</name>
+ |            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ |            <distribution>repo</distribution>
+ |        </license>
+ |    </licenses>
+
+ source file includes:
+ |
+ | Copyright (c) 2002-2012 Alibaba Group Holding Limited.
+ | All rights reserved.
+ |
+ | Licensed 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.
+ |
 
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
 
 


[incubator-tubemq] 24/29: [TUBEMQ-559] Update the LICENSE file according to the 0.8.0-RC2 review (#425)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit a080e00c06f4cb1d165b290d5b008e1a35d1e63b
Author: gosonzhang <46...@qq.com>
AuthorDate: Thu Feb 11 17:26:54 2021 +0800

    [TUBEMQ-559] Update the LICENSE file according to the 0.8.0-RC2 review (#425)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 LICENSE | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 135 insertions(+), 8 deletions(-)

diff --git a/LICENSE b/LICENSE
index 74ba1b1..744f075 100644
--- a/LICENSE
+++ b/LICENSE
@@ -354,22 +354,18 @@ The following components are provided under the Apache 2.0 License.
  Source  : Apache Pulsar
  License : https://github.com/apache/pulsar/blob/master/LICENSE
 
-3.6 resources/assets/public/css/style.css
-    resources/assets/public/css/ie.css
- Source  : openmct v0.9.0
- License : https://gitee.com/ford25v6/openmct/blob/v0.9.0/LICENSES.md
-
 
 =========
-4. Third party Apache 2.0 Licenses
+4. Third party category X Licenses
 =========
 
+----
+
+NOTICE:
 The project does not contain the LICENSE file, but analyzed from
 the project’s pom.xml content and the file header of the source code file,
 the following components are provided under the Apache 2.0 License.
 
-----
-
 4.1 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
  Source  : citrus r3.1.4 (Please note that the software have been modified.)
            https://github.com/webx/citrus/blob/r3.1.4/common/util/src/main/java/com/alibaba/citrus/util/StringUtil.java
@@ -402,5 +398,136 @@ the following components are provided under the Apache 2.0 License.
  | limitations under the License.
  |
 
+----
+
+NOTICE:
+
+According to the content of the project’s README.markdown and LICENSE.markdown,
+the following components are provided under the slightly modified MIT License.
+
+4.2 resources/assets/public/css/style.css
+    resources/assets/public/css/ie.css
+ Source  : Compass
+
+ README.markdown includes:(https://github.com/Compass/compass/blob/stable/README.markdown)
+ | License
+ | Copyright (c) 2008-2014 Christopher M. Eppstein
+ | All Rights Reserved.
+ | Released under a slightly modified MIT License.
+
+ LICENSE.markdown includes: (https://github.com/Compass/compass/blob/stable/LICENSE.markdown)
+ | Copyright (c) 2009-2014 Christopher M. Eppstein
+ |
+ | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+ |
+ | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. No attribution is required by products that make use of this software.
+ |
+ | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ |
+ | Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.
+ |
+ | Contributors to this project agree to grant all rights to the copyright holder of the primary product. Attribution is maintained in the source control history of the product.
+
+----
+
+NOTICE:
+
+We found that different versions of berkeleydb-je use different authorization protocols.
+The 7.3.7 version we choose uses the Apache V2 LICENSE, we choose to use this component
+based on Apache V2 LICENSE.
+
+If users modify the berkeleydb-je version, please pay attention to this issue.
+The following is the content of the LICENSE file in the component source package:
+
+4.3 berkeleydb-je
+ Source  : Oracle
+
+ LICENSE information notice in webpage: https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html
+ | Oracle Berkeley DB Licensing Information
+ | Oracle employs a dual licensing model that offers customers a choice of either our open source license or a commercial license. Our open source license is OSI-certified and permits use of Berkeley DB in open source projects or in applications that are not distributed to third parties.
+ |
+ | Our commercial license permits closed-source distribution of an application to third parties and provides business assurance. Please address your request for commercial licensing to berkeleydb-info_us@oracle.com.
+ |
+ | For more details please see here: https://www.oracle.com/database/technologies/related/berkeleydb/berkeleydb-licensing.html.
+
+ LICENSE file included in je-7.3.7 source package:
+ | Copyright (C) 2002, 2016, Oracle  and/or its affiliates. All rights reserved.
+ |
+ | Licensed under the Apache License, Version 2.0 (the "License") reproduced below or available 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.
+ | Apache License
+ | Version 2.0, January 2004
+ | http://www.apache.org/licenses/
+ | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+ | 1. Definitions.
+ | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+ | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+ | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+ | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+ | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+ | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+ | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+ | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+ | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or [...]
+ | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+ | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+ | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by com [...]
+ | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+ | 1.	You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ | 2.	You must cause any modified files to carry prominent notices stating that You changed the files; and
+ | 3.	You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+ | 4.	If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; [...]
+ |
+ | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+ | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+ | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+ | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing  [...]
+ | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not li [...]
+ | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributo [...]
+ | END OF TERMS AND CONDITIONS
+ |
+ |
+ | ADDITIONAL THIRD PARTY NOTICES:
+ |
+ |
+ | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ | /***
+ |  * ASM: a very small and fast Java bytecode manipulation framework
+ |  * Copyright (c) 2000-2005 INRIA, France Telecom
+ |  * All rights reserved.
+ |  *
+ |  * Redistribution and use in source and binary forms, with or without
+ |  * modification, are permitted provided that the following conditions
+ |  * are met:
+ |  * 1. Redistributions of source code must retain the above copyright
+ |  *    notice, this list of conditions and the following disclaimer.
+ |  * 2. Redistributions in binary form must reproduce the above copyright
+ |  *    notice, this list of conditions and the following disclaimer in the
+ |  *    documentation and/or other materials provided with the distribution.
+ |  * 3. Neither the name of the copyright holders nor the names of its
+ |  *    contributors may be used to endorse or promote products derived from
+ |  *    this software without specific prior written permission.
+ |  *
+ |  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ |  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ |  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ |  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ |  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ |  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ |  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ |  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ |  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ |  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ |  * THE POSSIBILITY OF SUCH DAMAGE.
+ |  */
+
+
 
 


[incubator-tubemq] 23/29: [TUBEMQ-560] Remove unprepared modules (#426)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 97eeead6856788e1f2816058408c8f3e0c80ca52
Author: gosonzhang <46...@qq.com>
AuthorDate: Thu Feb 11 17:26:11 2021 +0800

    [TUBEMQ-560] Remove unprepared modules (#426)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 pom.xml                                            |   2 -
 tubemq-web/.env                                    |   2 -
 tubemq-web/.eslintignore                           |   5 -
 tubemq-web/.eslintrc                               |  28 --
 tubemq-web/.gitignore                              |  26 --
 tubemq-web/.prettierrc                             |   4 -
 tubemq-web/.stylelintrc                            |   3 -
 tubemq-web/README.md                               |  33 --
 tubemq-web/config-overrides.js                     |  52 ---
 tubemq-web/mock/_constant.js                       |   3 -
 tubemq-web/mock/app.js                             |   6 -
 tubemq-web/package.json                            | 110 -----
 tubemq-web/public/favicon.ico                      | Bin 1226 -> 0 bytes
 tubemq-web/public/index.html                       |  43 --
 tubemq-web/public/logo192.png                      | Bin 33077 -> 0 bytes
 tubemq-web/public/logo512.png                      | Bin 9664 -> 0 bytes
 tubemq-web/public/manifest.json                    |  24 -
 tubemq-web/public/robots.txt                       |   3 -
 tubemq-web/src/components/Breadcrumb/index.less    |   8 -
 tubemq-web/src/components/Breadcrumb/index.tsx     |  47 --
 tubemq-web/src/components/Layout/index.less        |  31 --
 tubemq-web/src/components/Layout/index.tsx         |  76 ---
 tubemq-web/src/components/Modalx/index.less        |  17 -
 tubemq-web/src/components/Modalx/index.tsx         |  49 --
 tubemq-web/src/components/Tablex/index.less        |  16 -
 tubemq-web/src/components/Tablex/index.tsx         | 114 -----
 .../src/components/Tablex/tableFilterHelper.ts     |  32 --
 tubemq-web/src/components/TitleWrap/index.less     |  11 -
 tubemq-web/src/components/TitleWrap/index.tsx      |  22 -
 tubemq-web/src/components/index.tsx                |   3 -
 tubemq-web/src/configs/index.ts                    |   3 -
 tubemq-web/src/configs/menus/index.tsx             |  50 --
 tubemq-web/src/constants/broker.ts                 |  22 -
 tubemq-web/src/constants/person.ts                 |   4 -
 tubemq-web/src/constants/topic.ts                  |  10 -
 tubemq-web/src/context/globalContext.ts            |  12 -
 tubemq-web/src/defaultSettings.js                  |   6 -
 tubemq-web/src/hooks/index.ts                      |  52 ---
 tubemq-web/src/index.tsx                           |  11 -
 tubemq-web/src/pages/Broker/commonModal.tsx        | 274 -----------
 tubemq-web/src/pages/Broker/detail.tsx             | 378 ---------------
 tubemq-web/src/pages/Broker/index.less             |   9 -
 tubemq-web/src/pages/Broker/index.tsx              | 280 -----------
 tubemq-web/src/pages/Broker/query.tsx              | 128 ------
 tubemq-web/src/pages/Cluster/index.less            |   0
 tubemq-web/src/pages/Cluster/index.tsx             | 143 ------
 tubemq-web/src/pages/Issue/consumeGroupDetail.tsx  |  95 ----
 tubemq-web/src/pages/Issue/index.less              |   0
 tubemq-web/src/pages/Issue/index.tsx               |  98 ----
 tubemq-web/src/pages/NotFound/index.tsx            |   5 -
 tubemq-web/src/pages/Topic/commonModal.tsx         | 349 --------------
 tubemq-web/src/pages/Topic/detail.tsx              | 510 ---------------------
 tubemq-web/src/pages/Topic/index.less              |   9 -
 tubemq-web/src/pages/Topic/index.tsx               | 279 -----------
 tubemq-web/src/pages/Topic/query.tsx               | 180 --------
 tubemq-web/src/react-app-env.d.ts                  |   1 -
 tubemq-web/src/router.tsx                          |  55 ---
 tubemq-web/src/routes/index.tsx                    |  37 --
 tubemq-web/src/serviceWorker.ts                    | 146 ------
 tubemq-web/src/setupProxy.js                       |  12 -
 tubemq-web/src/store/global.ts                     |  30 --
 tubemq-web/src/typings/index.ts                    |   1 -
 tubemq-web/src/typings/router.ts                   |  14 -
 tubemq-web/src/utils/index.ts                      |  45 --
 tubemq-web/tsconfig.json                           |  33 --
 tubemq-web/tsconfig.paths.json                     |   8 -
 66 files changed, 4059 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0e6a5ce..3ca5c29 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,6 @@
         <module>tubemq-server</module>
         <module>tubemq-example</module>
         <module>tubemq-connectors</module>
-        <module>tubemq-docker</module>
     </modules>
 
     <properties>
@@ -264,7 +263,6 @@
                         <exclude>resources/assets/lib/**</exclude>
                         <exclude>resources/assets/public/**</exclude>
                         <exclude>DISCLAIMER</exclude>
-                        <exclude>tubemq-web/**</exclude>
                         <!-- copy or modify files from other projects -->
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/src/any.h</exclude>
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/src/buffer.h</exclude>
diff --git a/tubemq-web/.env b/tubemq-web/.env
deleted file mode 100644
index 936a9dc..0000000
--- a/tubemq-web/.env
+++ /dev/null
@@ -1,2 +0,0 @@
-PORT=3000
-SKIP_PREFLIGHT_CHECK=true
diff --git a/tubemq-web/.eslintignore b/tubemq-web/.eslintignore
deleted file mode 100644
index 6bba8e4..0000000
--- a/tubemq-web/.eslintignore
+++ /dev/null
@@ -1,5 +0,0 @@
-node_modules/**
-dist/**
-public/**
-src/serviceWorker.ts
-mock
diff --git a/tubemq-web/.eslintrc b/tubemq-web/.eslintrc
deleted file mode 100644
index 472dd8d..0000000
--- a/tubemq-web/.eslintrc
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  "extends": [
-    "plugin:@typescript-eslint/recommended",
-    "react-app",
-    "plugin:prettier/recommended"
-  ],
-  "plugins": ["@typescript-eslint", "react", "prettier"],
-  "env": {
-    "browser": true,
-    "node": true,
-    "mocha": true
-  },
-  "globals": {
-    "Babel": true,
-    "React": true
-  },
-  "settings": {
-    "react": {
-      "version": "detect"
-    }
-  },
-  "rules": {
-    "@typescript-eslint/no-explicit-any": 0,
-    "@typescript-eslint/explicit-function-return-type": 0,
-    "jsx-a11y/anchor-is-valid": 0,
-    "react-hooks/exhaustive-deps": 0
-  }
-}
diff --git a/tubemq-web/.gitignore b/tubemq-web/.gitignore
deleted file mode 100644
index 448f7e5..0000000
--- a/tubemq-web/.gitignore
+++ /dev/null
@@ -1,26 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# production
-/build
-
-# misc
-.DS_Store
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
-
-package-lock.json
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-yarn.lock
-.history
diff --git a/tubemq-web/.prettierrc b/tubemq-web/.prettierrc
deleted file mode 100644
index c1a6f66..0000000
--- a/tubemq-web/.prettierrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "singleQuote": true,
-  "trailingComma": "es5"
-}
diff --git a/tubemq-web/.stylelintrc b/tubemq-web/.stylelintrc
deleted file mode 100644
index 2e8ff58..0000000
--- a/tubemq-web/.stylelintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "extends": ["stylelint-config-standard", "stylelint-config-prettier"]
-}
diff --git a/tubemq-web/README.md b/tubemq-web/README.md
deleted file mode 100644
index d96c9e5..0000000
--- a/tubemq-web/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# web
-This project was bootstrapped with [React Seed](https://github.com/reactseed/reactseed).
-
-## Available Scripts
-Inside the newly created project, you can run some built-in commands:
-
-### `npm start` or `yarn start`
-
-Runs the app in development mode. 
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
-
-The page will reload if you make edits.
-You will also see any lint errors in the console.
-
-### `npm test` or `yarn test`
-
-Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://create-react-app.dev/docs/running-tests/) for more information.
-
-### `npm run build` or `yarn build`
-
-Builds the app for production to the build folder.
-It correctly bundles React in production mode and optimizes the build for the best performance.
-
-The build is minified and the filenames include the hashes.
-Your app is ready to be deployed!
-
-See the section about [deployment](https://create-react-app.dev/docs/deployment/) for more information.
-
-### `npm run analyze` or `yarn analyze`
-
-Analyzes JavaScript bundles using the source maps.
-> You need to run `npm run build` or `yarn build` before analysis.
diff --git a/tubemq-web/config-overrides.js b/tubemq-web/config-overrides.js
deleted file mode 100644
index bb8515b..0000000
--- a/tubemq-web/config-overrides.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* eslint-disable @typescript-eslint/no-var-requires */
-const path = require('path');
-const webpack = require('webpack');
-const devServer = require('@reactseed/devserver');
-const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin');
-const {
-  override,
-  addWebpackAlias,
-  addLessLoader,
-  overrideDevServer,
-  addWebpackPlugin,
-  fixBabelImports,
-  addBabelPlugin,
-} = require('customize-cra');
-const nodeModulesPath = path.resolve(__dirname, 'node_modules');
-const nodeModules = pkg => path.resolve(nodeModulesPath, pkg);
-
-module.exports = {
-  webpack: override(
-    addBabelPlugin('react-hot-loader/babel'),
-    addLessLoader({
-      javascriptEnabled: true,
-    }),
-    addWebpackAlias({
-      '@': path.resolve(__dirname, 'src'),
-    }),
-    fixBabelImports('antd', {
-      libraryDirectory: 'lib',
-      style: 'css',
-    }),
-    addWebpackPlugin(
-      new AntdDayjsWebpackPlugin(),
-      new webpack.HotModuleReplacementPlugin()
-    ),
-    config => {
-      if (config.mode === 'development') {
-        config.resolve.alias['react-dom'] = path.resolve(
-          __dirname,
-          'node_modules/@hot-loader/react-dom'
-        );
-        config.entry.unshift(nodeModules('react-hot-loader/patch'));
-      }
-      return config;
-    }
-  ),
-  devServer: overrideDevServer(devServer, config => {
-    config.inline = true;
-    // eslint-disable-next-line no-undef
-    Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 10000);
-    return config;
-  }),
-};
diff --git a/tubemq-web/mock/_constant.js b/tubemq-web/mock/_constant.js
deleted file mode 100644
index 286afb4..0000000
--- a/tubemq-web/mock/_constant.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = {
-  apiPrefix: '/api',
-};
diff --git a/tubemq-web/mock/app.js b/tubemq-web/mock/app.js
deleted file mode 100644
index 6a109a8..0000000
--- a/tubemq-web/mock/app.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const { apiPrefix } = require('./_constant');
-const packageJSON = require('../package.json');
-
-module.exports = {
-  [`GET ${apiPrefix}/app`]: packageJSON,
-};
diff --git a/tubemq-web/package.json b/tubemq-web/package.json
deleted file mode 100644
index 19ecc93..0000000
--- a/tubemq-web/package.json
+++ /dev/null
@@ -1,110 +0,0 @@
-{
-  "name": "web",
-  "version": "0.1.0",
-  "private": true,
-  "dependencies": {
-    "@ant-design/icons": "^4.2.1",
-    "@ant-design/pro-layout": "^5.0.12",
-    "@reactseed/use-redux": "^0.0.3",
-    "@reactseed/use-request": "^0.0.2",
-    "@types/lodash": "^4.14.155",
-    "@umijs/use-request": "^1.4.3",
-    "antd": "^4.2.2",
-    "immer": "^6.0.9",
-    "lodash": "^4.17.15",
-    "react": "16.13.0",
-    "react-dom": "16.13.0",
-    "react-redux": "^7.2.0",
-    "react-router-dom": "^5.2.0",
-    "redux": "^4.0.5"
-  },
-  "scripts": {
-    "analyze": "source-map-explorer 'build/static/js/*.js'",
-    "start": "EXTEND_ESLINT=true react-app-rewired start",
-    "build": "react-app-rewired build",
-    "test": "react-app-rewired test",
-    "commit": "git cz",
-    "prettier": "prettier --write 'src/**/*.{ts,tsx}'",
-    "eslint": "eslint --fix --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}'",
-    "stylelint": "stylelint 'src/**/*.less' --syntax less --allow-empty-input"
-  },
-  "browserslist": {
-    "production": [
-      ">0.2%",
-      "not dead",
-      "not op_mini all"
-    ],
-    "development": [
-      "last 1 chrome version",
-      "last 1 firefox version",
-      "last 1 safari version"
-    ]
-  },
-  "lint-staged": {
-    "*.{ts,tsx}": [
-      "npm run eslint",
-      "npm run prettier"
-    ],
-    "*.{less}": [
-      "npm run stylelint"
-    ]
-  },
-  "pre-commit": "lint-staged",
-  "husky": {
-    "hooks": {
-      "pre-commit": "lint-staged",
-      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS --verbose --no-verify"
-    }
-  },
-  "commitlint": {
-    "extends": [
-      "@commitlint/config-conventional"
-    ]
-  },
-  "config": {
-    "commitizen": {
-      "path": "./node_modules/cz-conventional-changelog"
-    }
-  },
-  "devDependencies": {
-    "@commitlint/cli": "^8.3.5",
-    "@commitlint/config-conventional": "^8.3.4",
-    "@hot-loader/react-dom": "=16.13.0",
-    "@reactseed/devserver": "^0.0.2",
-    "@testing-library/jest-dom": "^4.2.4",
-    "@testing-library/react": "^9.3.2",
-    "@testing-library/user-event": "^7.1.2",
-    "@types/jest": "^25.2.1",
-    "@types/node": "^13.13.5",
-    "@types/react": "^16.9.35",
-    "@types/react-dom": "^16.9.8",
-    "@types/react-redux": "^7.1.9",
-    "@types/react-router-dom": "^5.1.5",
-    "antd-dayjs-webpack-plugin": "^1.0.0",
-    "babel-plugin-import": "^1.13.0",
-    "customize-cra": "^0.9.1",
-    "cz-conventional-changelog": "^3.2.0",
-    "eslint": "^6.8.0",
-    "eslint-config-prettier": "^6.10.0",
-    "eslint-config-react-app": "^5.2.0",
-    "eslint-plugin-prettier": "^3.1.2",
-    "eslint-plugin-react": "^7.19.0",
-    "eslint-plugin-react-hooks": "^4.0.2",
-    "http-proxy-middleware": "^1.0.1",
-    "husky": "^4.2.5",
-    "less": "^3.11.1",
-    "less-loader": "^5.0.0",
-    "lint-staged": "^10.2.2",
-    "prettier": "^1.19.1",
-    "react-app-rewire-hot-loader": "^2.0.1",
-    "react-app-rewired": "^2.1.5",
-    "react-hot-loader": "^4.12.21",
-    "react-scripts": "3.4.0",
-    "source-map-explorer": "^2.3.1",
-    "stylelint": "^13.3.3",
-    "stylelint-config-prettier": "^8.0.1",
-    "stylelint-config-standard": "^20.0.0",
-    "typescript": "~3.8.3",
-    "use-immer": "^0.4.0"
-  }
-}
diff --git a/tubemq-web/public/favicon.ico b/tubemq-web/public/favicon.ico
deleted file mode 100644
index 094e7d6..0000000
Binary files a/tubemq-web/public/favicon.ico and /dev/null differ
diff --git a/tubemq-web/public/index.html b/tubemq-web/public/index.html
deleted file mode 100644
index b833b69..0000000
--- a/tubemq-web/public/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
-    <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <meta name="theme-color" content="#000000" />
-    <meta
-      name="description"
-      content="Web site created using create-react-app"
-    />
-    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
-    <!--
-      manifest.json provides metadata used when your web app is installed on a
-      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-    -->
-    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
-    <!--
-      Notice the use of %PUBLIC_URL% in the tags above.
-      It will be replaced with the URL of the `public` folder during the build.
-      Only files inside the `public` folder can be referenced from the HTML.
-
-      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
-      work correctly both with client-side routing and a non-root public URL.
-      Learn how to configure a non-root public URL by running `npm run build`.
-    -->
-    <title>web</title>
-  </head>
-  <body>
-    <noscript>You need to enable JavaScript to run this app.</noscript>
-    <div id="root"></div>
-    <!--
-      This HTML file is a template.
-      If you open it directly in the browser, you will see an empty page.
-
-      You can add webfonts, meta tags, or analytics to this file.
-      The build step will place the bundled scripts into the <body> tag.
-
-      To begin the development, run `npm start` or `yarn start`.
-      To create a production bundle, use `npm run build` or `yarn build`.
-    -->
-  </body>
-</html>
diff --git a/tubemq-web/public/logo192.png b/tubemq-web/public/logo192.png
deleted file mode 100644
index 904a235..0000000
Binary files a/tubemq-web/public/logo192.png and /dev/null differ
diff --git a/tubemq-web/public/logo512.png b/tubemq-web/public/logo512.png
deleted file mode 100644
index a4e47a6..0000000
Binary files a/tubemq-web/public/logo512.png and /dev/null differ
diff --git a/tubemq-web/public/manifest.json b/tubemq-web/public/manifest.json
deleted file mode 100644
index 4e45728..0000000
--- a/tubemq-web/public/manifest.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "short_name": "web",
-  "name": "web",
-  "icons": [{
-      "src": "favicon.ico",
-      "sizes": "64x64 32x32 24x24 16x16",
-      "type": "image/x-icon"
-    },
-    {
-      "src": "logo192.png",
-      "type": "image/png",
-      "sizes": "192x192"
-    },
-    {
-      "src": "logo512.png",
-      "type": "image/png",
-      "sizes": "512x512"
-    }
-  ],
-  "start_url": ".",
-  "display": "standalone",
-  "theme_color": "#000000",
-  "background_color": "#ffffff"
-}
diff --git a/tubemq-web/public/robots.txt b/tubemq-web/public/robots.txt
deleted file mode 100644
index e9e57dc..0000000
--- a/tubemq-web/public/robots.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# https://www.robotstxt.org/robotstxt.html
-User-agent: *
-Disallow:
diff --git a/tubemq-web/src/components/Breadcrumb/index.less b/tubemq-web/src/components/Breadcrumb/index.less
deleted file mode 100644
index f02c2b7..0000000
--- a/tubemq-web/src/components/Breadcrumb/index.less
+++ /dev/null
@@ -1,8 +0,0 @@
-.breadcrumb-wrapper {
-  background: #fff;
-  padding: 10px 20px;
-}
-
-.ant-pro-basicLayout-content {
-  margin: 1px 0 0 0;
-}
\ No newline at end of file
diff --git a/tubemq-web/src/components/Breadcrumb/index.tsx b/tubemq-web/src/components/Breadcrumb/index.tsx
deleted file mode 100644
index c4113bf..0000000
--- a/tubemq-web/src/components/Breadcrumb/index.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import React from 'react';
-import { MenuDataItem } from '@ant-design/pro-layout';
-import { Link } from 'react-router-dom';
-import { useLocation } from '@/hooks';
-import './index.less';
-import { Breadcrumb } from 'antd';
-
-export interface BreadcrumbProps {
-  breadcrumbMap?: Map<string, import('@umijs/route-utils').MenuDataItem>;
-  appendParams?: string;
-}
-
-const BasicLayout: React.FC<BreadcrumbProps> = props => {
-  const location = useLocation();
-  const { breadcrumbMap, appendParams } = props;
-
-  const pathSnippets = location.pathname.split('/').filter(i => i);
-  const breadcrumbItems = pathSnippets.map((_, index) => {
-    const breadcrumbNameMap = {} as any;
-    breadcrumbMap &&
-      breadcrumbMap.forEach((t: MenuDataItem) => {
-        breadcrumbNameMap[t.key as string] = t.name;
-      });
-    const url = `/${pathSnippets.slice(0, index + 1).join('/')}`;
-    if (appendParams && index === pathSnippets.length - 1) {
-      return (
-        <Breadcrumb.Item key={url}>
-          <Link to={url}>{appendParams}</Link>
-        </Breadcrumb.Item>
-      );
-    }
-
-    return (
-      <Breadcrumb.Item key={url}>
-        <Link to={url}>{breadcrumbNameMap[url]}</Link>
-      </Breadcrumb.Item>
-    );
-  });
-
-  return (
-    <>
-      <Breadcrumb className="breadcrumb-wrapper">{breadcrumbItems}</Breadcrumb>
-    </>
-  );
-};
-
-export default BasicLayout;
diff --git a/tubemq-web/src/components/Layout/index.less b/tubemq-web/src/components/Layout/index.less
deleted file mode 100644
index 6e0ed86..0000000
--- a/tubemq-web/src/components/Layout/index.less
+++ /dev/null
@@ -1,31 +0,0 @@
-#root {
-  height: 100%;
-}
-
-.header-wrapper {
-  width: 400px;
-}
-
-.header-span {
-  float: left;
-}
-
-// global css
-.main-container {
-  background: #fff;
-  padding: 10px 20px 20px 20px;
-}
-
-.search-wrapper {
-  margin-bottom: 20px;
-}
-
-.options-wrapper {
-  a {
-    margin-right: 8px;
-  }
-}
-
-.ant-layout-sider-collapsed .ant-pro-sider-menu-logo {
-  margin-left: -15px;
-}
\ No newline at end of file
diff --git a/tubemq-web/src/components/Layout/index.tsx b/tubemq-web/src/components/Layout/index.tsx
deleted file mode 100644
index a4a4ddd..0000000
--- a/tubemq-web/src/components/Layout/index.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import React, { useState, useEffect, useMemo, useContext } from 'react';
-import ProBasicLayout, {
-  SettingDrawer,
-  getMenuData,
-  MenuDataItem,
-  SettingDrawerProps,
-} from '@ant-design/pro-layout';
-import { Link } from 'react-router-dom';
-import { useLocation } from '@/hooks';
-import { isDevelopEnv } from '@/utils';
-import initSetting from '@/defaultSettings';
-import { menus } from '@/configs';
-import './index.less';
-import GlobalContext from '@/context/globalContext';
-
-const BasicLayout: React.FC = props => {
-  const { cluster, setBreadMap } = useContext(GlobalContext);
-  const location = useLocation();
-  const [settings, setSetting] = useState<SettingDrawerProps['settings']>(
-    initSetting as SettingDrawerProps['settings']
-  );
-  const [openKeys, setOpenKeys] = useState<string[]>([]);
-  const [selectedKeys, setSelectedKeys] = useState<string[]>(['/']);
-  const isDev = isDevelopEnv();
-  const { pathname } = location;
-  const { breadcrumbMap, menuData } = useMemo(() => getMenuData(menus), []);
-  // set breadmap 4 children page 2 use
-  setBreadMap && setBreadMap(breadcrumbMap);
-  useEffect(() => {
-    const select = breadcrumbMap.get(pathname);
-    if (select) {
-      setOpenKeys((select as MenuDataItem)['pro_layout_parentKeys']);
-      setSelectedKeys([(select as MenuDataItem)['key'] as string]);
-    }
-  }, [breadcrumbMap, pathname]);
-
-  return (
-    <>
-      <ProBasicLayout
-        title="TubeMQ"
-        logo="/logo192.png"
-        menuDataRender={() => menuData}
-        menuItemRender={(menuItemProps, defaultDom) => {
-          if (menuItemProps.isUrl || !menuItemProps.path) {
-            return defaultDom;
-          }
-          return <Link to={menuItemProps.path}>{defaultDom}</Link>;
-        }}
-        headerRender={(menuItemProps, defaultDom) => (
-          <div className="header-wrapper">
-            <span className="header-span">{defaultDom}</span>
-            <span>{cluster}</span>
-          </div>
-        )}
-        menuProps={{
-          selectedKeys,
-          openKeys,
-          onOpenChange: setOpenKeys,
-        }}
-        {...settings}
-      >
-        {props.children}
-      </ProBasicLayout>
-
-      {isDev && (
-        <SettingDrawer
-          getContainer={() => document.getElementById('root')}
-          settings={settings}
-          onSettingChange={setSetting}
-        />
-      )}
-    </>
-  );
-};
-
-export default BasicLayout;
diff --git a/tubemq-web/src/components/Modalx/index.less b/tubemq-web/src/components/Modalx/index.less
deleted file mode 100644
index 6b03518..0000000
--- a/tubemq-web/src/components/Modalx/index.less
+++ /dev/null
@@ -1,17 +0,0 @@
-.psw-set {
-  border-top: 1px solid #ccc;
-  padding-top: 20px;
-
-  .pws-label {
-    float: left;
-    line-height: 32px;
-  }
-
-  .psw-input {
-    width: 300px;
-  }
-}
-
-.enhance {
-  color: red;
-}
\ No newline at end of file
diff --git a/tubemq-web/src/components/Modalx/index.tsx b/tubemq-web/src/components/Modalx/index.tsx
deleted file mode 100644
index 6d42e82..0000000
--- a/tubemq-web/src/components/Modalx/index.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * TABLE COMPONENT WITH SEARCH
- */
-import { Modal, Input } from 'antd';
-import * as React from 'react';
-import { ModalProps } from 'antd/lib/modal';
-import { ReactElement } from 'react';
-import './index.less';
-
-const { useState } = React;
-
-export interface OKProps {
-  e: React.MouseEvent<HTMLElement>;
-  psw: string;
-  params?: any;
-}
-
-type ComProps = {
-  context?: number;
-  children?: ReactElement;
-  onOk?: (p: OKProps) => {};
-  params?: any;
-};
-
-const Comp = (props: ComProps & Omit<ModalProps, 'onOk'>) => {
-  const { params } = props;
-  const [psw, setPsw] = useState('');
-  const onOk = (e: React.MouseEvent<HTMLElement>) => {
-    props.onOk && props.onOk({ e, psw, params });
-  };
-
-  return (
-    <>
-      <Modal {...props} className="textWrap" width="60%" onOk={onOk}>
-        {props.children}
-        <div className="psw-set">
-          <label className="pws-label">机器授权:</label>
-          <Input
-            className="psw-input"
-            placeholder="请输入机器授权字段,验证操作权限"
-            onChange={e => setPsw(e.target.value)}
-          />
-        </div>
-      </Modal>
-    </>
-  );
-};
-
-export default Comp;
diff --git a/tubemq-web/src/components/Tablex/index.less b/tubemq-web/src/components/Tablex/index.less
deleted file mode 100644
index f49a245..0000000
--- a/tubemq-web/src/components/Tablex/index.less
+++ /dev/null
@@ -1,16 +0,0 @@
-.textWrap {
-  white-space: pre-line;
-  word-break: break-word;
-}
-.pb10{
-  padding-bottom: 10px;
-}
-.pd10{
-  padding: 10px;
-}
-.mt10{
-  margin-top: 10px;
-}
-.mb10{
-  margin-bottom: 10px;
-}
diff --git a/tubemq-web/src/components/Tablex/index.tsx b/tubemq-web/src/components/Tablex/index.tsx
deleted file mode 100644
index ec41277..0000000
--- a/tubemq-web/src/components/Tablex/index.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * TABLE COMPONENT WITH SEARCH
- */
-import { Table, Input, Row, Button, Col, Tooltip } from 'antd';
-import * as React from 'react';
-import { TableProps } from 'antd/lib/table';
-import { CaretDownFilled, CaretUpFilled } from '@ant-design/icons';
-import { isEmptyParam } from '@/utils';
-import { useEffect } from 'react';
-import './index.less';
-
-const { useState } = React;
-
-const { Search } = Input;
-
-interface ComProps extends TableProps<any> {
-  filterFnX?: (value: any) => void;
-  columns?: any;
-  dataSourceX?: any;
-  searchPlaceholder?: string;
-  defaultSearchKey?: string;
-  isTruePagination?: boolean;
-  showSearch?: boolean;
-  searchWidth?: number;
-  searchStyle?: any;
-}
-
-const Comp = (props: ComProps) => {
-  const {
-    columns,
-    filterFnX,
-    searchPlaceholder,
-    expandable,
-    defaultSearchKey,
-    isTruePagination,
-    showSearch = true,
-    searchWidth = 8,
-    searchStyle = {},
-  } = props;
-  const [filterKey, setFilterKey] = useState(defaultSearchKey);
-  // 自动增加排序
-  if (columns) {
-    columns.forEach((t: any) => {
-      t.sorter = (a: any, b: any) =>
-        a[(t as any).dataIndex] - b[(t as any).dataIndex] >= 0 ? 1 : -1;
-    });
-  }
-  if (expandable && !expandable.expandIcon) {
-    expandable.expandIcon = ({ expanded, onExpand, record }) =>
-      expanded ? (
-        <CaretUpFilled onClick={e => onExpand(record, e)} />
-      ) : (
-        <CaretDownFilled onClick={e => onExpand(record, e)} />
-      );
-  }
-  const opts = { ...props };
-  const dataSource =
-    (!filterKey && isEmptyParam(opts.dataSourceX)) || isTruePagination
-      ? opts.dataSource
-      : opts.dataSourceX;
-  // 如有默认,先处理一次
-  useEffect(() => {
-    if (defaultSearchKey === undefined) return;
-
-    setFilterKey(defaultSearchKey || '');
-    filterFnX && filterFnX(defaultSearchKey || '');
-  }, [defaultSearchKey, filterFnX]);
-  // 分页如果只有一页,自动隐藏
-  opts.pagination = Object.assign(
-    {
-      hideOnSinglePage: true,
-    },
-    {
-      ...opts.pagination,
-    }
-  );
-
-  const onChange = (e: any) => {
-    if (!isTruePagination) {
-      filterFnX && filterFnX(e.target.value);
-    }
-
-    setFilterKey(e.target.value);
-  };
-
-  return (
-    <>
-      {showSearch && filterFnX && (
-        <Row gutter={20} className="mb10" style={{ position: 'relative' }}>
-          <Col span={searchWidth} style={{ padding: 0, ...searchStyle }}>
-            <Tooltip title={filterKey}>
-              <Search
-                value={filterKey}
-                onChange={onChange}
-                onSearch={v => filterFnX(v)}
-                allowClear
-                placeholder={searchPlaceholder || '字符串大小写敏感'}
-                enterButton={
-                  <Button type="primary" onClick={filterFnX}>
-                    搜索
-                  </Button>
-                }
-              />
-            </Tooltip>
-          </Col>
-        </Row>
-      )}
-
-      <Table {...opts} dataSource={dataSource} className="textWrap" />
-    </>
-  );
-};
-
-export default Comp;
diff --git a/tubemq-web/src/components/Tablex/tableFilterHelper.ts b/tubemq-web/src/components/Tablex/tableFilterHelper.ts
deleted file mode 100644
index 0032e8f..0000000
--- a/tubemq-web/src/components/Tablex/tableFilterHelper.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-interface TableFilterHelperProp {
-  key: string;
-  targetArray: Array<any>;
-  srcArray: Array<any>;
-  filterList: Array<any>;
-  updateFunction?: (p: Array<any>) => void;
-}
-const tableFilterHelper = (p: TableFilterHelperProp): any[] => {
-  const { key, srcArray = [], filterList, updateFunction } = p;
-  const res: any[] = [];
-
-  if (key) {
-    srcArray.forEach(it => {
-      const tar = filterList.map(t => {
-        return it[t];
-      });
-      let isFilterRight = false;
-      tar.forEach(t => {
-        if ((t + '').indexOf(key) > -1) isFilterRight = true;
-      });
-      if (isFilterRight) {
-        res.push(it);
-      }
-    });
-  }
-
-  if (updateFunction) updateFunction(res);
-
-  return res;
-};
-
-export default tableFilterHelper;
diff --git a/tubemq-web/src/components/TitleWrap/index.less b/tubemq-web/src/components/TitleWrap/index.less
deleted file mode 100644
index b64cf1b..0000000
--- a/tubemq-web/src/components/TitleWrap/index.less
+++ /dev/null
@@ -1,11 +0,0 @@
-.title-wrap-title {
-  font-size: 16px;
-  font-weight: bold;
-  margin-top: 15px;
-  margin-bottom: 15px;
-  position: relative;
-}
-
-.split-border {
-  border-top: 1px solid #eee;
-}
diff --git a/tubemq-web/src/components/TitleWrap/index.tsx b/tubemq-web/src/components/TitleWrap/index.tsx
deleted file mode 100644
index 47624f4..0000000
--- a/tubemq-web/src/components/TitleWrap/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import * as React from 'react';
-import './index.less';
-
-interface ComProps {
-  title: any;
-  children?: any;
-  wrapperStyle?: any;
-  hasSplit?: boolean;
-}
-
-const Comp = (props: ComProps) => {
-  const { hasSplit = true } = props;
-
-  return (
-    <div style={props.wrapperStyle} className={hasSplit ? 'split-border' : ''}>
-      <div className="title-wrap-title">{props.title}</div>
-      {props.children}
-    </div>
-  );
-};
-
-export default Comp;
diff --git a/tubemq-web/src/components/index.tsx b/tubemq-web/src/components/index.tsx
deleted file mode 100644
index d7314f6..0000000
--- a/tubemq-web/src/components/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import Layout from './Layout';
-
-export { Layout };
diff --git a/tubemq-web/src/configs/index.ts b/tubemq-web/src/configs/index.ts
deleted file mode 100644
index 1cb36a6..0000000
--- a/tubemq-web/src/configs/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import menus from './menus';
-
-export { menus };
diff --git a/tubemq-web/src/configs/menus/index.tsx b/tubemq-web/src/configs/menus/index.tsx
deleted file mode 100644
index e689571..0000000
--- a/tubemq-web/src/configs/menus/index.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react';
-import { Route } from '@/typings/router';
-import {
-  NodeExpandOutlined,
-  ClusterOutlined,
-  SettingOutlined,
-} from '@ant-design/icons';
-/*
- * Note:
- * Menu items with children need to set a key starting with "/"
- * @see https://github.com/umijs/route-utils/blob/master/src/transformRoute/transformRoute.ts#L219
- */
-
-const menus: Route[] = [
-  {
-    path: '/issue',
-    name: '分发查询',
-    icon: <NodeExpandOutlined />,
-    hideChildrenInMenu: true,
-    children: [
-      {
-        path: '/:id',
-        name: '消费组详情',
-      },
-    ],
-  },
-  {
-    name: '配置管理',
-    key: '/other',
-    icon: <SettingOutlined />,
-    path: '/other',
-    children: [
-      {
-        path: '/broker',
-        name: 'Broker列表',
-      },
-      {
-        path: '/topic',
-        name: 'topic列表',
-      },
-    ],
-  },
-  {
-    path: '/cluster',
-    name: '集群管理',
-    icon: <ClusterOutlined />,
-  },
-];
-
-export default menus;
diff --git a/tubemq-web/src/constants/broker.ts b/tubemq-web/src/constants/broker.ts
deleted file mode 100644
index bc6ac45..0000000
--- a/tubemq-web/src/constants/broker.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-export const BROKER_INFO_ZH_MAP = {
-  acceptPublish: '可发布',
-  acceptSubscribe: '可订阅',
-  brokerId: 'BrokerId',
-  brokerIp: 'BrokerIP',
-  brokerPort: 'BrokerPort',
-  brokerTLSPort: 'TLS端口',
-  brokerVersion: '版本',
-  enableTLS: '启用TLS',
-  isAutoForbidden: '自动屏蔽',
-  isBrokerOnline: 'broker注册',
-  isConfChanged: '配置变更',
-  isConfLoaded: '变更加载',
-  isRepAbnormal: '上报异常',
-  manageStatus: '管理状态',
-  runStatus: '运行状态',
-  subStatus: '运行子状态',
-  'runInfo.acceptPublish': 'broker可发布状态',
-  'runInfo.acceptSubscribe': 'broker可订阅状态',
-  'runInfo.numPartitions': 'broker分区数',
-  'runInfo.brokerManageStatus': 'broker运行状态',
-};
diff --git a/tubemq-web/src/constants/person.ts b/tubemq-web/src/constants/person.ts
deleted file mode 100644
index eadf34f..0000000
--- a/tubemq-web/src/constants/person.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const PERSON_INFO_ZH_MAP = {
-  createDate: '创建时间',
-  createUser: '创建人',
-};
diff --git a/tubemq-web/src/constants/topic.ts b/tubemq-web/src/constants/topic.ts
deleted file mode 100644
index d4c8abf..0000000
--- a/tubemq-web/src/constants/topic.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export const TOPIC_INFO_ZH_MAP = {
-  topicName: 'TopicName',
-  infoCount: '配置Broker数',
-  totalCfgNumPart: '配置分区数',
-  totalRunNumPartCount: '运行分区数',
-  isSrvAcceptPublish: '可发布',
-  isSrvAcceptSubscribe: '可订阅',
-  enableAuthControl: '权限受控',
-  groupCount: '授权消费组',
-};
diff --git a/tubemq-web/src/context/globalContext.ts b/tubemq-web/src/context/globalContext.ts
deleted file mode 100644
index 0540e02..0000000
--- a/tubemq-web/src/context/globalContext.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-// global context
-import React from 'react';
-import { BreadcrumbProps } from '@/components/Breadcrumb';
-export interface GlobalContextProps {
-  cluster?: string;
-  setCluster?: Function;
-  breadMap?: BreadcrumbProps['breadcrumbMap'];
-  setBreadMap?: Function;
-  userInfo?: any;
-}
-
-export default React.createContext<GlobalContextProps>({});
diff --git a/tubemq-web/src/defaultSettings.js b/tubemq-web/src/defaultSettings.js
deleted file mode 100644
index 684a9a3..0000000
--- a/tubemq-web/src/defaultSettings.js
+++ /dev/null
@@ -1,6 +0,0 @@
-export default {
-  layout: 'sidemenu',
-  contentWidth: 'Fluid',
-  navTheme: 'dark',
-  primaryColor: '#1890ff',
-};
diff --git a/tubemq-web/src/hooks/index.ts b/tubemq-web/src/hooks/index.ts
deleted file mode 100644
index 8340c9e..0000000
--- a/tubemq-web/src/hooks/index.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { useHistory, useLocation } from 'react-router-dom';
-import useRequest, { axios } from '@reactseed/use-request';
-import useRedux from '@reactseed/use-redux';
-import { message } from 'antd';
-
-interface DataProps {
-  data: any;
-  errorCode: number;
-  errMsg: number;
-  result: boolean;
-}
-// handler for old type interface
-axios.interceptors.request.use(
-  config => {
-    const urlArr = (config.url as any).split('/');
-    config.url = '/webapi.htm';
-    config.params = config.params || {};
-    config.params['type'] = urlArr[2];
-    config.params['method'] = urlArr[3];
-
-    return config;
-  },
-  function(error) {
-    return Promise.reject(error);
-  }
-);
-
-axios.interceptors.response.use(
-  ({ data }) => {
-    if (data.errCode !== 0) {
-      message.error(data.errMsg);
-      return Promise.reject(data);
-    }
-
-    // admin_query_master_group_info interface design no good need handle
-    if (
-      Object.keys(data).includes('groupName') &&
-      Object.keys(data).includes('groupStatus')
-    ) {
-      data.data = {
-        data: data.data,
-        groupName: data.groupName,
-        groupStatus: data.groupStatus,
-      };
-    }
-    return data || [];
-  },
-  function(error) {
-    return Promise.reject(error);
-  }
-);
-export { useHistory, useLocation, useRequest, useRedux };
diff --git a/tubemq-web/src/index.tsx b/tubemq-web/src/index.tsx
deleted file mode 100644
index 416097f..0000000
--- a/tubemq-web/src/index.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
-import App from '@/router';
-import * as serviceWorker from './serviceWorker';
-
-ReactDOM.render(<App />, document.getElementById('root'));
-
-// If you want your app to work offline and load faster, you can change
-// unregister() to register() below. Note this comes with some pitfalls.
-// Learn more about service workers: https://bit.ly/CRA-PWA
-serviceWorker.unregister();
diff --git a/tubemq-web/src/pages/Broker/commonModal.tsx b/tubemq-web/src/pages/Broker/commonModal.tsx
deleted file mode 100644
index 8dc8654..0000000
--- a/tubemq-web/src/pages/Broker/commonModal.tsx
+++ /dev/null
@@ -1,274 +0,0 @@
-import { boolean2Chinese } from '@/utils';
-import Table from '@/components/Tablex';
-import { Col, Form, Input, Row } from 'antd';
-import Modal, { OKProps } from '@/components/Modalx';
-import React from 'react';
-import Query from '@/pages/Broker/query';
-import { FormProps } from 'antd/lib/form';
-
-export const OPTIONS = [
-  {
-    value: 'online',
-    name: '上线',
-  },
-  {
-    value: 'offline',
-    name: '下线',
-  },
-  {
-    value: 'reload',
-    name: '重载',
-  },
-  {
-    value: 'delete',
-    name: '删除',
-  },
-];
-export const OPTIONS_VALUES = OPTIONS.map(t => t.value);
-
-// interface
-export declare type BrokerData = any[];
-export interface BrokerResultData {
-  acceptPublish: string;
-  acceptSubscribe: string;
-  brokerId: number;
-  brokerIp: string;
-  brokerPort: number;
-  brokerTLSPort: number;
-  brokerVersion: string;
-  enableTLS: boolean;
-  isAutoForbidden: boolean;
-  isBrokerOnline: string;
-  isConfChanged: string;
-  isConfLoaded: string;
-  isRepAbnormal: boolean;
-  manageStatus: string;
-  runStatus: string;
-  subStatus: string;
-  [key: string]: any;
-}
-export interface BrokerModalProps {
-  type: string;
-  title: string;
-  updateFunction: (draft: any) => any;
-  params?: any;
-}
-// exports broker modal
-// render funcs
-const renderBrokerOptions = (modalParams: any, dataSource: any[]) => {
-  const columns = [
-    {
-      title: 'Broker',
-      render: (t: string, r: BrokerResultData) => {
-        return `${r.brokerId}#${r.brokerIp}:${r.brokerPort}`;
-      },
-    },
-    {
-      title: 'BrokerIP',
-      dataIndex: 'brokerIp',
-    },
-    {
-      title: '管理状态',
-      dataIndex: 'manageStatus',
-    },
-    {
-      title: '运行状态',
-      dataIndex: 'runStatus',
-    },
-    {
-      title: '运行子状态',
-      dataIndex: 'subStatus',
-    },
-    {
-      title: '可发布',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: '可订阅',
-      render: (t: string) => boolean2Chinese(t),
-    },
-  ];
-  return <Table columns={columns} dataSource={dataSource} rowKey="brokerId" />;
-};
-const renderNewBroker = (form: any) => {
-  const brokerFormArr = [
-    {
-      name: 'brokerId',
-      defaultValue: '0',
-    },
-    {
-      name: 'numPartitions',
-      defaultValue: '3',
-    },
-    {
-      name: 'brokerIp',
-      defaultValue: '',
-    },
-    {
-      name: 'brokerPort',
-      defaultValue: '8123',
-    },
-    {
-      name: 'deleteWhen',
-      defaultValue: '0 0 6,18 * * ?',
-    },
-    {
-      name: 'deletePolicy',
-      defaultValue: 'delete,168h',
-    },
-    {
-      name: 'unflushThreshold',
-      defaultValue: '1000',
-    },
-    {
-      name: 'unflushInterval',
-      defaultValue: '10000',
-    },
-    {
-      name: 'acceptPublish',
-      defaultValue: 'true',
-    },
-    {
-      name: 'acceptSubscribe',
-      defaultValue: 'true',
-    },
-  ];
-
-  return (
-    <Form form={form}>
-      <Row gutter={24}>
-        {brokerFormArr.map((t, index) => (
-          <Col span={12} key={'brokerFormArr' + index}>
-            <Form.Item
-              labelCol={{ span: 12 }}
-              label={t.name}
-              name={t.name}
-              initialValue={t.defaultValue}
-            >
-              <Input />
-            </Form.Item>
-          </Col>
-        ))}
-      </Row>
-    </Form>
-  );
-};
-const renderEditBroker = (modalParams: any, form: FormProps['form']) => {
-  const { params: p } = modalParams;
-  const pickArr = [
-    'numPartitions',
-    'unflushThreshold',
-    'unflushInterval',
-    'deleteWhen',
-    'deletePolicy',
-    'acceptPublish',
-    'acceptSubscribe',
-  ];
-  const brokerFormArr: Array<{
-    name: string;
-    defaultValue: string;
-  }> = [];
-  pickArr.forEach(t => {
-    brokerFormArr.push({
-      name: t,
-      defaultValue: p[t],
-    });
-  });
-
-  return (
-    <Form form={form}>
-      <Row gutter={24}>
-        {brokerFormArr.map((t, index) => (
-          <Col span={12} key={'brokerFormArr' + index}>
-            <Form.Item
-              labelCol={{ span: 12 }}
-              label={t.name}
-              name={t.name}
-              initialValue={t.defaultValue}
-            >
-              <Input />
-            </Form.Item>
-          </Col>
-        ))}
-      </Row>
-    </Form>
-  );
-};
-const renderBrokerStateChange = (modalParams: any) => {
-  const { params } = modalParams;
-
-  return (
-    <div>
-      请确认<span className="enhance">{params.option}</span> ID:{' '}
-      <span className="enhance">{params.id}</span> 的 Broker?
-    </div>
-  );
-};
-export const onOpenModal = (p: BrokerModalProps) => {
-  const { type, title, updateFunction, params } = p;
-  if (typeof params === 'function') {
-    p.params = params();
-  }
-  updateFunction((m: any) => {
-    m.type = type;
-    m.params = params;
-    Object.assign(m, {
-      params,
-      visible: type,
-      title,
-      onOk: (p: OKProps) => {
-        updateFunction((m: any) => {
-          if (type === 'newBroker' || type === 'editBroker') {
-            p.params = f && f.getFieldsValue();
-          }
-          m.okParams = p;
-          m.isOk = Date.now();
-        });
-      },
-      onCancel: () => {
-        updateFunction((m: any) => {
-          m.visible = false;
-          m.isOk = null;
-        });
-      },
-    });
-  });
-};
-
-interface ComProps {
-  modalParams: any;
-  data: any[];
-}
-let f: FormProps['form'];
-const Comp = (props: ComProps) => {
-  const { modalParams, data } = props;
-  const [form] = Form.useForm();
-  f = form;
-
-  return (
-    <Modal {...modalParams}>
-      <div>
-        {modalParams.type &&
-          OPTIONS_VALUES.includes(modalParams.type) &&
-          renderBrokerOptions(
-            modalParams,
-            data.filter((t: BrokerResultData) =>
-              modalParams.params.includes(t.brokerId)
-            )
-          )}
-        {modalParams.type === 'newBroker' && renderNewBroker(form)}
-        {modalParams.type === 'editBroker' &&
-          renderEditBroker(modalParams, form)}
-        {modalParams.type === 'brokerStateChange' &&
-          renderBrokerStateChange(modalParams)}
-      </div>
-      <Query
-        fire={modalParams.isOk}
-        params={modalParams.okParams}
-        type={modalParams.query || modalParams.type}
-      />
-    </Modal>
-  );
-};
-
-export default Comp;
diff --git a/tubemq-web/src/pages/Broker/detail.tsx b/tubemq-web/src/pages/Broker/detail.tsx
deleted file mode 100644
index 28a7d06..0000000
--- a/tubemq-web/src/pages/Broker/detail.tsx
+++ /dev/null
@@ -1,378 +0,0 @@
-import React, { ReactNode, useContext, useState } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import TitleWrap from '@/components/TitleWrap';
-import { Form, Button, Spin, Col, Row, Switch, Tabs } from 'antd';
-import { useImmer } from 'use-immer';
-import './index.less';
-import { useRequest } from '@/hooks';
-import { useParams } from 'react-router-dom';
-import { boolean2Chinese, transParamsWithConstantsMap } from '@/utils';
-import { BROKER_INFO_ZH_MAP } from '@/constants/broker';
-import tableFilterHelper from '@/components/Tablex/tableFilterHelper';
-import CommonModal, { OPTIONS, onOpenModal, BrokerData } from './commonModal';
-
-declare type BrokerQueryData = {
-  withDetail: boolean;
-  brokerId: string;
-};
-
-declare type TopicQueryData = {
-  withTopic: boolean;
-  brokerId: string;
-};
-
-const { TabPane } = Tabs;
-
-const Detail: React.FC = () => {
-  const { id } = useParams();
-  const { breadMap } = useContext(GlobalContext);
-  const [form] = Form.useForm();
-  const [modalParams, updateModelParams] = useImmer<any>({});
-  const [acceptPublish, setAcceptPublish] = useState<any>(false);
-  const [acceptSubscribe, setAcceptSubscribe] = useState<any>(false);
-  const [filterData, updateFilterData] = useImmer<any>({});
-  const queryBrokerConf = useRequest<any>(
-    (
-      data: BrokerQueryData = {
-        withDetail: true,
-        brokerId: id,
-      }
-    ) => ({
-      url: '/api/op_query/admin_query_broker_run_status',
-      data: {
-        ...data,
-      },
-    }),
-    {
-      onSuccess: data => {
-        setAcceptPublish(data[0]['acceptPublish'] === 'true');
-        setAcceptSubscribe(data[0]['acceptSubscribe'] === 'true');
-      },
-    }
-  );
-  const queryTopicInfo = useRequest<any>(
-    (
-      data: TopicQueryData = {
-        withTopic: true,
-        brokerId: id,
-      }
-    ) => ({
-      url: '/api/op_query/admin_query_broker_configure',
-      data: {
-        ...data,
-      },
-    })
-  );
-
-  // render
-  const renderConf = () => {
-    const columns = [
-      {
-        title: '类别',
-        dataIndex: `type`,
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'acceptPublish'),
-        dataIndex: 'acceptPublish',
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'acceptSubscribe'
-        ),
-        dataIndex: 'acceptSubscribe',
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'unflushThreshold'
-        ),
-        dataIndex: 'unflushThreshold',
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'unflushInterval'
-        ),
-        dataIndex: 'unflushInterval',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'deleteWhen'),
-        dataIndex: 'deleteWhen',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'deletePolicy'),
-        dataIndex: 'deletePolicy',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'numPartitions'),
-        dataIndex: 'numPartitions',
-      },
-      {
-        title: '操作',
-        render: (t: string, r: BrokerData) => {
-          return <a onClick={() => onEditConf(r)}>编辑</a>;
-        },
-      },
-    ];
-    const { data } = queryBrokerConf;
-    if (!data || !data[0]) return null;
-    const { BrokerSyncStatusInfo } = data[0];
-    const dataSource = [];
-    dataSource.push({
-      type: '缺省配置',
-      ...BrokerSyncStatusInfo.curBrokerDefaultConfInfo,
-    });
-    dataSource.push({
-      type: '最近上报',
-      ...BrokerSyncStatusInfo.reportedBrokerDefaultConfInfo,
-    });
-    dataSource.push({
-      type: '最近下发',
-      ...BrokerSyncStatusInfo.lastPushBrokerDefaultConfInfo,
-    });
-
-    return <Table columns={columns} dataSource={dataSource} rowKey="type" />;
-  };
-  const renderTopics = (type: string): ReactNode => {
-    const columns = [
-      {
-        title: 'topicName',
-        dataIndex: `topicName`,
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'numPartitions'),
-        dataIndex: 'numPartitions',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'acceptPublish'),
-        dataIndex: 'acceptPublish',
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'acceptSubscribe'
-        ),
-        dataIndex: 'acceptSubscribe',
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'unflushThreshold'
-        ),
-        dataIndex: 'unflushThreshold',
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'unflushInterval'
-        ),
-        dataIndex: 'unflushInterval',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'deleteWhen'),
-        dataIndex: 'deleteWhen',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'deletePolicy'),
-        dataIndex: 'deletePolicy',
-      },
-    ];
-    const { data } = queryBrokerConf;
-    if (!data || !data[0]) return null;
-    const { BrokerSyncStatusInfo } = data[0];
-    let dataSource: any[] = [];
-    if (type === 'cur') {
-      dataSource = BrokerSyncStatusInfo.curBrokerTopicSetConfInfo;
-    } else if (type === 'lastPush') {
-      dataSource = BrokerSyncStatusInfo.lastPushBrokerTopicSetConfInfo;
-    } else if (type === 'lastReported') {
-      dataSource = BrokerSyncStatusInfo.reportedBrokerTopicSetConfInfo;
-    }
-
-    return (
-      <Table
-        columns={columns}
-        dataSource={dataSource}
-        rowKey={r => type + r.topicName}
-        dataSourceX={filterData.list}
-        searchPlaceholder="请输入TopicName搜索"
-        searchStyle={{
-          position: 'absolute',
-          top: '-55px',
-          right: '10px',
-          zIndex: 1,
-        }}
-        filterFnX={value =>
-          tableFilterHelper({
-            key: value,
-            srcArray: dataSource,
-            targetArray: filterData.list,
-            updateFunction: res =>
-              updateFilterData(filterData => {
-                filterData.list = res;
-              }),
-            filterList: ['topicName'],
-          })
-        }
-      />
-    );
-  };
-
-  // event
-  // acceptPublish && acceptSubscribe event
-  const onSwitchChange = (e: boolean, type: string) => {
-    let option = '';
-    if (type === 'acceptPublish') {
-      option = e ? '发布' : '禁止可发布';
-    } else if (type === 'acceptSubscribe') {
-      option = e ? '订阅' : '禁止可订阅';
-    }
-
-    onOpenModal({
-      type: 'brokerStateChange',
-      title: `请确认操作`,
-      updateFunction: updateModelParams,
-      params: {
-        option,
-        id: queryBrokerConf.data[0].brokerId,
-        callback: () => {
-          if (type === 'acceptPublish') {
-            setAcceptPublish(e);
-          } else if (type === 'acceptSubscribe') {
-            setAcceptSubscribe(e);
-          }
-        },
-      },
-    });
-  };
-
-  const onOptions = (type: string) => {
-    onOpenModal({
-      type,
-      title: `确认进行【${OPTIONS.find(t => t.value === type)?.name}】操作?`,
-      updateFunction: updateModelParams,
-      params: [queryBrokerConf.data[0].brokerId],
-    });
-  };
-
-  // new broker
-  const onEditConf = (r: BrokerData) => {
-    onOpenModal({
-      type: 'editBroker',
-      title: '编辑Broker',
-      updateFunction: updateModelParams,
-      params: r,
-    });
-  };
-
-  return (
-    <Spin spinning={queryBrokerConf.loading && queryTopicInfo.loading}>
-      <Breadcrumb
-        breadcrumbMap={breadMap}
-        appendParams={`Broker(${id})详情`}
-      />
-      <div className="main-container">
-        <TitleWrap title="运行状态" wrapperStyle={{ position: 'relative' }}>
-          <div className="broker-detail-options-wrapper">
-            <Switch
-              className="mr10"
-              checked={acceptPublish}
-              checkedChildren="订阅"
-              unCheckedChildren="订阅"
-              onChange={e => onSwitchChange(e, 'acceptPublish')}
-            />
-            <Switch
-              className="mr10"
-              checked={acceptSubscribe}
-              checkedChildren="发布"
-              unCheckedChildren="发布"
-              onChange={e => onSwitchChange(e, 'acceptSubscribe')}
-            />
-            <Button
-              className="mr10"
-              type="primary"
-              size="small"
-              onClick={() => onOptions('online')}
-            >
-              上线
-            </Button>
-            <Button
-              className="mr10"
-              type="primary"
-              size="small"
-              onClick={() => onOptions('offline')}
-            >
-              下线
-            </Button>
-            <Button
-              className="mr10"
-              type="primary"
-              size="small"
-              onClick={() => onOptions('reload')}
-            >
-              重载
-            </Button>
-          </div>
-          <Form form={form}>
-            <Row gutter={24}>
-              {queryBrokerConf.data &&
-                Object.keys(queryBrokerConf.data[0]).map(
-                  (t: string, index: number) => {
-                    const label = transParamsWithConstantsMap(
-                      BROKER_INFO_ZH_MAP,
-                      t
-                    );
-                    const ignoreList = [
-                      'acceptPublish',
-                      'brokerVersion',
-                      'acceptSubscribe',
-                    ];
-                    if (
-                      queryBrokerConf.data[0][t] instanceof Object ||
-                      !label ||
-                      ignoreList.includes(t)
-                    )
-                      return null;
-                    return (
-                      <Col span={12} key={'queryBrokerConf' + index}>
-                        <Form.Item labelCol={{ span: 12 }} label={label}>
-                          {queryBrokerConf.data[0][t] + ''}
-                        </Form.Item>
-                      </Col>
-                    );
-                  }
-                )}
-            </Row>
-          </Form>
-        </TitleWrap>
-        <TitleWrap title="缺省配置">{renderConf()}</TitleWrap>
-        <TitleWrap title="Topic集合配置">
-          <Tabs>
-            <TabPane tab="当前配置" key="cur">
-              {renderTopics('cur')}
-            </TabPane>
-            <TabPane tab="最后下发" key="lastPush">
-              {renderTopics('lastPush')}
-            </TabPane>
-            <TabPane tab="最后上报" key="lastReported">
-              {renderTopics('lastReported')}
-            </TabPane>
-          </Tabs>
-        </TitleWrap>
-      </div>
-      <CommonModal
-        modalParams={modalParams}
-        data={[queryBrokerConf.data && queryBrokerConf.data[0]]}
-      />
-    </Spin>
-  );
-};
-
-export default Detail;
diff --git a/tubemq-web/src/pages/Broker/index.less b/tubemq-web/src/pages/Broker/index.less
deleted file mode 100644
index c95e98d..0000000
--- a/tubemq-web/src/pages/Broker/index.less
+++ /dev/null
@@ -1,9 +0,0 @@
-.broker-detail-options-wrapper {
-  position: absolute;
-  top: 15px;
-  right: 0;
-
-  .mr10 {
-    margin-right: 10px;
-  }
-}
\ No newline at end of file
diff --git a/tubemq-web/src/pages/Broker/index.tsx b/tubemq-web/src/pages/Broker/index.tsx
deleted file mode 100644
index 7cc91dc..0000000
--- a/tubemq-web/src/pages/Broker/index.tsx
+++ /dev/null
@@ -1,280 +0,0 @@
-import React, { useContext, useState } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import { Form, Select, Button, Spin, Switch, message } from 'antd';
-import { useImmer } from 'use-immer';
-import { useRequest } from '@/hooks';
-import tableFilterHelper from '@/components/Tablex/tableFilterHelper';
-import { boolean2Chinese, transParamsWithConstantsMap } from '@/utils';
-import { BROKER_INFO_ZH_MAP } from '@/constants/broker';
-import './index.less';
-import { Link } from 'react-router-dom';
-import CommonModal, {
-  OPTIONS,
-  onOpenModal,
-  BrokerResultData,
-  BrokerData,
-} from './commonModal';
-
-const { Option } = Select;
-const Broker: React.FC = () => {
-  // column config
-  const columns = [
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'brokerId'),
-      dataIndex: 'brokerId',
-      fixed: 'left',
-      render: (t: Array<any>) => <Link to={'/broker/' + t}>{t}</Link>,
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'brokerIp'),
-      dataIndex: 'brokerIp',
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'brokerPort'),
-      dataIndex: 'brokerPort',
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'manageStatus'),
-      dataIndex: 'manageStatus',
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'runStatus'),
-      dataIndex: 'runStatus',
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'subStatus'),
-      dataIndex: 'subStatus',
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'acceptPublish'),
-      dataIndex: 'acceptPublish',
-      render: (t: string, r: BrokerResultData) => {
-        return (
-          <Switch
-            checked={t === 'true'}
-            onChange={e => onSwitchChange(e, r, 'acceptPublish')}
-          />
-        );
-      },
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'acceptSubscribe'),
-      dataIndex: 'acceptSubscribe',
-      render: (t: string, r: BrokerResultData) => {
-        return (
-          <Switch
-            checked={t === 'true'}
-            onChange={e => onSwitchChange(e, r, 'acceptSubscribe')}
-          />
-        );
-      },
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'isConfChanged'),
-      dataIndex: 'isConfChanged',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'isConfLoaded'),
-      dataIndex: 'isConfLoaded',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'isBrokerOnline'),
-      dataIndex: 'isBrokerOnline',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'acceptPublish'),
-      dataIndex: 'isBrokerOnline',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'brokerTLSPort'),
-      dataIndex: 'brokerTLSPort',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'enableTLS'),
-      dataIndex: 'enableTLS',
-      render: (t: boolean) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'isRepAbnormal'),
-      dataIndex: 'isRepAbnormal',
-      render: (t: boolean) => boolean2Chinese(t),
-    },
-    {
-      title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'isAutoForbidden'),
-      dataIndex: 'isAutoForbidden',
-      render: (t: boolean) => boolean2Chinese(t),
-    },
-    {
-      title: '操作',
-      dataIndex: 'brokerIp',
-      fixed: 'right',
-      width: 180,
-      render: (t: string, r: any) => {
-        return (
-          <span className="options-wrapper">
-            {OPTIONS.map(t => (
-              <a key={t.value} onClick={() => onOptionsChange(t.value, r)}>
-                {t.name}
-              </a>
-            ))}
-          </span>
-        );
-      },
-    },
-  ];
-  const { breadMap } = useContext(GlobalContext);
-  const [modalParams, updateModelParams] = useImmer<any>({});
-  const [filterData, updateFilterData] = useImmer<any>({});
-  const [selectBroker, setSelectBroker] = useState<any>([]);
-  const [brokerList, updateBrokerList] = useImmer<BrokerData>([]);
-  const [form] = Form.useForm();
-  // init query
-  const { data, loading, run } = useRequest<any, BrokerData>(
-    (data: BrokerResultData) => ({
-      url: '/api/op_query/admin_query_broker_run_status',
-      data: data,
-    }),
-    {
-      onSuccess: data => {
-        updateBrokerList(d => {
-          Object.assign(d, data);
-        });
-      },
-    }
-  );
-
-  // table event
-  // acceptSubscribe && acceptPublish options
-  const onSwitchChange = (e: boolean, r: BrokerResultData, type: string) => {
-    let option = '';
-    if (type === 'acceptPublish') {
-      option = e ? '发布' : '禁止可发布';
-    } else if (type === 'acceptSubscribe') {
-      option = e ? '订阅' : '禁止可订阅';
-    }
-
-    onOpenModal({
-      type: 'brokerStateChange',
-      title: `请确认操作`,
-      updateFunction: updateModelParams,
-      params: {
-        option,
-        id: r.brokerId,
-        type,
-        callback: () => {
-          const index = data.findIndex(
-            (t: BrokerResultData) => t.brokerId === r.brokerId
-          );
-          updateBrokerList(d => {
-            d[index][type] = e + '';
-          });
-        },
-      },
-    });
-  };
-  // new broker
-  const onNewBroker = () => {
-    onOpenModal({
-      type: 'newBroker',
-      title: '新建Broker',
-      updateFunction: updateModelParams,
-    });
-  };
-  // online, offline, etc.
-  const onOptionsChange = (type: string, r?: BrokerResultData) => {
-    if (!r && !selectBroker.length) {
-      form.resetFields();
-      return message.error('批量操作至少选择一列!');
-    }
-
-    onOpenModal({
-      type,
-      title: `确认进行【${OPTIONS.find(t => t.value === type)?.name}】操作?`,
-      updateFunction: updateModelParams,
-      params: r ? [r.brokerId] : selectBroker,
-    });
-  };
-  // table select
-  const onBrokerTableSelectChange = (p: any[]) => {
-    setSelectBroker(p);
-  };
-
-  return (
-    <Spin spinning={loading}>
-      <Breadcrumb breadcrumbMap={breadMap} />
-      <div className="main-container">
-        <div
-          className="search-wrapper"
-          style={{ float: 'right', marginRight: '-16px' }}
-        >
-          <Form form={form} layout={'inline'}>
-            <Form.Item label="批量操作" name="optionType">
-              <Select
-                style={{ width: 120 }}
-                onChange={(v: string) => onOptionsChange(v)}
-                placeholder="请选择操作"
-              >
-                {OPTIONS.map(t => (
-                  <Option value={t.value} key={t.value}>
-                    {t.name}
-                  </Option>
-                ))}
-              </Select>
-            </Form.Item>
-            <Form.Item>
-              <Button
-                type="primary"
-                onClick={() => onNewBroker()}
-                style={{ margin: '0 10px 0 10px' }}
-              >
-                新增
-              </Button>
-              <Button type="primary" onClick={() => run()}>
-                刷新
-              </Button>
-            </Form.Item>
-          </Form>
-        </div>
-        <Table
-          rowSelection={{ onChange: onBrokerTableSelectChange }}
-          columns={columns}
-          dataSource={brokerList}
-          rowKey="brokerId"
-          searchPlaceholder="请输入关键字搜索"
-          searchWidth={12}
-          dataSourceX={filterData.list}
-          scroll={{ x: 2500 }}
-          filterFnX={value =>
-            tableFilterHelper({
-              key: value,
-              srcArray: data,
-              targetArray: filterData.list,
-              updateFunction: res =>
-                updateFilterData(filterData => {
-                  filterData.list = res;
-                }),
-              filterList: [
-                'brokerId',
-                'brokerIp',
-                'brokerPort',
-                'runStatus',
-                'subStatus',
-                'manageStatus',
-              ],
-            })
-          }
-        />
-      </div>
-      <CommonModal modalParams={modalParams} data={data} />
-    </Spin>
-  );
-};
-
-export default Broker;
diff --git a/tubemq-web/src/pages/Broker/query.tsx b/tubemq-web/src/pages/Broker/query.tsx
deleted file mode 100644
index 9e89789..0000000
--- a/tubemq-web/src/pages/Broker/query.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-import * as React from 'react';
-import './index.less';
-import { OKProps } from '@/components/Modalx';
-import { useRequest } from '@/hooks';
-import { useContext, useEffect } from 'react';
-import GlobalContext from '@/context/globalContext';
-
-interface ComProps {
-  fire: string;
-  params: any;
-  type: string;
-}
-
-const Comp = (props: ComProps) => {
-  const { fire } = props;
-  const { userInfo } = useContext(GlobalContext);
-  // eslint-disable-next-line
-  useEffect(() => {
-    const { params, type } = props;
-    dispatchAction(type, params);
-  }, [fire, props]);
-
-  const dispatchAction = (type: string, p: OKProps) => {
-    if (!fire) return null;
-    let promise;
-    switch (type) {
-      case 'newBroker':
-        promise = newBroker(p);
-        break;
-      case 'editBroker':
-        promise = editBroker(p);
-        break;
-      case 'brokerStateChange':
-        promise = brokerAcceptPublish(type, p);
-        break;
-      case 'online':
-      case 'offline':
-      case 'reload':
-      case 'delete':
-        promise = brokerOptions(type, p);
-        break;
-    }
-
-    promise &&
-      promise.then(t => {
-        const { callback } = p.params;
-        if (t.statusCode !== 0 && callback) callback(t);
-      });
-  };
-
-  const newBrokerQuery = useRequest<any, any>(
-    data => ({ url: '/api/op_modify/admin_add_broker_configure', ...data }),
-    { manual: true }
-  );
-  const newBroker = (p: OKProps) => {
-    const { params } = p;
-    return newBrokerQuery.run({
-      data: {
-        ...params,
-        confModAuthToken: p.psw,
-        createUser: userInfo.userName,
-      },
-    });
-  };
-
-  const updateBrokerQuery = useRequest<any, any>(
-    data => ({ url: '/api/op_modify/admin_update_broker_configure', ...data }),
-    { manual: true }
-  );
-  const editBroker = (p: OKProps) => {
-    const { params } = p;
-    return updateBrokerQuery.run({
-      data: {
-        ...params,
-        confModAuthToken: p.psw,
-        createUser: userInfo.userName,
-      },
-    });
-  };
-
-  const brokerOptionsQuery = useRequest<any, any>(
-    (url, data) => ({ url, ...data }),
-    { manual: true }
-  );
-  const brokerOptions = (type: string, p: OKProps) => {
-    const { params } = p;
-    return brokerOptionsQuery.run(
-      `/api/op_modify/admin_${type}_broker_configure`,
-      {
-        data: {
-          brokerId: params ? params?.join(',') : params?.selectBroker.join(','),
-          confModAuthToken: p.psw,
-          createUser: userInfo.userName,
-        },
-      }
-    );
-  };
-
-  const brokerAcceptPublishQuery = useRequest<any, any>(
-    (url, data) => ({ url, ...data }),
-    { manual: true }
-  );
-  const brokerAcceptPublish = (type: string, p: OKProps) => {
-    const { params } = p;
-    const data: any = {
-      brokerId: params.id,
-      confModAuthToken: p.psw,
-      createUser: userInfo.userName,
-    };
-    if (params.type === 'acceptPublish') {
-      data.isAcceptPublish = params.option;
-    }
-    if (params.type === 'acceptSubscribe') {
-      data.isAcceptSubscribe = params.option;
-    }
-
-    return brokerAcceptPublishQuery.run(
-      `/api/op_modify/admin_set_broker_read_or_write`,
-      {
-        data,
-      }
-    );
-  };
-
-  return <></>;
-};
-
-export default Comp;
diff --git a/tubemq-web/src/pages/Cluster/index.less b/tubemq-web/src/pages/Cluster/index.less
deleted file mode 100644
index e69de29..0000000
diff --git a/tubemq-web/src/pages/Cluster/index.tsx b/tubemq-web/src/pages/Cluster/index.tsx
deleted file mode 100644
index 6b82403..0000000
--- a/tubemq-web/src/pages/Cluster/index.tsx
+++ /dev/null
@@ -1,143 +0,0 @@
-import React, { useContext } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import { Spin } from 'antd';
-import './index.less';
-import { useRequest } from '@/hooks';
-import Modal, { OKProps } from '@/components/Modalx';
-import { useImmer } from 'use-immer';
-
-interface ClusterResultData {
-  groupName: string;
-  groupStatus: string;
-  hostName: string;
-  index: number;
-  port: string;
-  nodeStatus: string;
-  length: number;
-}
-
-const queryClusterList = (data: ClusterResultData) => ({
-  url: '/api/op_query/admin_query_master_group_info',
-  data: data,
-});
-
-const Cluster: React.FC = () => {
-  const { breadMap } = useContext(GlobalContext);
-  const [modalParams, updateModelParams] = useImmer<any>({
-    title: '请确认操作',
-  });
-  const { data, loading } = useRequest<any, any>(queryClusterList, {
-    formatResult: d => {
-      return {
-        list: d.data.map((t: any) => ({
-          groupName: d.groupName,
-          groupStatus: d.groupStatus,
-          hostName: t.hostName,
-          index: t.index,
-          port: t.port,
-          nodeStatus: t.statusInfo.nodeStatus,
-          length: d.data.length,
-        })),
-      };
-    },
-  });
-  const columns = [
-    {
-      title: '集群名',
-      dataIndex: 'groupName',
-      render: (t: string, r: ClusterResultData, index: number) => {
-        return {
-          children: t,
-          props: {
-            rowSpan: index === 0 ? r.length : 0,
-          },
-        };
-      },
-    },
-    {
-      title: '集群状态',
-      dataIndex: 'groupStatus',
-      render: (t: string, r: ClusterResultData, index: number) => {
-        return {
-          children: t,
-          props: {
-            rowSpan: index === 0 ? r.length : 0,
-          },
-        };
-      },
-    },
-    {
-      title: '节点名',
-      render: (t: string, r: ClusterResultData) => {
-        return `${r.groupName}-${r.hostName}`;
-      },
-    },
-    {
-      title: 'IP地址',
-      render: (t: string, r: ClusterResultData) => {
-        return `${r.hostName}-${r.port}`;
-      },
-    },
-    {
-      title: '节点名',
-      dataIndex: 'nodeStatus',
-    },
-    {
-      title: '操作',
-      render: (t: string, r: ClusterResultData, index: number) => {
-        return {
-          children: (
-            <span className="options-wrapper">
-              <a onClick={() => onSwitchCluster(t, r)}>切换</a>
-            </span>
-          ),
-          props: {
-            rowSpan: index === 0 ? r.length : 0,
-          },
-        };
-      },
-    },
-  ];
-
-  const switchClusterQuery = useRequest<any, any>(
-    (data?: ClusterResultData) => ({
-      url: '/api/op_modify/admin_transfer_current_master',
-      data,
-    }),
-    { manual: true }
-  );
-  const onSwitchCluster = (t: string, r: ClusterResultData) => {
-    updateModelParams(d => {
-      d = Object.assign(d, {
-        visible: true,
-        onOk: (p: OKProps) => {
-          switchClusterQuery.run({
-            confModAuthToken: p.psw,
-          });
-        },
-        onCancel: () => {
-          updateModelParams((m: any) => {
-            m.visible = false;
-          });
-        },
-      });
-    });
-  };
-  return (
-    <Spin spinning={loading}>
-      <Breadcrumb breadcrumbMap={breadMap}></Breadcrumb>
-      <div className="main-container">
-        <Table columns={columns} dataSource={data?.list} rowKey="index"></Table>
-      </div>
-      <Modal {...modalParams}>
-        <div>
-          确认<span className="enhance">切换</span>集群?
-        </div>
-      </Modal>
-    </Spin>
-  );
-};
-
-export default Cluster;
diff --git a/tubemq-web/src/pages/Issue/consumeGroupDetail.tsx b/tubemq-web/src/pages/Issue/consumeGroupDetail.tsx
deleted file mode 100644
index 3c5090f..0000000
--- a/tubemq-web/src/pages/Issue/consumeGroupDetail.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-import React, { useContext } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import tableFilterHelper from '@/components/Tablex/tableFilterHelper';
-import { Spin } from 'antd';
-import { useImmer } from 'use-immer';
-import './index.less';
-import { useRequest } from '@/hooks';
-import { useParams } from 'react-router-dom';
-
-declare type ConsumeGroupData = any[];
-interface ConsumeGroupQueryData {
-  consumeGroup: string;
-}
-
-// column config
-const columns = [
-  {
-    title: '消费者ID',
-    dataIndex: 'consumerId',
-  },
-  {
-    title: '消费Topic',
-    dataIndex: 'topicName',
-  },
-  {
-    title: 'broker地址',
-    dataIndex: 'brokerAddr',
-  },
-  {
-    title: '分区ID',
-    dataIndex: 'partId',
-  },
-];
-
-const queryUser = (data: ConsumeGroupQueryData) => ({
-  url: '/api/op_query/admin_query_consume_group_detail',
-  data: data,
-});
-
-const ConsumeGroupDetail: React.FC = () => {
-  const { id } = useParams();
-  const { breadMap } = useContext(GlobalContext);
-  const [filterData, updateFilterData] = useImmer<any>({});
-  const { data, loading } = useRequest<any, ConsumeGroupData>(
-    () =>
-      queryUser({
-        consumeGroup: id,
-      }),
-    {
-      formatResult: data => {
-        const d = data[0];
-        return {
-          list: d.parInfo.map((t: any) => ({
-            consumerId: d.consumerId,
-            ...t,
-          })),
-        };
-      },
-    }
-  );
-
-  return (
-    <Spin spinning={loading}>
-      <Breadcrumb
-        breadcrumbMap={breadMap}
-        appendParams={`消费组详情(${id})`}
-      ></Breadcrumb>
-      <div className="main-container">
-        <Table
-          columns={columns}
-          dataSource={data?.list}
-          rowKey="brokerAddr"
-          searchPlaceholder="请输入 broker地址/分区ID 搜索"
-          dataSourceX={filterData.list}
-          filterFnX={value =>
-            tableFilterHelper({
-              key: value,
-              srcArray: data?.list,
-              targetArray: filterData.list,
-              updateFunction: res =>
-                updateFilterData(filterData => {
-                  filterData.list = res;
-                }),
-              filterList: ['brokerAddr', 'partId'],
-            })
-          }
-        ></Table>
-      </div>
-    </Spin>
-  );
-};
-
-export default ConsumeGroupDetail;
diff --git a/tubemq-web/src/pages/Issue/index.less b/tubemq-web/src/pages/Issue/index.less
deleted file mode 100644
index e69de29..0000000
diff --git a/tubemq-web/src/pages/Issue/index.tsx b/tubemq-web/src/pages/Issue/index.tsx
deleted file mode 100644
index 54f5ad3..0000000
--- a/tubemq-web/src/pages/Issue/index.tsx
+++ /dev/null
@@ -1,98 +0,0 @@
-import React, { useContext } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import { Form, Input, Button, Spin } from 'antd';
-import { useImmer } from 'use-immer';
-import './index.less';
-import { useRequest } from '@/hooks';
-import { Link } from 'react-router-dom';
-
-declare type IssueData = any[];
-interface IssueQueryData {
-  topicName?: string;
-  consumeGroup?: string;
-}
-
-// column config
-const columns = [
-  {
-    title: '消费组',
-    dataIndex: 'consumeGroup',
-    render: (t: Array<any>) => <Link to={'/issue/' + t}>{t}</Link>,
-  },
-  {
-    title: '消费Topic',
-    dataIndex: 'topicSet',
-    render: (t: Array<any>) => {
-      return t.join(',');
-    },
-  },
-  {
-    title: '消费分区',
-    dataIndex: 'consumerNum',
-  },
-];
-
-const queryIssueList = (data: IssueQueryData) => ({
-  url: '/api/op_query/admin_query_sub_info',
-  data: data,
-});
-
-const Issue: React.FC = () => {
-  const { breadMap } = useContext(GlobalContext);
-  const [form] = Form.useForm();
-  const [formValues, updateFormValues] = useImmer<any>({});
-  const { data, loading, run } = useRequest<any, IssueData>(queryIssueList, {});
-
-  const onValuesChange = (p: any) => {
-    updateFormValues(d => {
-      Object.assign(d, p);
-    });
-  };
-  const onSearch = () => {
-    run(formValues);
-  };
-
-  const onReset = () => {
-    form.resetFields();
-    run({});
-  };
-
-  return (
-    <Spin spinning={loading}>
-      <Breadcrumb breadcrumbMap={breadMap}></Breadcrumb>
-      <div className="main-container">
-        <div className="search-wrapper">
-          <Form form={form} layout={'inline'} onValuesChange={onValuesChange}>
-            <Form.Item label="Topic 名称" name="topicName">
-              <Input placeholder="" />
-            </Form.Item>
-            <Form.Item label="消费组" name="consumeGroup">
-              <Input placeholder="" />
-            </Form.Item>
-            <Form.Item>
-              <Button
-                type="primary"
-                onClick={onSearch}
-                style={{ margin: '0 20px' }}
-              >
-                查询
-              </Button>
-              <Button type="default" onClick={onReset}>
-                重置
-              </Button>
-            </Form.Item>
-          </Form>
-        </div>
-        <Table
-          columns={columns}
-          dataSource={data}
-          rowKey="consumeGroup"
-        ></Table>
-      </div>
-    </Spin>
-  );
-};
-
-export default Issue;
diff --git a/tubemq-web/src/pages/NotFound/index.tsx b/tubemq-web/src/pages/NotFound/index.tsx
deleted file mode 100644
index 8a0e971..0000000
--- a/tubemq-web/src/pages/NotFound/index.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import React from 'react';
-
-const NotFound: React.FC = () => <div>404</div>;
-
-export default NotFound;
diff --git a/tubemq-web/src/pages/Topic/commonModal.tsx b/tubemq-web/src/pages/Topic/commonModal.tsx
deleted file mode 100644
index 9d7783c..0000000
--- a/tubemq-web/src/pages/Topic/commonModal.tsx
+++ /dev/null
@@ -1,349 +0,0 @@
-import { boolean2Chinese } from '@/utils';
-import Table from '@/components/Tablex';
-import { Col, Form, Input, message, Row } from 'antd';
-import Modal, { OKProps } from '@/components/Modalx';
-import React from 'react';
-import Query from '@/pages/Topic/query';
-import { FormProps } from 'antd/lib/form';
-
-export const OPTIONS = [
-  {
-    value: 'delete',
-    name: '删除',
-  },
-];
-export const OPTIONS_VALUES = OPTIONS.map(t => t.value);
-
-// interface
-export declare type TopicData = any[];
-export interface TopicResultData {
-  topicName: string;
-  infoCount: string;
-  totalCfgNumPart: string;
-  totalRunNumPartCount: string;
-  isSrvAcceptPublish: string | number;
-  isSrvAcceptSubscribe: string | number;
-  enableAuthControl: string | number;
-  [key: string]: any;
-}
-export interface TopicModalProps {
-  type: string;
-  title?: string;
-  updateFunction: (draft: any) => any;
-  params?: any;
-}
-interface ComProps {
-  modalParams: any;
-  data: any[];
-}
-// exports broker modal
-// render funcs
-const renderTopicOptions = (modalParams: any, dataSource: any[]) => {
-  const columns = [
-    {
-      title: 'Topic',
-      render: (t: string, r: TopicResultData) => {
-        return `${r.brokerId}#${r.brokerIp}:${r.brokerPort}`;
-      },
-    },
-    {
-      title: 'TopicIP',
-      dataIndex: 'brokerIp',
-    },
-    {
-      title: '管理状态',
-      dataIndex: 'manageStatus',
-    },
-    {
-      title: '运行状态',
-      dataIndex: 'runStatus',
-    },
-    {
-      title: '运行子状态',
-      dataIndex: 'subStatus',
-    },
-    {
-      title: '可发布',
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: '可订阅',
-      render: (t: string) => boolean2Chinese(t),
-    },
-  ];
-  return <Table columns={columns} dataSource={dataSource} rowKey="brokerId" />;
-};
-const renderNewTopic = (form: any) => {
-  const brokerFormArr = [
-    {
-      name: 'topicName',
-      defaultValue: '',
-    },
-    {
-      name: 'numPartitions',
-      defaultValue: '3',
-    },
-    {
-      name: 'deleteWhen',
-      defaultValue: '0 0 6,18 * * ?',
-    },
-    {
-      name: 'deletePolicy',
-      defaultValue: 'delete,168h',
-    },
-    {
-      name: 'unflushThreshold',
-      defaultValue: '1000',
-    },
-    {
-      name: 'unflushInterval',
-      defaultValue: '10000',
-    },
-    {
-      name: 'acceptPublish',
-      defaultValue: 'true',
-    },
-    {
-      name: 'acceptSubscribe',
-      defaultValue: 'true',
-    },
-  ];
-
-  return (
-    <Form form={form}>
-      <Row gutter={24}>
-        {brokerFormArr.map((t, index) => (
-          <Col span={12} key={'brokerFormArr' + index}>
-            <Form.Item
-              labelCol={{ span: 12 }}
-              label={t.name}
-              name={t.name}
-              initialValue={t.defaultValue}
-            >
-              <Input />
-            </Form.Item>
-          </Col>
-        ))}
-      </Row>
-    </Form>
-  );
-};
-const renderChooseBroker = (modalParams: any) => {
-  const { params } = modalParams;
-  const columns = [
-    {
-      title: 'Broker',
-      render: (t: string, r: TopicResultData) => {
-        return `${r.brokerId}#${r.brokerIp}:${r.brokerPort}`;
-      },
-    },
-    {
-      title: '实例数',
-      dataIndex: ['runInfo', 'numTopicStores'],
-    },
-    {
-      title: '当前运行状态',
-      dataIndex: ['runInfo', 'brokerManageStatus'],
-    },
-    {
-      title: '可发布',
-      dataIndex: ['runInfo', 'acceptPublish'],
-      render: (t: string) => boolean2Chinese(t),
-    },
-    {
-      title: '可订阅',
-      dataIndex: ['runInfo', 'acceptSubscribe'],
-      render: (t: string) => boolean2Chinese(t),
-    },
-  ];
-  const onChangeSelect = (p: any) => {
-    selectBroker = p;
-  };
-  return (
-    <Table
-      rowSelection={{ onChange: onChangeSelect }}
-      columns={columns}
-      dataSource={params.data}
-      rowKey="brokerId"
-    />
-  );
-};
-const renderEditTopic = (modalParams: any, form: FormProps['form']) => {
-  const { params: p } = modalParams;
-  const pickArr = [
-    'topicName',
-    'numPartitions',
-    'unflushThreshold',
-    'unflushInterval',
-    'deleteWhen',
-    'deletePolicy',
-    'acceptPublish',
-    'acceptSubscribe',
-  ];
-  const brokerFormArr: Array<{
-    name: string;
-    defaultValue: string;
-  }> = [];
-  pickArr.forEach(t => {
-    brokerFormArr.push({
-      name: t,
-      defaultValue: p[t],
-    });
-  });
-
-  return (
-    <Form form={form}>
-      <Row gutter={24}>
-        {brokerFormArr.map((t, index) => (
-          <Col span={12} key={'brokerFormArr' + index}>
-            <Form.Item
-              labelCol={{ span: 12 }}
-              label={t.name}
-              name={t.name}
-              initialValue={t.defaultValue}
-            >
-              <Input />
-            </Form.Item>
-          </Col>
-        ))}
-      </Row>
-    </Form>
-  );
-};
-const renderTopicStateChange = (modalParams: any) => {
-  const { params } = modalParams;
-
-  return (
-    <div>
-      请确认<span className="enhance">{params.option}</span> 以下broker列表的
-      topic :<span className="enhance">({params.topicName})</span> 的 Topic?
-      {renderChooseBroker(modalParams)}
-    </div>
-  );
-};
-const renderDeleteTopic = (modalParams: any) => {
-  const { params } = modalParams;
-
-  return (
-    <div>
-      请确认<span className="enhance">删除</span> 以下broker列表的 topic :
-      <span className="enhance">({params.topicName})</span> 吗?
-      {renderChooseBroker(modalParams)}
-    </div>
-  );
-};
-const renderDeleteConsumeGroup = (modalParams: any) => {
-  const { params } = modalParams;
-
-  return (
-    <div>
-      确认<span className="enhance">删除</span> 以下 :
-      <span className="enhance">({params.groupName})</span> 吗?
-    </div>
-  );
-};
-const renderAuthorizeControlChange = (modalParams: any) => {
-  const { params } = modalParams;
-
-  return (
-    <div>
-      请确认
-      <span className="enhance">
-        {params.value ? '启动' : '关闭'}topic
-        <span className="enhance">({params.topicName})</span>的消费组授权控制
-      </span>
-      吗?
-    </div>
-  );
-};
-export const onOpenModal = (p: TopicModalProps) => {
-  const { type, title, updateFunction, params } = p;
-  updateFunction((m: any) => {
-    m.type = type;
-    m.params = params;
-    Object.assign(m, {
-      params,
-      visible: type,
-      title,
-      onOk: (p: OKProps) => {
-        updateFunction((m: any) => {
-          if (type === 'newTopic' || type === 'editTopic') {
-            p.params = Object.assign(f && f.getFieldsValue(), {
-              callback: p.params.callback,
-            });
-          }
-
-          if (
-            type === 'chooseBroker' ||
-            type === 'topicStateChange' ||
-            type === 'deleteTopic'
-          ) {
-            if (!selectBroker.length) {
-              message.error('至少选择一列!');
-              return;
-            }
-
-            // end
-            if (type === 'chooseBroker') {
-              m.query =
-                p.params.subType === 'edit'
-                  ? 'endEditChooseBroker'
-                  : 'endChooseBroker';
-            }
-            p.params = Object.assign({}, p.params, {
-              selectBroker,
-            });
-          }
-
-          m.okParams = p;
-          m.isOk = Date.now();
-        });
-      },
-      onCancel: () =>
-        updateFunction((m: any) => {
-          m.visible = false;
-          m.isOk = null;
-        }),
-    });
-  });
-};
-
-let selectBroker: any[] = [];
-let f: FormProps['form'];
-const Comp = (props: ComProps) => {
-  const { modalParams, data } = props;
-  const [form] = Form.useForm();
-  f = form;
-
-  return (
-    <Modal {...modalParams}>
-      <div>
-        {modalParams.type &&
-          OPTIONS_VALUES.includes(modalParams.type) &&
-          renderTopicOptions(
-            modalParams,
-            data.filter((t: TopicResultData) =>
-              modalParams.params.includes(t.brokerId)
-            )
-          )}
-        {modalParams.type === 'newTopic' && renderNewTopic(form)}
-        {modalParams.type === 'chooseBroker' && renderChooseBroker(modalParams)}
-        {modalParams.type === 'editTopic' && renderEditTopic(modalParams, form)}
-        {modalParams.type === 'topicStateChange' &&
-          renderTopicStateChange(modalParams)}
-        {modalParams.type === 'deleteTopic' && renderDeleteTopic(modalParams)}
-        {modalParams.type === 'deleteConsumeGroup' &&
-          renderDeleteConsumeGroup(modalParams)}
-        {modalParams.type === 'authorizeControl' &&
-          renderAuthorizeControlChange(modalParams)}
-      </div>
-      <Query
-        fire={modalParams.isOk}
-        params={modalParams.okParams}
-        type={modalParams.visible && (modalParams.query || modalParams.type)}
-      />
-    </Modal>
-  );
-};
-
-export default Comp;
diff --git a/tubemq-web/src/pages/Topic/detail.tsx b/tubemq-web/src/pages/Topic/detail.tsx
deleted file mode 100644
index 0c9965c..0000000
--- a/tubemq-web/src/pages/Topic/detail.tsx
+++ /dev/null
@@ -1,510 +0,0 @@
-import React, { ReactNode, useContext, useState } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import TitleWrap from '@/components/TitleWrap';
-import { Form, Button, Spin, Col, Row, Switch } from 'antd';
-import { useImmer } from 'use-immer';
-import './index.less';
-import { useRequest } from '@/hooks';
-import { useParams } from 'react-router-dom';
-import { boolean2Chinese, transParamsWithConstantsMap } from '@/utils';
-import tableFilterHelper from '@/components/Tablex/tableFilterHelper';
-import CommonModal, { onOpenModal, TopicResultData } from './commonModal';
-import BrokerModal, {
-  onOpenModal as onOpenBrokerModal,
-} from '@/pages/Broker/commonModal';
-import { BROKER_INFO_ZH_MAP } from '@/constants/broker';
-import { PERSON_INFO_ZH_MAP } from '@/constants/person';
-import { TOPIC_INFO_ZH_MAP } from '@/constants/topic';
-
-declare type TopicQueryData = {
-  topicName: string;
-};
-
-const Detail: React.FC = () => {
-  const { name } = useParams();
-  const { breadMap } = useContext(GlobalContext);
-  const [form] = Form.useForm();
-  const [modalParams, updateModelParams] = useImmer<any>({});
-  const [brokerModalParams, updateBrokerModalParams] = useImmer<any>({});
-  const [isSrvAcceptPublish, setIsSrvAcceptPublish] = useState<any>(false);
-  const [isSrvAcceptSubscribe, setIsSrvAcceptSubscribe] = useState<any>(false);
-  const [enableAuthControl, setEnableAuthControl] = useState<any>(false);
-  const [filterData, updateFilterData] = useImmer<any>({});
-  const queryTopicInfo = useRequest<any>(
-    (
-      data: TopicQueryData = {
-        topicName: name,
-      }
-    ) => ({
-      url: '/api/op_query/admin_query_topic_authorize_control',
-      data: {
-        ...data,
-      },
-    })
-  );
-  const queryTopicConf = useRequest<any>(
-    (
-      data: TopicQueryData = {
-        topicName: name,
-      }
-    ) => ({
-      url: '/api/op_query/admin_query_topic_info',
-      data: {
-        ...data,
-      },
-    }),
-    {
-      onSuccess: data => {
-        setIsSrvAcceptPublish(data[0]['isSrvAcceptPublish']);
-        setIsSrvAcceptSubscribe(data[0]['isSrvAcceptSubscribe']);
-        setEnableAuthControl(data[0]['authData']['enableAuthControl']);
-      },
-    }
-  );
-
-  // render
-  const searchStyle = {
-    position: 'absolute',
-    top: '-40px',
-    right: '10px',
-    zIndex: 1,
-    width: '300px',
-  };
-  const renderBrokerList = (): ReactNode => {
-    const columns = [
-      {
-        title: 'Broker',
-        render: (t: string, r: TopicResultData) => {
-          return `${r.brokerId}#${r.brokerIp}:${r.brokerPort}`;
-        },
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'runInfo.acceptPublish'
-        ),
-        dataIndex: ['runInfo', 'acceptPublish'],
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'runInfo.acceptSubscribe'
-        ),
-        dataIndex: ['runInfo', 'acceptSubscribe'],
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'runInfo.numPartitions'
-        ),
-        dataIndex: ['runInfo', 'numPartitions'],
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'runInfo.brokerManageStatus'
-        ),
-        dataIndex: ['runInfo', 'brokerManageStatus'],
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'acceptPublish'),
-        dataIndex: 'acceptPublish',
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'acceptSubscribe'
-        ),
-        dataIndex: 'acceptSubscribe',
-        render: (t: string) => boolean2Chinese(t),
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'numPartitions'),
-        dataIndex: 'numPartitions',
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'unflushThreshold'
-        ),
-        dataIndex: 'unflushThreshold',
-      },
-      {
-        title: transParamsWithConstantsMap(
-          BROKER_INFO_ZH_MAP,
-          'unflushInterval'
-        ),
-        dataIndex: 'unflushInterval',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'deleteWhen'),
-        dataIndex: 'deleteWhen',
-      },
-      {
-        title: transParamsWithConstantsMap(BROKER_INFO_ZH_MAP, 'deletePolicy'),
-        dataIndex: 'deletePolicy',
-      },
-      {
-        title: '操作',
-        render: (t: string, r: TopicResultData) => {
-          return (
-            <span>
-              <a onClick={() => onEdit(r)}>编辑</a>
-              <a onClick={() => onReload(r)}>重载</a>
-              <a onClick={() => onDeleteBroker(r)}>删除</a>
-            </span>
-          );
-        },
-      },
-    ];
-    const { data } = queryTopicConf;
-    if (!data || !data[0]) return null;
-    const { topicInfo } = data[0];
-
-    return (
-      <Table
-        columns={columns}
-        dataSource={topicInfo}
-        rowKey={r => `${r.brokerId}#${r.brokerIp}:${r.brokerPort}`}
-        dataSourceX={filterData.topicInfoList}
-        searchPlaceholder="请输入brokerId,Ip,Port搜索"
-        searchStyle={searchStyle}
-        filterFnX={value =>
-          tableFilterHelper({
-            key: value,
-            srcArray: topicInfo,
-            targetArray: filterData.topicInfoList,
-            updateFunction: res =>
-              updateFilterData(filterData => {
-                filterData.topicInfoList = res;
-              }),
-            filterList: ['brokerId', 'brokerIp', 'brokerPort'],
-          })
-        }
-      />
-    );
-  };
-  const renderConsumeGroupList = (): ReactNode => {
-    const columns = [
-      {
-        title: '消费组',
-        dataIndex: 'groupName',
-      },
-      {
-        title: transParamsWithConstantsMap(PERSON_INFO_ZH_MAP, 'createUser'),
-        dataIndex: 'createUser',
-      },
-      {
-        title: transParamsWithConstantsMap(PERSON_INFO_ZH_MAP, 'createDate'),
-        dataIndex: 'createDate',
-      },
-      {
-        title: '操作',
-        render: (t: string, r: TopicResultData) => {
-          return (
-            <span>
-              <a onClick={() => onDeleteConsumeGroup(r)}>删除</a>
-            </span>
-          );
-        },
-      },
-    ];
-    const { data } = queryTopicInfo;
-    if (!data || !data[0]) return null;
-    const { authConsumeGroup } = data[0];
-
-    return (
-      <Table
-        columns={columns}
-        dataSource={authConsumeGroup}
-        rowKey={r => `${r.brokerId}#${r.brokerIp}:${r.brokerPort}`}
-        dataSourceX={filterData.list}
-        searchPlaceholder="请输入消费组名称搜索"
-        searchStyle={searchStyle}
-        filterFnX={value =>
-          tableFilterHelper({
-            key: value,
-            srcArray: authConsumeGroup,
-            targetArray: filterData.list,
-            updateFunction: res =>
-              updateFilterData(filterData => {
-                filterData.list = res;
-              }),
-            filterList: ['groupName'],
-          })
-        }
-      />
-    );
-  };
-
-  // event
-  // isSrvAcceptPublish && isSrvAcceptSubscribe event
-  const queryBrokerListByTopicNameQuery = useRequest<any, any>(
-    data => ({ url: '/api/op_query/admin_query_topic_info', ...data }),
-    { manual: true }
-  );
-  const onSwitchChange = (e: boolean, type: string) => {
-    let option = '';
-    const topicName = queryTopicConf.data[0].topicInfo[0].topicName;
-    if (type === 'isSrvAcceptPublish') {
-      option = e ? '发布' : '禁止可发布';
-    } else if (type === 'isSrvAcceptSubscribe') {
-      option = e ? '订阅' : '禁止可订阅';
-    }
-
-    queryBrokerListByTopicNameQuery
-      .run({
-        data: {
-          topicName,
-          brokerId: '',
-        },
-      })
-      .then((d: TopicResultData) => {
-        onOpenModal({
-          type: 'topicStateChange',
-          title: `请确认操作`,
-          updateFunction: updateModelParams,
-          params: {
-            option,
-            value: e,
-            topicName,
-            data: d[0].topicInfo,
-            type,
-            callback: () => {
-              if (type === 'isSrvAcceptPublish') {
-                setIsSrvAcceptPublish(e);
-              } else if (type === 'isSrvAcceptSubscribe') {
-                setIsSrvAcceptSubscribe(e);
-              }
-            },
-          },
-        });
-      });
-  };
-  // author
-  const onAuthorizeControl = (e: boolean) => {
-    const option = e ? '发布' : '禁止可发布';
-    const topicName = queryTopicConf.data[0].topicInfo[0].topicName;
-    onOpenModal({
-      type: 'authorizeControl',
-      title: `请确认操作`,
-      updateFunction: updateModelParams,
-      params: {
-        option,
-        value: e,
-        topicName,
-        callback: () => {
-          setEnableAuthControl(e);
-        },
-      },
-    });
-  };
-  // edit topic
-  const onEdit = (r?: TopicResultData) => {
-    const p = r || queryTopicConf.data[0].topicInfo[0];
-    onOpenModal({
-      type: 'editTopic',
-      title: '编辑Topic',
-      updateFunction: updateModelParams,
-      params: {
-        ...p,
-        callback: (d: any) => {
-          onOpenModal({
-            type: 'chooseBroker',
-            title: '选择【修改】broker列表',
-            updateFunction: updateModelParams,
-            params: {
-              data: d,
-              subType: 'edit',
-              callback: () => {
-                onOpenModal({
-                  type: 'close',
-                  updateFunction: updateModelParams,
-                });
-              },
-            },
-          });
-        },
-      },
-    });
-  };
-  // reload topic
-  const queryBrokerInfo = useRequest<any, any>(
-    data => ({ url: '/api/op_query/admin_query_broker_run_status', ...data }),
-    { manual: true }
-  );
-  const onReload = (r: TopicResultData) => {
-    queryBrokerInfo
-      .run({
-        data: {
-          brokerId: r.brokerId,
-        },
-      })
-      .then(data => {
-        onOpenBrokerModal({
-          type: 'reload',
-          title: `确认进行【重载】操作?`,
-          updateFunction: updateBrokerModalParams,
-          params: [data[0].brokerId],
-        });
-      });
-  };
-  // on delete broker
-  const onDeleteBroker = (r: TopicResultData) => {
-    queryBrokerListByTopicNameQuery
-      .run({
-        data: {
-          topicName: r.topicName,
-          brokerId: r.brokerId,
-        },
-      })
-      .then((d: TopicResultData) => {
-        onOpenModal({
-          type: 'deleteTopic',
-          title: `请确认操作`,
-          updateFunction: updateModelParams,
-          params: {
-            topicName: r.topicName,
-            data: d[0].topicInfo,
-          },
-        });
-      });
-  };
-  const onDeleteConsumeGroup = (r: TopicResultData) => {
-    onOpenModal({
-      type: 'deleteConsumeGroup',
-      title: `请确认消费组`,
-      updateFunction: updateModelParams,
-      params: {
-        topicName: r.topicName,
-        groupName: r.groupName,
-      },
-    });
-  };
-
-  return (
-    <Spin spinning={queryTopicConf.loading && queryTopicInfo.loading}>
-      <Breadcrumb
-        breadcrumbMap={breadMap}
-        appendParams={`Topic(${name})详情`}
-      />
-      <div className="main-container">
-        <TitleWrap
-          title="基本信息"
-          wrapperStyle={{ position: 'relative' }}
-          hasSplit={false}
-        >
-          <div className="topic-detail-options-wrapper">
-            <Switch
-              className="mr10"
-              checked={isSrvAcceptPublish}
-              checkedChildren="订阅"
-              unCheckedChildren="订阅"
-              onChange={e => onSwitchChange(e, 'isSrvAcceptPublish')}
-            />
-            <Switch
-              className="mr10"
-              checked={isSrvAcceptSubscribe}
-              checkedChildren="发布"
-              unCheckedChildren="发布"
-              onChange={e => onSwitchChange(e, 'isSrvAcceptSubscribe')}
-            />
-            <Switch
-              className="mr10"
-              checked={enableAuthControl}
-              checkedChildren="权限可控"
-              unCheckedChildren="权限可控"
-              onChange={e => onAuthorizeControl(e)}
-            />
-          </div>
-          <Form form={form}>
-            <Row gutter={24}>
-              {queryTopicConf.data &&
-                Object.keys(queryTopicConf.data[0]).map(
-                  (t: string, index: number) => {
-                    const label = transParamsWithConstantsMap(
-                      TOPIC_INFO_ZH_MAP,
-                      t
-                    );
-                    const ignoreList = [
-                      'isSrvAcceptPublish',
-                      'isSrvAcceptSubscribe',
-                    ];
-                    if (
-                      queryTopicConf.data[0][t] instanceof Object ||
-                      !label ||
-                      ignoreList.includes(t)
-                    )
-                      return null;
-                    return (
-                      <Col span={12} key={'queryTopicConf' + index}>
-                        <Form.Item labelCol={{ span: 12 }} label={label}>
-                          {queryTopicConf.data[0][t] + ''}
-                        </Form.Item>
-                      </Col>
-                    );
-                  }
-                )}
-            </Row>
-          </Form>
-        </TitleWrap>
-        <TitleWrap title="缺省配置" wrapperStyle={{ position: 'relative' }}>
-          <div className="topic-detail-options-wrapper">
-            <Button
-              className="mr10"
-              type="primary"
-              size="small"
-              onClick={() => onEdit()}
-            >
-              编辑
-            </Button>
-          </div>
-          <Form form={form}>
-            <Row gutter={24}>
-              {[
-                'acceptPublish',
-                'acceptSubscribe',
-                'unflushThreshold',
-                'unflushInterval',
-                'deleteWhen',
-                'deletePolicy',
-                'numPartitions',
-              ].map((t: string, index: number) => {
-                if (
-                  !queryTopicConf.data ||
-                  !queryTopicConf.data[0].topicInfo[0]
-                )
-                  return null;
-                const value = queryTopicConf.data[0].topicInfo[0][t];
-                return (
-                  <Col span={12} key={'queryTopicConf' + index}>
-                    <Form.Item labelCol={{ span: 12 }} label={t}>
-                      {value + ''}
-                    </Form.Item>
-                  </Col>
-                );
-              })}
-            </Row>
-          </Form>
-        </TitleWrap>
-        <TitleWrap title="部署Broker列表">{renderBrokerList()}</TitleWrap>
-        <TitleWrap title="消费组列表">{renderConsumeGroupList()}</TitleWrap>
-      </div>
-      <CommonModal
-        modalParams={modalParams}
-        data={[queryTopicConf.data && queryTopicConf.data[0]]}
-      />
-      <BrokerModal
-        modalParams={brokerModalParams}
-        data={[queryBrokerInfo.data && queryBrokerInfo.data[0]]}
-      />
-    </Spin>
-  );
-};
-
-export default Detail;
diff --git a/tubemq-web/src/pages/Topic/index.less b/tubemq-web/src/pages/Topic/index.less
deleted file mode 100644
index 5efa767..0000000
--- a/tubemq-web/src/pages/Topic/index.less
+++ /dev/null
@@ -1,9 +0,0 @@
-.topic-detail-options-wrapper {
-  position: absolute;
-  top: 15px;
-  right: 0;
-
-  .mr10 {
-    margin-right: 10px;
-  }
-}
\ No newline at end of file
diff --git a/tubemq-web/src/pages/Topic/index.tsx b/tubemq-web/src/pages/Topic/index.tsx
deleted file mode 100644
index cd112f9..0000000
--- a/tubemq-web/src/pages/Topic/index.tsx
+++ /dev/null
@@ -1,279 +0,0 @@
-import React, { useContext } from 'react';
-import GlobalContext from '@/context/globalContext';
-import Breadcrumb from '@/components/Breadcrumb';
-import Table from '@/components/Tablex';
-import { Form, Button, Spin, Switch } from 'antd';
-import { useImmer } from 'use-immer';
-import { useRequest } from '@/hooks';
-import tableFilterHelper from '@/components/Tablex/tableFilterHelper';
-import { transParamsWithConstantsMap } from '@/utils';
-import { TOPIC_INFO_ZH_MAP } from '@/constants/topic';
-import './index.less';
-import { Link } from 'react-router-dom';
-import CommonModal, {
-  onOpenModal,
-  TopicResultData,
-  TopicData,
-} from './commonModal';
-
-const Topic: React.FC = () => {
-  // column config
-  const columns = [
-    {
-      title: transParamsWithConstantsMap(TOPIC_INFO_ZH_MAP, 'topicName'),
-      dataIndex: 'topicName',
-      render: (t: Array<any>) => <Link to={'/topic/' + t}>{t}</Link>,
-    },
-    {
-      title: transParamsWithConstantsMap(TOPIC_INFO_ZH_MAP, 'infoCount'),
-      dataIndex: 'infoCount',
-    },
-    {
-      title: transParamsWithConstantsMap(TOPIC_INFO_ZH_MAP, 'totalCfgNumPart'),
-      dataIndex: 'totalCfgNumPart',
-    },
-    {
-      title: transParamsWithConstantsMap(
-        TOPIC_INFO_ZH_MAP,
-        'totalRunNumPartCount'
-      ),
-      dataIndex: 'totalRunNumPartCount',
-    },
-    {
-      title: transParamsWithConstantsMap(
-        TOPIC_INFO_ZH_MAP,
-        'isSrvAcceptPublish'
-      ),
-      dataIndex: 'isSrvAcceptPublish',
-      render: (t: boolean, r: TopicResultData) => {
-        return (
-          <Switch
-            checked={t}
-            onChange={e => onSwitchChange(e, r, 'isSrvAcceptPublish')}
-          />
-        );
-      },
-    },
-    {
-      title: transParamsWithConstantsMap(
-        TOPIC_INFO_ZH_MAP,
-        'isSrvAcceptSubscribe'
-      ),
-      dataIndex: 'isSrvAcceptSubscribe',
-      render: (t: boolean, r: TopicResultData) => {
-        return (
-          <Switch
-            checked={t}
-            onChange={e => onSwitchChange(e, r, 'isSrvAcceptSubscribe')}
-          />
-        );
-      },
-    },
-    {
-      title: transParamsWithConstantsMap(
-        TOPIC_INFO_ZH_MAP,
-        'enableAuthControl'
-      ),
-      dataIndex: 'authData.enableAuthControl',
-      render: (t: boolean, r: TopicResultData) => {
-        return (
-          <Switch
-            checked={r.authData.enableAuthControl}
-            onChange={e => onAuthorizeControl(e, r)}
-          />
-        );
-      },
-    },
-    {
-      title: '操作',
-      dataIndex: 'topicIp',
-      render: (t: string, r: any) => {
-        return <a onClick={() => onDelete(r)}>删除</a>;
-      },
-    },
-  ];
-  const { breadMap } = useContext(GlobalContext);
-  const [modalParams, updateModelParams] = useImmer<any>({});
-  const [filterData, updateFilterData] = useImmer<any>({});
-  const [topicList, updateTopicList] = useImmer<TopicData>([]);
-  const [form] = Form.useForm();
-  // init query
-  const { data, loading, run } = useRequest<any, TopicData>(
-    (data: TopicResultData) => ({
-      url: '/api/op_query/admin_query_topic_info',
-      data: data,
-    }),
-    {
-      cacheKey: 'topicList',
-      onSuccess: data => {
-        updateTopicList(d => {
-          Object.assign(d, data);
-        });
-      },
-    }
-  );
-
-  // table event
-  // acceptSubscribe && acceptPublish options
-  const queryBrokerListByTopicNameQuery = useRequest<any, any>(
-    data => ({ url: '/api/op_query/admin_query_topic_info', ...data }),
-    { manual: true }
-  );
-  const onSwitchChange = (e: boolean, r: TopicResultData, type: string) => {
-    let option = '';
-    if (type === 'isSrvAcceptPublish') {
-      option = e ? '发布' : '禁止可发布';
-    } else if (type === 'isSrvAcceptSubscribe') {
-      option = e ? '订阅' : '禁止可订阅';
-    }
-
-    queryBrokerListByTopicNameQuery
-      .run({
-        data: {
-          topicName: r.topicName,
-          brokerId: '',
-        },
-      })
-      .then((d: TopicResultData) => {
-        onOpenModal({
-          type: 'topicStateChange',
-          title: `请确认操作`,
-          updateFunction: updateModelParams,
-          params: {
-            option,
-            value: e,
-            topicName: r.topicName,
-            data: d[0].topicInfo,
-            type,
-            callback: () => {
-              const index = data.findIndex(
-                (t: TopicResultData) => t.topicName === r.topicName
-              );
-              updateTopicList(d => {
-                d[index][type] = e + '';
-              });
-            },
-          },
-        });
-      });
-  };
-  // author
-  const onAuthorizeControl = (e: boolean, r: TopicResultData) => {
-    const option = e ? '发布' : '禁止可发布';
-    onOpenModal({
-      type: 'authorizeControl',
-      title: `请确认操作`,
-      updateFunction: updateModelParams,
-      params: {
-        option,
-        value: e,
-        topicName: r.topicName,
-        callback: () => {
-          const index = data.findIndex(
-            (t: TopicResultData) => t.topicName === r.topicName
-          );
-          updateTopicList(d => {
-            d[index]['authData']['enableAuthControl'] = e + '';
-          });
-        },
-      },
-    });
-  };
-  // new topic
-  const onNewTopic = () => {
-    onOpenModal({
-      type: 'newTopic',
-      title: '新建Topic',
-      updateFunction: updateModelParams,
-      params: {
-        callback: (d: any) => {
-          onOpenModal({
-            type: 'chooseBroker',
-            title: '选择【新增】broker列表',
-            updateFunction: updateModelParams,
-            params: {
-              data: d,
-              callback: () => {
-                onOpenModal({
-                  type: 'close',
-                  updateFunction: updateModelParams,
-                });
-              },
-            },
-          });
-        },
-      },
-    });
-  };
-  // delete
-  const onDelete = (r: TopicResultData) => {
-    queryBrokerListByTopicNameQuery
-      .run({
-        data: {
-          topicName: r.topicName,
-          brokerId: '',
-        },
-      })
-      .then((d: TopicResultData) => {
-        onOpenModal({
-          type: 'deleteTopic',
-          title: `请确认操作`,
-          updateFunction: updateModelParams,
-          params: {
-            topicName: r.topicName,
-            data: d[0].topicInfo,
-          },
-        });
-      });
-  };
-
-  return (
-    <Spin spinning={loading}>
-      <Breadcrumb breadcrumbMap={breadMap} />
-      <div className="main-container">
-        <div
-          className="search-wrapper"
-          style={{ float: 'right', marginRight: '-16px' }}
-        >
-          <Form form={form} layout={'inline'}>
-            <Form.Item>
-              <Button
-                type="primary"
-                onClick={() => onNewTopic()}
-                style={{ margin: '0 10px 0 10px' }}
-              >
-                新增
-              </Button>
-              <Button type="primary" onClick={() => run()}>
-                刷新
-              </Button>
-            </Form.Item>
-          </Form>
-        </div>
-        <Table
-          columns={columns}
-          dataSource={topicList}
-          rowKey="topicName"
-          searchPlaceholder="请输入topicName查询"
-          searchWidth={12}
-          dataSourceX={filterData.list}
-          filterFnX={value =>
-            tableFilterHelper({
-              key: value,
-              srcArray: data,
-              targetArray: filterData.list,
-              updateFunction: res =>
-                updateFilterData(filterData => {
-                  filterData.list = res;
-                }),
-              filterList: ['topicName'],
-            })
-          }
-        />
-      </div>
-      <CommonModal modalParams={modalParams} data={data} />
-    </Spin>
-  );
-};
-
-export default Topic;
diff --git a/tubemq-web/src/pages/Topic/query.tsx b/tubemq-web/src/pages/Topic/query.tsx
deleted file mode 100644
index bf17545..0000000
--- a/tubemq-web/src/pages/Topic/query.tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-import * as React from 'react';
-import './index.less';
-import { OKProps } from '@/components/Modalx';
-import { useRequest } from '@/hooks';
-import { useContext, useEffect } from 'react';
-import GlobalContext from '@/context/globalContext';
-
-interface ComProps {
-  fire: string;
-  params: any;
-  type: string;
-}
-
-let newObjectTemp = '';
-let editObjectTemp = '';
-const Comp = (props: ComProps) => {
-  const { fire } = props;
-  const { userInfo } = useContext(GlobalContext);
-  // eslint-disable-next-line
-  useEffect(() => {
-    const { params, type } = props;
-    dispatchAction(type, params);
-  }, [fire]);
-
-  const dispatchAction = (type: string, p: OKProps) => {
-    if (!fire) return null;
-    let promise;
-    switch (type) {
-      case 'newTopic':
-        promise = newTopic(p);
-        break;
-      case 'endChooseBroker':
-        promise = endChooseBroker(p);
-        break;
-      case 'editTopic':
-        promise = editTopic(p);
-        break;
-      case 'endEditChooseBroker':
-        promise = endEditChooseBroker(p);
-        break;
-      case 'topicStateChange':
-        promise = topicStateChange(type, p);
-        break;
-      case 'authorizeControl':
-        promise = authorizeControl(type, p);
-        break;
-      case 'deleteTopic':
-        promise = deleteTopic(type, p);
-        break;
-      case 'deleteConsumeGroup':
-        promise = deleteConsumeGroup(type, p);
-        break;
-    }
-
-    promise &&
-      promise.then(t => {
-        const { callback } = p.params;
-        if (t.statusCode !== 0 && callback) callback(t);
-      });
-  };
-  const commonQuery = useRequest<any, any>((url, data) => ({ url, ...data }), {
-    manual: true,
-  });
-  const newTopicQuery = useRequest<any, any>(
-    data => ({
-      url: '/api/op_query/admin_query_broker_topic_config_info',
-      ...data,
-    }),
-    { manual: true }
-  );
-  const newTopic = (p: OKProps) => {
-    newObjectTemp = JSON.stringify(p.params);
-    return newTopicQuery.run({
-      data: {
-        topicName: '',
-        brokerId: '',
-      },
-    });
-  };
-
-  const endChooseBrokerQuery = useRequest<any, any>(
-    data => ({ url: '/api/op_modify/admin_add_new_topic_record', ...data }),
-    { manual: true }
-  );
-  const endChooseBroker = (p: OKProps) => {
-    const topicParams = JSON.parse(newObjectTemp);
-    const { params } = p;
-    return endChooseBrokerQuery.run({
-      data: {
-        borkerId: params.selectBroker.join(','),
-        confModAuthToken: p.psw,
-        ...topicParams,
-      },
-    });
-  };
-
-  const editTopic = (p: OKProps) => {
-    const { params } = p;
-    editObjectTemp = JSON.stringify(p.params);
-    return newTopicQuery.run({
-      data: {
-        topicName: params.topicName,
-        brokerId: '',
-      },
-    });
-  };
-  const endEditChooseBroker = (p: OKProps) => {
-    const topicParams = JSON.parse(editObjectTemp);
-    const { params } = p;
-    return commonQuery.run(`/api/op_modify/admin_modify_topic_info`, {
-      data: {
-        borkerId: params.selectBroker.join(','),
-        confModAuthToken: p.psw,
-        ...topicParams,
-      },
-    });
-  };
-
-  const deleteTopic = (type: string, p: OKProps) => {
-    const { params } = p;
-    return commonQuery.run(`/api/op_modify/admin_delete_topic_info`, {
-      data: {
-        brokerId: params.selectBroker.join(','),
-        confModAuthToken: p.psw,
-        modifyUser: userInfo.userName,
-        topicName: params.topicName,
-      },
-    });
-  };
-  const deleteConsumeGroup = (type: string, p: OKProps) => {
-    const { params } = p;
-    return commonQuery.run(
-      `/api/op_modify/admin_delete_allowed_consumer_group_info`,
-      {
-        data: {
-          groupName: params.groupName,
-          confModAuthToken: p.psw,
-          topicName: params.topicName,
-        },
-      }
-    );
-  };
-  const topicStateChange = (type: string, p: OKProps) => {
-    const { params } = p;
-    const data: any = {
-      brokerId: params.selectBroker.join([',']),
-      confModAuthToken: p.psw,
-      modifyUser: userInfo.userName,
-      topicName: params.topicName,
-    };
-    if (params.type === 'isSrvAcceptPublish') {
-      data.acceptPublish = params.value;
-    }
-    if (params.type === 'isSrvAcceptSubscribe') {
-      data.acceptSubscribe = params.value;
-    }
-
-    return commonQuery.run(`/api/op_modify/admin_modify_topic_info`, {
-      data,
-    });
-  };
-
-  const authorizeControl = (type: string, p: OKProps) => {
-    const { params } = p;
-    const data: any = {
-      confModAuthToken: p.psw,
-      topicName: params.topicName,
-      isEnable: params.value,
-      modifyUser: userInfo.userName,
-    };
-
-    return commonQuery.run(`/api/op_modify/admin_set_topic_authorize_control`, {
-      data,
-    });
-  };
-
-  return <></>;
-};
-
-export default Comp;
diff --git a/tubemq-web/src/react-app-env.d.ts b/tubemq-web/src/react-app-env.d.ts
deleted file mode 100644
index 6431bc5..0000000
--- a/tubemq-web/src/react-app-env.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-/// <reference types="react-scripts" />
diff --git a/tubemq-web/src/router.tsx b/tubemq-web/src/router.tsx
deleted file mode 100644
index 46df97d..0000000
--- a/tubemq-web/src/router.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import React, { Suspense, lazy, useState } from 'react';
-import {
-  BrowserRouter as Router,
-  Switch,
-  Route,
-  Redirect,
-} from 'react-router-dom';
-import { PageLoading } from '@ant-design/pro-layout';
-import { hot } from 'react-hot-loader/root';
-import { Layout } from '@/components';
-import routes from '@/routes';
-import GlobalContext from '@/context/globalContext';
-
-const App = () => {
-  const [cluster, setCluster] = useState();
-  const [breadMap, setBreadMap] = useState();
-  // eslint-disable-next-line
-  const [userInfo, setUserInfo] = useState({
-    userName: 'webapi',
-  });
-
-  return (
-    <GlobalContext.Provider
-      value={{ cluster, setCluster, breadMap, setBreadMap, userInfo }}
-    >
-      <Router>
-        <Layout>
-          <Suspense fallback={<PageLoading />}>
-            <Switch>
-              {routes.map((route, index: number) => (
-                <Route
-                  key={index}
-                  path={route.path}
-                  exact={route.exact}
-                  strict={route.strict}
-                  render={props => {
-                    const LazyComponent = lazy(route.component);
-                    return <LazyComponent {...props} />;
-                  }}
-                />
-              ))}
-            </Switch>
-            <Route
-              exact
-              path="/"
-              render={() => <Redirect to="/issue" push />}
-            />
-          </Suspense>
-        </Layout>
-      </Router>
-    </GlobalContext.Provider>
-  );
-};
-
-export default process.env.NODE_ENV === 'development' ? hot(App) : App;
diff --git a/tubemq-web/src/routes/index.tsx b/tubemq-web/src/routes/index.tsx
deleted file mode 100644
index ee36fa2..0000000
--- a/tubemq-web/src/routes/index.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { RouteProps } from '@/typings';
-
-const routes: RouteProps[] = [
-  {
-    path: '/issue/:id',
-    component: () => import('@/pages/Issue/consumeGroupDetail'),
-  },
-  {
-    path: '/issue',
-    component: () => import('@/pages/Issue'),
-  },
-  {
-    path: '/broker/:id',
-    component: () => import('@/pages/Broker/detail'),
-  },
-  {
-    path: '/broker',
-    component: () => import('@/pages/Broker'),
-  },
-  {
-    path: '/topic/:name',
-    component: () => import('@/pages/Topic/detail'),
-  },
-  {
-    path: '/topic',
-    component: () => import('@/pages/Topic'),
-  },
-  {
-    path: '/cluster',
-    component: () => import('@/pages/Cluster'),
-  },
-  {
-    component: () => import('@/pages/NotFound'),
-  },
-];
-
-export default routes;
diff --git a/tubemq-web/src/serviceWorker.ts b/tubemq-web/src/serviceWorker.ts
deleted file mode 100644
index 109ab0e..0000000
--- a/tubemq-web/src/serviceWorker.ts
+++ /dev/null
@@ -1,146 +0,0 @@
-// This optional code is used to register a service worker.
-// register() is not called by default.
-
-// This lets the app load faster on subsequent visits in production, and gives
-// it offline capabilities. However, it also means that developers (and users)
-// will only see deployed updates on subsequent visits to a page, after all the
-// existing tabs open on the page have been closed, since previously cached
-// resources are updated in the background.
-
-// To learn more about the benefits of this model and instructions on how to
-// opt-in, read https://bit.ly/CRA-PWA
-
-const isLocalhost = Boolean(
-  window.location.hostname === 'localhost' ||
-    // [::1] is the IPv6 localhost address.
-    window.location.hostname === '[::1]' ||
-    // 127.0.0.0/8 are considered localhost for IPv4.
-    window.location.hostname.match(
-      /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
-    )
-);
-
-type Config = {
-  onSuccess?: (registration: ServiceWorkerRegistration) => void;
-  onUpdate?: (registration: ServiceWorkerRegistration) => void;
-};
-
-export function register(config?: Config) {
-  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
-    // The URL constructor is available in all browsers that support SW.
-    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
-    if (publicUrl.origin !== window.location.origin) {
-      // Our service worker won't work if PUBLIC_URL is on a different origin
-      // from what our page is served on. This might happen if a CDN is used to
-      // serve assets; see https://github.com/facebook/create-react-app/issues/2374
-      return;
-    }
-
-    window.addEventListener('load', () => {
-      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
-
-      if (isLocalhost) {
-        // This is running on localhost. Let's check if a service worker still exists or not.
-        checkValidServiceWorker(swUrl, config);
-
-        // Add some additional logging to localhost, pointing developers to the
-        // service worker/PWA documentation.
-        navigator.serviceWorker.ready.then(() => {
-          console.log(
-            'This web app is being served cache-first by a service ' +
-              'worker. To learn more, visit https://bit.ly/CRA-PWA'
-          );
-        });
-      } else {
-        // Is not localhost. Just register service worker
-        registerValidSW(swUrl, config);
-      }
-    });
-  }
-}
-
-function registerValidSW(swUrl: string, config?: Config) {
-  navigator.serviceWorker
-    .register(swUrl)
-    .then(registration => {
-      registration.onupdatefound = () => {
-        const installingWorker = registration.installing;
-        if (installingWorker == null) {
-          return;
-        }
-        installingWorker.onstatechange = () => {
-          if (installingWorker.state === 'installed') {
-            if (navigator.serviceWorker.controller) {
-              // At this point, the updated precached content has been fetched,
-              // but the previous service worker will still serve the older
-              // content until all client tabs are closed.
-              console.log(
-                'New content is available and will be used when all ' +
-                  'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
-              );
-
-              // Execute callback
-              if (config && config.onUpdate) {
-                config.onUpdate(registration);
-              }
-            } else {
-              // At this point, everything has been precached.
-              // It's the perfect time to display a
-              // "Content is cached for offline use." message.
-              console.log('Content is cached for offline use.');
-
-              // Execute callback
-              if (config && config.onSuccess) {
-                config.onSuccess(registration);
-              }
-            }
-          }
-        };
-      };
-    })
-    .catch(error => {
-      console.error('Error during service worker registration:', error);
-    });
-}
-
-function checkValidServiceWorker(swUrl: string, config?: Config) {
-  // Check if the service worker can be found. If it can't reload the page.
-  fetch(swUrl, {
-    headers: { 'Service-Worker': 'script' },
-  })
-    .then(response => {
-      // Ensure service worker exists, and that we really are getting a JS file.
-      const contentType = response.headers.get('content-type');
-      if (
-        response.status === 404 ||
-        (contentType != null && contentType.indexOf('javascript') === -1)
-      ) {
-        // No service worker found. Probably a different app. Reload the page.
-        navigator.serviceWorker.ready.then(registration => {
-          registration.unregister().then(() => {
-            window.location.reload();
-          });
-        });
-      } else {
-        // Service worker found. Proceed as normal.
-        registerValidSW(swUrl, config);
-      }
-    })
-    .catch(() => {
-      console.log(
-        'No internet connection found. App is running in offline mode.'
-      );
-    });
-}
-
-export function unregister() {
-  if ('serviceWorker' in navigator) {
-    navigator.serviceWorker.ready
-      .then(registration => {
-        registration.unregister();
-      })
-      .catch(error => {
-        console.error(error.message);
-      });
-  }
-}
diff --git a/tubemq-web/src/setupProxy.js b/tubemq-web/src/setupProxy.js
deleted file mode 100644
index 1340128..0000000
--- a/tubemq-web/src/setupProxy.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// eslint-disable-next-line @typescript-eslint/no-var-requires
-const { createProxyMiddleware } = require('http-proxy-middleware');
-
-module.exports = function(app) {
-  app.use(
-    createProxyMiddleware('/webapi.htm', {
-      target: 'http://127.0.0.1:8080', // should set api address
-      changeOrigin: true,
-      ws: true,
-    })
-  );
-};
diff --git a/tubemq-web/src/store/global.ts b/tubemq-web/src/store/global.ts
deleted file mode 100644
index 18d8693..0000000
--- a/tubemq-web/src/store/global.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { createStore } from '@reactseed/use-redux';
-
-export interface TState {
-  name: string;
-  age: number;
-}
-
-export interface TMethod {
-  updateName: (name: string) => void;
-  becomeOlder: () => void;
-}
-
-const store = createStore(() => ({
-  age: 20,
-  name: 'reactseed',
-}));
-
-const methods = (state: TState): TMethod => {
-  const { age } = state;
-  return {
-    updateName: (name: string) => {
-      state.name = name;
-    },
-    becomeOlder: () => {
-      state.age = age + 1;
-    },
-  };
-};
-
-export { store, methods };
diff --git a/tubemq-web/src/typings/index.ts b/tubemq-web/src/typings/index.ts
deleted file mode 100644
index 164ab50..0000000
--- a/tubemq-web/src/typings/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './router';
diff --git a/tubemq-web/src/typings/router.ts b/tubemq-web/src/typings/router.ts
deleted file mode 100644
index 38e855d..0000000
--- a/tubemq-web/src/typings/router.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Route as LayoutRoute } from '@ant-design/pro-layout/lib/typings';
-import { RouteProps as ReactRouteProps } from 'react-router-dom';
-
-export interface Route extends LayoutRoute {
-  paths?: string[];
-}
-
-export type OmitRouteProps = Omit<ReactRouteProps, 'component'> & {
-  component: () => Promise<{ default: any }>;
-};
-
-export interface RouteProps extends OmitRouteProps {
-  component: () => Promise<{ default: any }>;
-}
diff --git a/tubemq-web/src/utils/index.ts b/tubemq-web/src/utils/index.ts
deleted file mode 100644
index e410d91..0000000
--- a/tubemq-web/src/utils/index.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { isObject, isEmpty } from 'lodash';
-
-export const isDevelopEnv = () => {
-  return process.env.NODE_ENV === 'development';
-};
-
-export const isEmptyParam = (value: any): boolean => {
-  if (Array.isArray(value)) {
-    // value为数组
-    return !value.length;
-  }
-  if (isObject(value)) {
-    // value为对象
-    return isEmpty(value);
-  }
-  if (typeof value === 'undefined') {
-    // value为undefinded
-    return true;
-  }
-  if (Number.isFinite(value)) {
-    // value为数值
-    return false;
-  }
-  // value为默认值
-  return !value;
-};
-
-export const boolean2Chinese = (value: boolean | string): string => {
-  let v: boolean;
-  if (value === 'false') {
-    v = false;
-  } else if (value === 'true') {
-    v = true;
-  } else {
-    v = value as boolean;
-  }
-  return !v ? '否' : '是';
-};
-
-export const transParamsWithConstantsMap = (
-  map: any,
-  paramsName: string
-): string => {
-  return map[paramsName] || paramsName;
-};
diff --git a/tubemq-web/tsconfig.json b/tubemq-web/tsconfig.json
deleted file mode 100644
index 0124036..0000000
--- a/tubemq-web/tsconfig.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  "extends": "./tsconfig.paths.json",
-  "compilerOptions": {
-    "typeRoots": [
-      "./typings"
-    ],
-    "target": "es5",
-    "lib": [
-      "dom",
-      "dom.iterable",
-      "esnext"
-    ],
-    "allowJs": true,
-    "skipLibCheck": true,
-    "esModuleInterop": true,
-    "allowSyntheticDefaultImports": true,
-    "strict": true,
-    "forceConsistentCasingInFileNames": true,
-    "module": "esnext",
-    "moduleResolution": "node",
-    "resolveJsonModule": true,
-    "isolatedModules": true,
-    "noEmit": true,
-    "jsx": "react"
-  },
-  "exclude": [
-    "build",
-    "node_modules"
-  ],
-  "include": [
-    "src"
-  ]
-}
diff --git a/tubemq-web/tsconfig.paths.json b/tubemq-web/tsconfig.paths.json
deleted file mode 100644
index 5879100..0000000
--- a/tubemq-web/tsconfig.paths.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "compilerOptions": {
-    "baseUrl": "src",
-    "paths": {
-      "@/*": ["*"]
-    }
-  }
-}


[incubator-tubemq] 29/29: [TUBEMQ-565]Replace simple scripts and code implementation (#432)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 2045feeba797c9fed827aa1c458157ab20e3215e
Author: gosonzhang <46...@qq.com>
AuthorDate: Mon Mar 1 14:22:18 2021 +0800

    [TUBEMQ-565]Replace simple scripts and code implementation (#432)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 LICENSE                                            |  20 +-
 NOTICE                                             |  17 --
 bin/broker.sh                                      | 151 --------------
 bin/master.sh                                      | 154 --------------
 bin/{tubemq => tubemq.sh}                          |   0
 pom.xml                                            |  10 +-
 tubemq-core/pom.xml                                |   4 +
 .../tubemq/corebase/utils/ConcurrentHashSet.java   |  59 ++++--
 .../apache/tubemq/corebase/utils/MapBackedSet.java |  76 -------
 .../apache/tubemq/corebase/utils/TStringUtils.java | 222 +--------------------
 .../corebase/utils/ConcurrentHashSetTest.java      |  49 +++++
 tubemq-docker/tubemq-all/tubemq.sh                 |   8 +-
 .../web/handler/WebAdminGroupCtrlHandler.java      |   2 -
 .../master/web/handler/WebOtherInfoHandler.java    |   3 +-
 14 files changed, 118 insertions(+), 657 deletions(-)

diff --git a/LICENSE b/LICENSE
index c6bfcd6..a883d4c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -340,31 +340,15 @@
  Source  : hbase 0.94.27 (Please note that the software have been modified.)
  License : https://github.com/apache/hbase/blob/rel/0.94.27/LICENSE.txt
 
-1.3.2 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
-      tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
- Source  : mina 2.0.12
- License : https://github.com/apache/mina/blob/2.0.12/LICENSE.txt
-
-1.3.3 bin/broker.sh
-      bin/master.sh
- Source  : Metamorphosis  metamorphosis-all-1.4.4 (Please note that the software have been modified.)
- License : https://github.com/killme2008/Metamorphosis/blob/metamorphosis-all-1.4.4/COPYING.txt
-
-1.3.4 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
+1.3.2 tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferInputStream.java
       tubemq-core/src/main/java/org/apache/tubemq/corerpc/netty/ByteBufferOutputStream.java
  Source  : Apache Avro 1.7.6
  License : https://github.com/apache/avro/blob/release-1.7.6/LICENSE.txt
 
-1.3.5 tubemq-client-twins/tubemq-client-cpp/src/future.h
+1.3.3 tubemq-client-twins/tubemq-client-cpp/src/future.h
  Source  : Apache Pulsar
  License : https://github.com/apache/pulsar/blob/master/LICENSE
 
-1.3.6 tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
- Source  : commons-lang (Please note that the software have been modified.)
-           https://github.com/apache/commons-lang/blob/LANG_2_X/src/
-                 main/java/org/apache/commons/lang/StringUtils.java
- License : https://github.com/apache/commons-lang/blob/LANG_2_X/LICENSE.txt
-
 ----
 
 =========
diff --git a/NOTICE b/NOTICE
index 85f6960..e451d38 100644
--- a/NOTICE
+++ b/NOTICE
@@ -59,14 +59,6 @@ Apache HBase includes the following in its NOTICE file:
 | 'hbase-shaded-hbase-shaded-testing-util/src/main/resources/org/apache/hadoop/hbase/shaded/org/mortbay/jetty/webapp/webdefault.xml'
 
 
-Apache MINA includes the following in its NOTICE file:
-| Apache MINA
-| Copyright 2007-2016 The Apache Software Foundation.
-| 
-| This product includes software developed at
-| The Apache Software Foundation (http://www.apache.org/).
-
-
 Apache Avro includes the following in its NOTICE file:
 | Apache Avro
 | Copyright 2010-2019 The Apache Software Foundation
@@ -143,15 +135,6 @@ Apache Avro includes the following in its NOTICE file:
 | | 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.
 
-
-Apache Commons Lang includes the following in its NOTICE file:
-| Apache Commons Lang
-| Copyright 2001-2011 The Apache Software Foundation
-|
-| This product includes software developed by
-| The Apache Software Foundation (http://www.apache.org/).
-
-
 Apache Pulsar includes the following in its NOTICE file:
 | Apache Pulsar
 | Copyright 2017-2019 The Apache Software Foundation
diff --git a/bin/broker.sh b/bin/broker.sh
deleted file mode 100644
index 51684e5..0000000
--- a/bin/broker.sh
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/bin/bash
-
-#
-# 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.
-#
-
-#project directory
-if [ -z "$BASE_DIR" ] ; then
-  PRG="$0"
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-      PRG="$link"
-    else
-      PRG="`dirname "$PRG"`/$link"
-    fi
-  done
-  BASE_DIR=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  BASE_DIR=`cd "$BASE_DIR" && pwd`
-  #echo "TubeMQ broker is at $BASE_DIR"
-fi
-
-source $BASE_DIR/bin/env.sh
-
-AS_USER=`whoami`
-LOG_DIR="$BASE_DIR/logs"
-LOG_FILE="$LOG_DIR/broker.log"
-PID_DIR="$BASE_DIR/logs"
-PID_FILE="$PID_DIR/.broker.run.pid"
-
-function running(){
-	if [ -f "$PID_FILE" ]; then
-		pid=$(cat "$PID_FILE")
-		process=`ps aux | grep " $pid "|grep "\-Dtubemq\.home=$BASE_DIR" | grep -v grep`;
-		if [ "$process" == "" ]; then
-	    		return 1;
-		else
-			return 0;
-		fi
-	else
-		return 1
-	fi
-}
-
-function start_server() {
-	if running; then
-		echo "Broker is running."
-		exit 1
-	fi
-
-    mkdir -p $PID_DIR
-    touch $LOG_FILE
-    mkdir -p $LOG_DIR
-    chown -R $AS_USER $PID_DIR
-    chown -R $AS_USER $LOG_DIR
-    
-    config_files="-f $BASE_DIR/conf/broker.ini"
-	
-	echo "Starting TubeMQ broker..."
-    
-   	echo "$JAVA $BROKER_ARGS  org.apache.tubemq.server.tools.BrokerStartup $config_files"
-    sleep 1
-    nohup $JAVA $BROKER_ARGS  org.apache.tubemq.server.tools.BrokerStartup $config_files 2>&1 >>$LOG_FILE &
-    echo $! > $PID_FILE
-    chmod 755 $PID_FILE
-}
-
-function status_server() {
-	if running; then
-		echo "Broker is running."
-		exit 0
-	else
-    echo "Broker is not running."
-		exit 1
-	fi
-}
-
-function stop_server() {
-	if ! running; then
-		echo "Broker is not running."
-		exit 1
-	fi
-	count=0
-	pid=$(cat $PID_FILE)
-	while running;
-	do
-	  let count=$count+1
-	  echo "Stopping TubeMQ Broker $count times"
-	  if [ $count -gt 10 ]; then
-	  	  echo "kill -9 $pid"
-	      kill -9 $pid
-	  else
-	      kill $pid
-	  fi
-	  sleep 8;
-	done
-	echo "Stop TubeMQ Broker successfully."
-	rm $PID_FILE
-}
-
-function help() {
-    echo "Usage: broker.sh {status|start|stop|restart}" >&2
-    echo "       status:            the status of broker server"
-    echo "       start:             start the broker server"
-    echo "       stop:              stop the broker server"
-    echo "       restart:           restart the broker server"
-}
-
-command=$1
-shift 1
-case $command in
-    status)
-        status_server $@;
-        ;;
-    start)
-        start_server $@;
-        ;;    
-    stop)
-        stop_server $@;
-        ;;
-    restart)
-        $0 stop $@
-        sleep 10
-        $0 start $@
-        ;;
-    help)
-        help;
-        ;;
-    *)
-        help;
-        exit 1;
-        ;;
-esac
diff --git a/bin/master.sh b/bin/master.sh
deleted file mode 100644
index bd311a9..0000000
--- a/bin/master.sh
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/bin/bash
-
-#
-# 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.
-#
-
-#project directory
-if [ -z "$BASE_DIR" ] ; then
-  PRG="$0"
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-      PRG="$link"
-    else
-      PRG="`dirname "$PRG"`/$link"
-    fi
-  done
-  BASE_DIR=`dirname "$PRG"`/..
-
-  # make it fully qualified
-  BASE_DIR=`cd "$BASE_DIR" && pwd`
-  #echo "TubeMQ master is at $BASE_DIR"
-fi
-
-source $BASE_DIR/bin/env.sh
-
-AS_USER=`whoami`
-LOG_DIR="$BASE_DIR/logs"
-LOG_FILE="$LOG_DIR/master.log"
-PID_DIR="$BASE_DIR/logs"
-PID_FILE="$PID_DIR/.master.run.pid"
-
-function running(){
-	if [ -f "$PID_FILE" ]; then
-		pid=$(cat "$PID_FILE")
-		process=`ps aux | grep " $pid "|grep "\-Dtubemq\.home=$BASE_DIR" | grep -v grep`;
-		if [ "$process" == "" ]; then
-	    	return 1;
-		else
-			return 0;
-		fi
-	else
-		return 1
-	fi
-}
-
-function start_server() {
-	if running; then
-		echo "Master is running."
-		exit 1
-	fi
-
-    mkdir -p $PID_DIR
-    touch $LOG_FILE
-    mkdir -p $LOG_DIR
-    chown -R $AS_USER $PID_DIR
-    chown -R $AS_USER $LOG_DIR
-    
-    config_files="-f $BASE_DIR/conf/master.ini"
-    
-	echo "Starting Master server..."
-  pushd .
-    
-    cd $BASE_DIR
-   	echo "$JAVA $MASTER_ARGS  org.apache.tubemq.server.tools.MasterStartup $config_files"
-    sleep 1
-    nohup $JAVA $MASTER_ARGS  org.apache.tubemq.server.tools.MasterStartup $config_files 2>&1 >>$LOG_FILE &
-    echo $! > $PID_FILE
-    chmod 755 $PID_FILE
-  
-  popd
-}
-
-function status_server() {
-	if running; then
-		echo "Master is running."
-		exit 0
-	else
-	  echo "Master is not running."
-	  exit 1
-	fi
-}
-
-function stop_server() {
-	if ! running; then
-		echo "Master is not running."
-		exit 1
-	fi
-	count=0
-	pid=$(cat $PID_FILE)
-	while running;
-	do
-	  let count=$count+1
-	  echo "Stopping TubeMQ master $count times"
-	  if [ $count -gt 10 ]; then
-	  	  echo "kill -9 $pid"
-	      kill -9 $pid
-	  else
-	      kill $pid
-	  fi
-	  sleep 6;
-	done	
-	echo "Stop TubeMQ master successfully."
-	rm $PID_FILE
-}
-
-function help() {
-    echo "Usage: master.sh {status|start|stop|restart}" >&2
-    echo "       status:     the status of master server"
-    echo "       start:      start the master server"
-    echo "       stop:       stop the master server"
-    echo "       restart:    restart the master server"
-}
-
-command=$1
-shift 1
-case $command in
-    status)
-        status_server $@;
-        ;;
-    start)
-        start_server $@;
-        ;;    
-    stop)
-        stop_server $@;
-        ;;
-    restart)
-        $0 stop $@
-        $0 start $@
-        ;;
-    help)
-        help;
-        ;;
-    *)
-        help;
-        exit 1;
-        ;;
-esac
diff --git a/bin/tubemq b/bin/tubemq.sh
similarity index 100%
rename from bin/tubemq
rename to bin/tubemq.sh
diff --git a/pom.xml b/pom.xml
index fe34837..8bbcad6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -319,6 +319,11 @@
                 <version>1.10</version>
             </dependency>
             <dependency>
+                <groupId>commons-lang</groupId>
+                <artifactId>commons-lang</artifactId>
+                <version>2.6</version>
+            </dependency>
+            <dependency>
                 <groupId>com.sleepycat</groupId>
                 <artifactId>je</artifactId>
                 <version>${je.version}</version>
@@ -329,11 +334,6 @@
                 <version>${gson.version}</version>
             </dependency>
             <dependency>
-                <groupId>commons-lang</groupId>
-                <artifactId>commons-lang</artifactId>
-                <version>2.6</version>
-            </dependency>
-            <dependency>
                 <groupId>org.apache.httpcomponents</groupId>
                 <artifactId>httpclient</artifactId>
                 <version>4.5.2</version>
diff --git a/tubemq-core/pom.xml b/tubemq-core/pom.xml
index 21b1bf0..34a2349 100644
--- a/tubemq-core/pom.xml
+++ b/tubemq-core/pom.xml
@@ -114,6 +114,10 @@
             <artifactId>commons-codec</artifactId>
         </dependency>
         <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+        <dependency>
             <groupId>com.googlecode.protobuf-java-format</groupId>
             <artifactId>protobuf-java-format</artifactId>
             <version>1.4</version>
diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
index 9860d09..19173ee 100644
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
+++ b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/ConcurrentHashSet.java
@@ -17,30 +17,63 @@
 
 package org.apache.tubemq.corebase.utils;
 
-import java.util.Collection;
+
+import java.util.AbstractSet;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
- * A Map-backed Set.
- *
- * Copied from <a href="http://mina.apache.org">Apache MINA Project</a>
+ * ConcurrentHashSet, construct the set collection through ConcurrentHashMap
+ *  to complete the operation management of the concurrent set
  */
-public class ConcurrentHashSet<E> extends MapBackedSet<E> {
+public class ConcurrentHashSet<E> extends AbstractSet<E> {
 
-    private static final long serialVersionUID = 8518578988740277828L;
+    private final ConcurrentHashMap<E, Long> keyValMap
+            = new ConcurrentHashMap<>();
 
     public ConcurrentHashSet() {
-        super(new ConcurrentHashMap<E, Boolean>());
+
+    }
+
+    @Override
+    public boolean add(E item) {
+        Long value =
+                keyValMap.putIfAbsent(item, System.currentTimeMillis());
+        return (value == null);
+    }
+
+    @Override
+    public boolean contains(Object item) {
+        return keyValMap.containsKey(item);
+    }
+
+    @Override
+    public boolean remove(Object item) {
+        return keyValMap.remove(item) != null;
+    }
+
+    @Override
+    public void clear() {
+        keyValMap.clear();
+    }
+
+    @Override
+    public int size() {
+        return keyValMap.size();
     }
 
-    public ConcurrentHashSet(Collection<E> c) {
-        super(new ConcurrentHashMap<E, Boolean>(), c);
+    @Override
+    public boolean isEmpty() {
+        return keyValMap.isEmpty();
     }
 
     @Override
-    public boolean add(E o) {
-        Boolean answer =
-                map.putIfAbsent(o, Boolean.TRUE);
-        return answer == null;
+    public Iterator<E> iterator() {
+        return new HashSet<>(keyValMap.keySet()).iterator();
+    }
+
+    public Long getItemAddTime(E item) {
+        return keyValMap.get(item);
     }
 }
diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
deleted file mode 100644
index 554a731..0000000
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/MapBackedSet.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.corebase.utils;
-
-import java.io.Serializable;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * A Map-backed Set.
- *
- * Copied from <a href="http://mina.apache.org">Apache MINA Project</a>
- */
-public class MapBackedSet<E> extends AbstractSet<E> implements Serializable {
-
-    private static final long serialVersionUID = -8347878570391674042L;
-
-    protected final ConcurrentHashMap<E, Boolean> map;
-
-    public MapBackedSet(ConcurrentHashMap<E, Boolean> map) {
-        this.map = map;
-    }
-
-    public MapBackedSet(ConcurrentHashMap<E, Boolean> map, Collection<E> c) {
-        this.map = map;
-        addAll(c);
-    }
-
-    @Override
-    public int size() {
-        return map.size();
-    }
-
-    @Override
-    public boolean contains(Object o) {
-        return map.containsKey(o);
-    }
-
-    @Override
-    public Iterator<E> iterator() {
-        return new ArrayList<>(map.keySet()).iterator();
-    }
-
-    @Override
-    public boolean add(E o) {
-        return map.put(o, Boolean.TRUE) == null;
-    }
-
-    @Override
-    public boolean remove(Object o) {
-        return map.remove(o) != null;
-    }
-
-    @Override
-    public void clear() {
-        map.clear();
-    }
-}
diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
index b5dc005..5714b80 100644
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
+++ b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
@@ -15,18 +15,13 @@
  * limitations under the License.
  */
 
-/*
- * Modified from commons-lang <a href="https://github.com/apache/commons-lang"> Project</a>
- *   file address: https://github.com/apache/commons-lang/blob/LANG_2_X/src/
- *                         main/java/org/apache/commons/lang/StringUtils.java
- */
-
 package org.apache.tubemq.corebase.utils;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.digest.HmacUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.TokenConstants;
 
@@ -35,231 +30,28 @@ import org.apache.tubemq.corebase.TokenConstants;
  */
 public class TStringUtils {
 
-    public static final String EMPTY = "";
-
-    // Empty checks
-    //-----------------------------------------------------------------------
-    /**
-     * <p>Checks if a String is empty ("") or null.</p>
-     *
-     * <pre>
-     * TStringUtils.isEmpty(null)      = true
-     * TStringUtils.isEmpty("")        = true
-     * TStringUtils.isEmpty(" ")       = false
-     * TStringUtils.isEmpty("bob")     = false
-     * TStringUtils.isEmpty("  bob  ") = false
-     * </pre>
-     *
-     * <p>NOTE: This method changed in Lang version 2.0.
-     * It no longer trims the String.
-     * That functionality is available in isBlank().</p>
-     *
-     * @param str  the String to check, may be null
-     * @return <code>true</code> if the String is empty or null
-     */
     public static boolean isEmpty(String str) {
-        return str == null || str.length() == 0;
+        return StringUtils.isEmpty(str);
     }
 
-    /**
-     * <p>Checks if a String is not empty ("") and not null.</p>
-     *
-     * <pre>
-     * TStringUtils.isNotEmpty(null)      = false
-     * TStringUtils.isNotEmpty("")        = false
-     * TStringUtils.isNotEmpty(" ")       = true
-     * TStringUtils.isNotEmpty("bob")     = true
-     * TStringUtils.isNotEmpty("  bob  ") = true
-     * </pre>
-     *
-     * @param str  the String to check, may be null
-     * @return <code>true</code> if the String is not empty and not null
-     */
     public static boolean isNotEmpty(String str) {
-        return !isEmpty(str);
+        return StringUtils.isNotEmpty(str);
     }
 
-    /**
-     * <p>Checks if a String is whitespace, empty ("") or null.</p>
-     *
-     * <pre>
-     * TStringUtils.isBlank(null)      = true
-     * TStringUtils.isBlank("")        = true
-     * TStringUtils.isBlank(" ")       = true
-     * TStringUtils.isBlank("bob")     = false
-     * TStringUtils.isBlank("  bob  ") = false
-     * </pre>
-     *
-     * @param str  the String to check, may be null
-     * @return <code>true</code> if the String is null, empty or whitespace
-     * @since 2.0
-     */
     public static boolean isBlank(String str) {
-        int strLen;
-        if (str == null || (strLen = str.length()) == 0) {
-            return true;
-        }
-        for (int i = 0; i < strLen; i++) {
-            if (!Character.isWhitespace(str.charAt(i))) {
-                return false;
-            }
-        }
-        return true;
+        return StringUtils.isBlank(str);
     }
 
-    /**
-     * <p>Checks if a String is not empty (""), not null and not whitespace only.</p>
-     *
-     * <pre>
-     * TStringUtils.isNotBlank(null)      = false
-     * TStringUtils.isNotBlank("")        = false
-     * TStringUtils.isNotBlank(" ")       = false
-     * TStringUtils.isNotBlank("bob")     = true
-     * TStringUtils.isNotBlank("  bob  ") = true
-     * </pre>
-     *
-     * @param str  the String to check, may be null
-     * @return <code>true</code> if the String is
-     *  not empty and not null and not whitespace
-     * @since 2.0
-     */
     public static boolean isNotBlank(String str) {
-        return !isBlank(str);
+        return StringUtils.isNotBlank(str);
     }
 
-    /**
-     * <p>Removes control characters (char &lt;= 32) from both
-     * ends of this String, handling <code>null</code> by returning
-     * <code>null</code>.</p>
-     *
-     * <p>The String is trimmed using {@link String#trim()}.
-     * Trim removes start and end characters &lt;= 32.</p>
-     *
-     * <pre>
-     * TStringUtils.trim(null)          = null
-     * TStringUtils.trim("")            = ""
-     * TStringUtils.trim("     ")       = ""
-     * TStringUtils.trim("abc")         = "abc"
-     * TStringUtils.trim("    abc    ") = "abc"
-     * </pre>
-     *
-     * @param str  the String to be trimmed, may be null
-     * @return the trimmed string, <code>null</code> if null String input
-     */
     public static String trim(String str) {
-        return str == null ? null : str.trim();
+        return StringUtils.trim(str);
     }
 
-    // Misc
-    //-----------------------------------------------------------------------
-    /**
-     * <p>Find the Levenshtein distance between two Strings.</p>
-     *
-     * <p>This is the number of changes needed to change one String into
-     * another, where each change is a single character modification (deletion,
-     * insertion or substitution).</p>
-     *
-     * <p>The previous implementation of the Levenshtein distance algorithm
-     * was from <a href="http://www.merriampark.com/ld.htm">http://www.merriampark.com/ld.htm</a></p>
-     *
-     * <p>Chas Emerick has written an implementation in Java, which avoids an OutOfMemoryError
-     * which can occur when my Java implementation is used with very large strings.<br>
-     * This implementation of the Levenshtein distance algorithm
-     * is from <a href="http://www.merriampark.com/ldjava.htm">http://www.merriampark.com/ldjava.htm</a></p>
-     *
-     * <pre>
-     * TStringUtils.getLevenshteinDistance(null, *)             = IllegalArgumentException
-     * TStringUtils.getLevenshteinDistance(*, null)             = IllegalArgumentException
-     * TStringUtils.getLevenshteinDistance("","")               = 0
-     * TStringUtils.getLevenshteinDistance("","a")              = 1
-     * TStringUtils.getLevenshteinDistance("aaapppp", "")       = 7
-     * TStringUtils.getLevenshteinDistance("frog", "fog")       = 1
-     * TStringUtils.getLevenshteinDistance("fly", "ant")        = 3
-     * TStringUtils.getLevenshteinDistance("elephant", "hippo") = 7
-     * TStringUtils.getLevenshteinDistance("hippo", "elephant") = 7
-     * TStringUtils.getLevenshteinDistance("hippo", "zzzzzzzz") = 8
-     * TStringUtils.getLevenshteinDistance("hello", "hallo")    = 1
-     * </pre>
-     *
-     * @param s  the first String, must not be null
-     * @param t  the second String, must not be null
-     * @return result distance
-     * @throws IllegalArgumentException if either String input <code>null</code>
-     */
     public static int getLevenshteinDistance(String s, String t) {
-        if (s == null || t == null) {
-            throw new IllegalArgumentException("Strings must not be null");
-        }
-
-        /*
-           The difference between this impl. and the previous is that, rather
-           than creating and retaining a matrix of size s.length()+1 by t.length()+1,
-           we maintain two single-dimensional arrays of length s.length()+1.  The first, d,
-           is the 'current working' distance array that maintains the newest distance cost
-           counts as we iterate through the characters of String s.  Each time we increment
-           the index of String t we are comparing, d is copied to p, the second int[].  Doing so
-           allows us to retain the previous cost counts as required by the algorithm (taking
-           the minimum of the cost count to the left, up one, and diagonally up and to the left
-           of the current cost count being calculated).  (Note that the arrays aren't really
-           copied anymore, just switched...this is clearly much better than cloning an array
-           or doing a System.arraycopy() each time  through the outer loop.)
-           Effectively, the difference between the two implementations is this one does not
-           cause an out of memory condition when calculating the LD over two very large strings.
-         */
-
-        int n = s.length(); // length of s
-        int m = t.length(); // length of t
-
-        if (n == 0) {
-            return m;
-        } else if (m == 0) {
-            return n;
-        }
-
-        if (n > m) {
-            // swap the input strings to consume less memory
-            String tmp = s;
-            s = t;
-            t = tmp;
-            n = m;
-            m = t.length();
-        }
-
-        int p[] = new int[n + 1]; //'previous' cost array, horizontally
-        int d[] = new int[n + 1]; // cost array, horizontally
-        int swap[]; //placeholder to assist in swapping p and d
-
-        // indexes into strings s and t
-        int i; // iterates through s
-        int j; // iterates through t
-
-        char chkChar; // jth character of t
-
-        int cost; // cost
-
-        for (i = 0; i <= n; i++) {
-            p[i] = i;
-        }
-
-        for (j = 1; j <= m; j++) {
-            chkChar = t.charAt(j - 1);
-            d[0] = j;
-
-            for (i = 1; i <= n; i++) {
-                cost = s.charAt(i - 1) == chkChar ? 0 : 1;
-                // minimum of cell to the left+1, to the top+1, diagonally left and up +cost
-                d[i] = Math.min(Math.min(d[i - 1] + 1, p[i] + 1),  p[i - 1] + cost);
-            }
-
-            // copy current distance counts to 'previous row' distance counts
-            swap = p;
-            p = d;
-            d = swap;
-        }
-
-        // our last action in the above loop was to switch d and p, so p now
-        // actually has the most recent cost counts
-        return p[n];
+        return StringUtils.getLevenshteinDistance(s, t);
     }
 
     public static boolean isLetter(char ch) {
diff --git a/tubemq-core/src/test/java/org/apache/tubemq/corebase/utils/ConcurrentHashSetTest.java b/tubemq-core/src/test/java/org/apache/tubemq/corebase/utils/ConcurrentHashSetTest.java
new file mode 100644
index 0000000..581c34c
--- /dev/null
+++ b/tubemq-core/src/test/java/org/apache/tubemq/corebase/utils/ConcurrentHashSetTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.tubemq.corebase.utils;
+
+import junit.framework.TestCase;
+import org.junit.Test;
+
+
+public class ConcurrentHashSetTest extends TestCase {
+
+    @Test
+    public void test() {
+        int count = 0;
+        ConcurrentHashSet<String> testSet =
+                new ConcurrentHashSet<>();
+        for (String item : testSet) {
+            System.out.println("Count = " + count++ + ", item = " + item);
+        }
+        testSet.add("test-1");
+        testSet.add("test-2");
+        System.out.println("test-2 add time is " + testSet.getItemAddTime("test-2"));
+        testSet.add("test-3");
+        testSet.add("test-4");
+        assertEquals(4, testSet.size());
+        assertFalse(testSet.add("test-2"));
+        assertEquals(4, testSet.size());
+        count = 0;
+        for (String item : testSet) {
+            System.out.println("Count = " + count++ + ", item = " + item);
+        }
+        System.out.println("test-2 add time is " + testSet.getItemAddTime("test-2"));
+    }
+
+}
\ No newline at end of file
diff --git a/tubemq-docker/tubemq-all/tubemq.sh b/tubemq-docker/tubemq-all/tubemq.sh
index c46a659..466154c 100644
--- a/tubemq-docker/tubemq-all/tubemq.sh
+++ b/tubemq-docker/tubemq-all/tubemq.sh
@@ -29,7 +29,7 @@ if [[ $TARGET == "standalone" ]]; then
   sleep 5
   # master start
 
-  ./master.sh start
+  ./tubemq.sh master start
   sleep 5
   # add broker
   curl -d "type=op_modify&method=admin_add_broker_configure&brokerId=1\
@@ -40,16 +40,16 @@ if [[ $TARGET == "standalone" ]]; then
   curl -d "type=op_modify&method=admin_online_broker_configure&brokerId=1\
     &modifyUser=docker&confModAuthToken=abc" http://127.0.0.1:8080/webapi.htm
   # broker start
-  ./broker.sh start
+  ./tubemq.sh broker start
   tail -F /opt/tubemq-server/logs/*
 fi
 # for master
 if [[ $TARGET == "master" ]]; then
-  ./master.sh start
+  ./tubemq.sh master start
   tail -F /opt/tubemq-server/logs/master.log
 fi
 # for broker
 if [[ $TARGET == "broker" ]]; then
-  ./broker.sh start
+  ./tubemq.sh broker start
   tail -F /opt/tubemq-server/logs/broker.log
 fi
\ No newline at end of file
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebAdminGroupCtrlHandler.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebAdminGroupCtrlHandler.java
index 1c94cd8..028cd6b 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebAdminGroupCtrlHandler.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebAdminGroupCtrlHandler.java
@@ -66,8 +66,6 @@ public class WebAdminGroupCtrlHandler extends AbstractWebHandler {
         registerQueryWebMethod("admin_query_consume_group_setting",
                 "adminQueryConsumeGroupSetting");
         // register modify method
-        registerModifyWebMethod("admin_add_new_topic_record",
-                "adminAddTopicEntityInfo");
         registerModifyWebMethod("admin_add_black_consumergroup_info",
                 "adminAddBlackGroupInfo");
         registerModifyWebMethod("admin_bath_add_black_consumergroup_info",
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebOtherInfoHandler.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebOtherInfoHandler.java
index c6c2213..2e7e993 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebOtherInfoHandler.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebOtherInfoHandler.java
@@ -30,7 +30,6 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.cluster.ConsumerInfo;
 import org.apache.tubemq.corebase.cluster.Partition;
-import org.apache.tubemq.corebase.utils.ConcurrentHashSet;
 import org.apache.tubemq.corebase.utils.TStringUtils;
 import org.apache.tubemq.server.common.utils.WebParameterUtils;
 import org.apache.tubemq.server.master.TMaster;
@@ -93,7 +92,7 @@ public class WebOtherInfoHandler extends AbstractWebHandler {
                     }
                 }
             } else {
-                ConcurrentHashSet<String> groupSet = topicPSInfoManager.getTopicSubInfo(strTopicName);
+                Set<String> groupSet = topicPSInfoManager.getTopicSubInfo(strTopicName);
                 if ((groupSet != null) && (!groupSet.isEmpty())) {
                     if (TStringUtils.isEmpty(strConsumeGroup)) {
                         for (String tmpGroup : groupSet) {


[incubator-tubemq] 13/29: [TUBEMQ-547]Recode the implementation of the *Startup.java classes in the Tool package

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 1b0f45534c7cd7afc40830c65143808699d14b3d
Author: gosonzhang <go...@tencent.com>
AuthorDate: Thu Jan 28 17:42:35 2021 +0800

    [TUBEMQ-547]Recode the implementation of the *Startup.java classes in the Tool package
---
 LICENSE                                            |  1 -
 .../tubemq/server/common/fielddef/CliArgDef.java   |  6 +-
 .../apache/tubemq/server/tools/BrokerStartup.java  | 24 ++++++-
 .../org/apache/tubemq/server/tools/CliUtils.java   | 72 ++++++++++++++++++++
 .../apache/tubemq/server/tools/MasterStartup.java  | 21 +++++-
 .../org/apache/tubemq/server/tools/ToolUtils.java  | 78 ----------------------
 6 files changed, 116 insertions(+), 86 deletions(-)

diff --git a/LICENSE b/LICENSE
index 4834d76..a2d97e6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -303,7 +303,6 @@ License: https://github.com/webx/citrus/blob/r3.1.4/pom.xml
 
 5. bin/broker.sh
    bin/master.sh
-   tubemq-server/src/main/java/org/apache/tubemq/server/tools/ToolUtils.java
 Metamorphosis  metamorphosis-all-1.4.4 (Please note that the software have been modified.)
 Copyrighy (C) Alibaba Group Holding Limited.
 License: https://github.com/killme2008/Metamorphosis/blob/metamorphosis-all-1.4.4/COPYING.txt
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/fielddef/CliArgDef.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/fielddef/CliArgDef.java
index 2e39f2f..1e1feea 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/fielddef/CliArgDef.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/fielddef/CliArgDef.java
@@ -100,8 +100,10 @@ public enum CliArgDef {
             "String: http call method",
             "Http call method"),
     ADMINMETHOD(null, "show-methods",
-            "Return http's methods.");
-
+            "Return http's methods."),
+    FILEPATH("f", "file",
+            "String: file path.",
+            "File path.");
 
 
 
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/BrokerStartup.java b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/BrokerStartup.java
index a966278..12d6189 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/BrokerStartup.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/BrokerStartup.java
@@ -19,12 +19,30 @@ package org.apache.tubemq.server.tools;
 
 import org.apache.tubemq.server.broker.BrokerConfig;
 import org.apache.tubemq.server.broker.TubeBroker;
+import org.apache.tubemq.server.common.utils.ProcessResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 public class BrokerStartup {
+
+    private static final Logger logger =
+            LoggerFactory.getLogger(BrokerStartup.class);
+
     public static void main(final String[] args) throws Exception {
-        final String configFilePath = ToolUtils.getConfigFilePath(args);
-        final BrokerConfig tubeConfig = ToolUtils.getBrokerConfig(configFilePath);
-        final TubeBroker server = new TubeBroker(tubeConfig);
+        // get configure file path
+        ProcessResult result = new ProcessResult();
+        if (!CliUtils.getConfigFilePath(args, result)) {
+            System.err.println(result.errInfo);
+            System.exit(1);
+        }
+        String configFilePath = (String) result.retData1;
+        // read configure file
+        BrokerConfig brokerConfig = new BrokerConfig();
+        brokerConfig.loadFromFile(configFilePath);
+        logger.info("[BrokerStartup] Broker config is: " + brokerConfig);
+        // start broker instance
+        final TubeBroker server = new TubeBroker(brokerConfig);
         server.start();
     }
 }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/CliUtils.java b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/CliUtils.java
new file mode 100644
index 0000000..d2a25c5
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/CliUtils.java
@@ -0,0 +1,72 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.tubemq.server.tools;
+
+import static org.apache.tubemq.server.common.fielddef.CliArgDef.FILEPATH;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.DefaultParser;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
+import org.apache.tubemq.corebase.utils.TStringUtils;
+import org.apache.tubemq.server.common.utils.ProcessResult;
+
+
+
+public class CliUtils {
+
+    public static boolean getConfigFilePath(final String[] args, ProcessResult result) {
+        // build file option
+        Options options = new Options();
+        Option fileOption = new Option(FILEPATH.opt,
+                FILEPATH.longOpt, FILEPATH.hasArg, FILEPATH.optDesc);
+        if (FILEPATH.hasArg) {
+            fileOption.setArgName(FILEPATH.argDesc);
+        }
+        options.addOption(fileOption);
+        // parse args
+        CommandLineParser parser = new DefaultParser();
+        try {
+            CommandLine cli = parser.parse(options, args);
+            if (cli == null) {
+                result.setFailResult("Parse args failure");
+                return result.success;
+            }
+            if (!cli.hasOption(FILEPATH.longOpt)) {
+                result.setFailResult(new StringBuilder(512)
+                        .append("Please input the configuration file path by ")
+                        .append("-").append(FILEPATH.opt).append(" or ")
+                        .append("-").append(FILEPATH.longOpt).append(" option").toString());
+                return result.success;
+            }
+            String configFilePath = cli.getOptionValue(FILEPATH.longOpt);
+            if (TStringUtils.isBlank(configFilePath)) {
+                result.setFailResult(new StringBuilder(512)
+                        .append(FILEPATH.longOpt).append(" is required!").toString());
+                return result.success;
+            }
+            result.setSuccResult(configFilePath);
+        } catch (Throwable e) {
+            result.setFailResult(new StringBuilder(512)
+                    .append("Parse configuration file path failure: ")
+                    .append(e.toString()).toString());
+        }
+        return result.success;
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/MasterStartup.java b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/MasterStartup.java
index a770f40..1d441f1 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/MasterStartup.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/MasterStartup.java
@@ -17,13 +17,30 @@
 
 package org.apache.tubemq.server.tools;
 
+import org.apache.tubemq.server.common.utils.ProcessResult;
 import org.apache.tubemq.server.master.MasterConfig;
 import org.apache.tubemq.server.master.TMaster;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MasterStartup {
+
+    private static final Logger logger =
+            LoggerFactory.getLogger(MasterStartup.class);
+
     public static void main(final String[] args) throws Exception {
-        final String configFilePath = ToolUtils.getConfigFilePath(args);
-        final MasterConfig masterConfig = ToolUtils.getMasterConfig(configFilePath);
+        // get configure file path
+        ProcessResult result = new ProcessResult();
+        if (!CliUtils.getConfigFilePath(args, result)) {
+            System.err.println(result.errInfo);
+            System.exit(1);
+        }
+        String configFilePath = (String) result.retData1;
+        // read configure file
+        final MasterConfig masterConfig = new MasterConfig();
+        masterConfig.loadFromFile(configFilePath);
+        logger.info("[MasterStartup] master config is: " + masterConfig);
+        // start master instance
         TMaster master = new TMaster(masterConfig);
         master.start();
         master.join();
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/ToolUtils.java b/tubemq-server/src/main/java/org/apache/tubemq/server/tools/ToolUtils.java
deleted file mode 100644
index 9c343a8..0000000
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/tools/ToolUtils.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.tubemq.server.tools;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.DefaultParser;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-import org.apache.tubemq.corebase.utils.TStringUtils;
-import org.apache.tubemq.server.broker.BrokerConfig;
-import org.apache.tubemq.server.broker.exception.StartupException;
-import org.apache.tubemq.server.master.MasterConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Utility for .ini configure file loading.
- * Copied from <a href="https://github.com/killme2008/Metamorphosis">Metamorphosis Project</a>
- */
-public class ToolUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger(ToolUtils.class);
-
-    public static BrokerConfig getBrokerConfig(final String configFilePath) {
-        final BrokerConfig brokerConfig = new BrokerConfig();
-        brokerConfig.loadFromFile(configFilePath);
-        logger.info("Broker config is: " + brokerConfig);
-        return brokerConfig;
-    }
-
-    public static MasterConfig getMasterConfig(final String configFilePath) {
-        final MasterConfig masterConfig = new MasterConfig();
-        masterConfig.loadFromFile(configFilePath);
-        logger.info("master config is: " + masterConfig);
-        return masterConfig;
-    }
-
-    public static String getConfigFilePath(final String[] args) throws StartupException {
-        final Options options = new Options();
-        final Option file = new Option("f", true, "configuration file path");
-        options.addOption(file);
-        final CommandLineParser parser = new DefaultParser();
-        CommandLine line = null;
-        try {
-            line = parser.parse(options, args);
-        } catch (final ParseException e) {
-            throw new StartupException("Parse command line failed", e);
-        }
-        String configFilePath = null;
-        if (line.hasOption("f")) {
-            configFilePath = line.getOptionValue("f");
-        } else {
-            System.err.println("Please tell me the configuration file path by -f option");
-            System.exit(1);
-        }
-        if (TStringUtils.isBlank(configFilePath)) {
-            throw new StartupException("Blank file path");
-        }
-        return configFilePath;
-    }
-}


[incubator-tubemq] 02/29: add change

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit f7339608bb7a1d5a8b3507267d835f19cec1ca6f
Author: jianxzhang <ji...@tencent.com>
AuthorDate: Wed Jan 13 20:20:27 2021 +0800

    add change
---
 tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt b/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
index 83d0ba5..b634af2 100644
--- a/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
+++ b/tubemq-client-twins/tubemq-client-cpp/CMakeLists.txt
@@ -24,7 +24,7 @@ project (TubeMQ)
 
 find_package(Protobuf REQUIRED)
 
-SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Wsign-compare -Wfloat-equal -fno-strict-aliasing -fPIC -DASIO_STANDALONE")
+SET(CMAKE_CXX_FLAGS "-std=c++11 -O2 -g -Wall -Werror -Wno-error=class-memaccess -Wsign-compare -Wfloat-equal -fno-strict-aliasing -fPIC -DASIO_STANDALONE")
 
 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/proto)
 


[incubator-tubemq] 10/29: [TUBEMQ-544]Adjust the LICENSE statement in the client.conf files of Python and C/C++ SDK

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit c7ab12a4cb212eec99b38d256d069a5a1118fda5
Author: gosonzhang <go...@tencent.com>
AuthorDate: Thu Jan 28 14:15:50 2021 +0800

    [TUBEMQ-544]Adjust the LICENSE statement in the client.conf files of Python and C/C++ SDK
---
 .../tubemq-client-cpp/conf/client.conf             | 22 +++++++++++-----------
 .../src/python/tubemq/client.conf                  | 22 +++++++++++-----------
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/tubemq-client-twins/tubemq-client-cpp/conf/client.conf b/tubemq-client-twins/tubemq-client-cpp/conf/client.conf
index 018dd5e..4591d0a 100644
--- a/tubemq-client-twins/tubemq-client-cpp/conf/client.conf
+++ b/tubemq-client-twins/tubemq-client-cpp/conf/client.conf
@@ -1,18 +1,18 @@
 ;
-; Tencent is pleased to support the open source community by making TubeMQ available.
+; 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
 ;
-; Copyright (C) 2012-2019 Tencent. All Rights Reserved.
-;
-; Licensed 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
-;
-; https://opensource.org/licenses/Apache-2.0
+;    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 OF ANY KIND, either express or implied.  See the License for the
-; specific language governing permissions and limitations under the License.
+; 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.
 ;
 
 [TubeMQ]
diff --git a/tubemq-client-twins/tubemq-client-python/src/python/tubemq/client.conf b/tubemq-client-twins/tubemq-client-python/src/python/tubemq/client.conf
index 237927d..e3f38ba 100644
--- a/tubemq-client-twins/tubemq-client-python/src/python/tubemq/client.conf
+++ b/tubemq-client-twins/tubemq-client-python/src/python/tubemq/client.conf
@@ -1,18 +1,18 @@
 ;
-; Tencent is pleased to support the open source community by making TubeMQ available.
+; 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
 ;
-; Copyright (C) 2012-2019 Tencent. All Rights Reserved.
-;
-; Licensed 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
-;
-; https://opensource.org/licenses/Apache-2.0
+;    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 OF ANY KIND, either express or implied.  See the License for the
-; specific language governing permissions and limitations under the License.
+; 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.
 ;
 
 [TubeMQ]


[incubator-tubemq] 25/29: [TUBEMQ-561] Update the CHANGES.md according to the 0.8.0-RC2 changes (#428)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit fdb0bd6ce0ce3769dde1299565968163155f00e6
Author: gosonzhang <46...@qq.com>
AuthorDate: Sun Feb 14 09:49:57 2021 +0800

    [TUBEMQ-561] Update the CHANGES.md according to the 0.8.0-RC2 changes (#428)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 CHANGES.md | 63 ++++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 35 insertions(+), 28 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 43e5034..39a01a8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -26,17 +26,17 @@
 ### IMPROVEMENTS:
 | JIRA  | Summary  | Priority |
 | :---- | :------- | :------- |
-| [TUBEMQ-430](https://issues.apache.org/jira/browse/TUBEMQ-430) | Optimizing the implementation of HTTP API for broke  | Major    |
-| [TUBEMQ-445](https://issues.apache.org/jira/browse/TUBEMQ-445) | Adjust the status check default sleep interval of pullConsumeReadyChkSliceMs  | Major    |
-| [TUBEMQ-448](https://issues.apache.org/jira/browse/TUBEMQ-448) | Add Committer and PPMC operation process  | Major    |
-| [TUBEMQ-449](https://issues.apache.org/jira/browse/TUBEMQ-449) | Adjust Example implementation  | Major    |
+| [TUBEMQ-430](https://issues.apache.org/jira/browse/TUBEMQ-430) | Optimizing the implementation of HTTP API for broke  | Major |
+| [TUBEMQ-445](https://issues.apache.org/jira/browse/TUBEMQ-445) | Adjust the status check default sleep interval of pullConsumeReadyChkSliceMs  | Major |
+| [TUBEMQ-448](https://issues.apache.org/jira/browse/TUBEMQ-448) | Add Committer and PPMC operation process  | Major |
+| [TUBEMQ-449](https://issues.apache.org/jira/browse/TUBEMQ-449) | Adjust Example implementation  | Major |
 | [TUBEMQ-452](https://issues.apache.org/jira/browse/TUBEMQ-452) | Optimize rebalance performance | Major |
 | [TUBEMQ-467](https://issues.apache.org/jira/browse/TUBEMQ-467) | Add WEB APIs of Master and Broker | Major |
 | [TUBEMQ-489](https://issues.apache.org/jira/browse/TUBEMQ-489) | Add the maximum message length parameter setting | Major |
 | [TUBEMQ-495](https://issues.apache.org/jira/browse/TUBEMQ-495) | Code implementation adjustment based on SpotBugs check | Major |
-| [TUBEMQ-511](https://issues.apache.org/jira/browse/TUBEMQ-511) | Replace the conditional operator (?:) with mid()  | Major    |
-| [TUBEMQ-512](https://issues.apache.org/jira/browse/TUBEMQ-512) | Add package length control based on Topic  | Major    |
-| [TUBEMQ-515](https://issues.apache.org/jira/browse/TUBEMQ-515) | Add cluster Topic view web api  | Major    |
+| [TUBEMQ-511](https://issues.apache.org/jira/browse/TUBEMQ-511) | Replace the conditional operator (?:) with mid()  | Major |
+| [TUBEMQ-512](https://issues.apache.org/jira/browse/TUBEMQ-512) | Add package length control based on Topic  | Major |
+| [TUBEMQ-515](https://issues.apache.org/jira/browse/TUBEMQ-515) | Add cluster Topic view web api  | Major |
 
 ### BUG FIXES:
 | JIRA  | Summary  | Priority |
@@ -46,18 +46,22 @@
 | [TUBEMQ-442](https://issues.apache.org/jira/browse/TUBEMQ-442) | Modifying the jvm parameters when the broker starts does not take effect  | Major    |
 | [TUBEMQ-443](https://issues.apache.org/jira/browse/TUBEMQ-443) | TubemqSourceFunction class prints too many logs problem | Major |
 | [TUBEMQ-446](https://issues.apache.org/jira/browse/TUBEMQ-446) | Small bugs fix that do not affect the main logics | Major |
-| [TUBEMQ-450](https://issues.apache.org/jira/browse/TUBEMQ-450) | TubeClientException: Generate producer id failed  | Major    |
+| [TUBEMQ-450](https://issues.apache.org/jira/browse/TUBEMQ-450) | TubeClientException: Generate producer id failed  | Major |
 | [TUBEMQ-453](https://issues.apache.org/jira/browse/TUBEMQ-453) | TubemqSourceFunction class prints too many logs problem | Major |
 | [TUBEMQ-506](https://issues.apache.org/jira/browse/TUBEMQ-506) | cmakelist error | Major |
 | [TUBEMQ-510](https://issues.apache.org/jira/browse/TUBEMQ-510) | Found a bug in MessageProducerExample class | Major |
 | [TUBEMQ-518](https://issues.apache.org/jira/browse/TUBEMQ-518) | fix parameter pass error | Major |
-| [TUBEMQ-526](https://issues.apache.org/jira/browse/TUBEMQ-526) | Adjust the packaging script and version check list, remove the "-WIP" tag  | Major    |
+| [TUBEMQ-526](https://issues.apache.org/jira/browse/TUBEMQ-526) | Adjust the packaging script and version check list, remove the "-WIP" tag | Major |
+| [TUBEMQ-555](https://issues.apache.org/jira/browse/TUBEMQ-555) | short session data can only be written to a specific partition | Major |
+| [TUBEMQ-556](https://issues.apache.org/jira/browse/TUBEMQ-556) | Index value is bigger than the actual number of records | Low |
+
 
 ### TASK:
 | JIRA | Summary | Priority |
 |:---- |:---- | :--- |
-| [TUBEMQ-505](https://issues.apache.org/jira/browse/TUBEMQ-505) | Remove the "WIP" label of the DISCLAIMER file  | Major    |
-| [TUBEMQ-543](https://issues.apache.org/jira/browse/TUBEMQ-543) | Modify the LICENSE statement of multiple files and others  | Major    |
+| [TUBEMQ-505](https://issues.apache.org/jira/browse/TUBEMQ-505) | Remove the "WIP" label of the DISCLAIMER file  | Major |
+| [TUBEMQ-543](https://issues.apache.org/jira/browse/TUBEMQ-543) | Modify the LICENSE statement of multiple files and others  | Major |
+| [TUBEMQ-557](https://issues.apache.org/jira/browse/TUBEMQ-557) | Handle the issues mentioned in the 0.8.0-RC2 review  | Major |
 
 ### SUB-TASK:
 | JIRA  | Summary  | Priority |
@@ -68,30 +72,30 @@
 | [TUBEMQ-435](https://issues.apache.org/jira/browse/TUBEMQ-435) | Create Web field Mapping | Major |
 | [TUBEMQ-436](https://issues.apache.org/jira/browse/TUBEMQ-436) | Adjust Broker's HTTP API implementation | Major |
 | [TUBEMQ-439](https://issues.apache.org/jira/browse/TUBEMQ-439) | Add Cli field Scheme definition | Major |
-| [TUBEMQ-440](https://issues.apache.org/jira/browse/TUBEMQ-440) | Add feature package tube-manager to zip  | Major    |
+| [TUBEMQ-440](https://issues.apache.org/jira/browse/TUBEMQ-440) | Add feature package tube-manager to zip  | Major |
 | [TUBEMQ-444](https://issues.apache.org/jira/browse/TUBEMQ-444) | Add consume and produce Cli commands | Major |
 | [TUBEMQ-447](https://issues.apache.org/jira/browse/TUBEMQ-447) | Add Broker-Admin Cli | Major |
 | [TUBEMQ-451](https://issues.apache.org/jira/browse/TUBEMQ-451) | Replace ConsumeTupleInfo with Tuple2  | Major    |
 | [TUBEMQ-457](https://issues.apache.org/jira/browse/TUBEMQ-457) | There is no need to return StringBuilder in Master.java | Major |
-| [TUBEMQ-463](https://issues.apache.org/jira/browse/TUBEMQ-463) | Adjust Master rebalance process implementation  | Major    |
+| [TUBEMQ-463](https://issues.apache.org/jira/browse/TUBEMQ-463) | Adjust Master rebalance process implementation  | Major |
 | [TUBEMQ-464](https://issues.apache.org/jira/browse/TUBEMQ-464) | Add parameter rebalanceParallel in master.ini | Major |
-| [TUBEMQ-470](https://issues.apache.org/jira/browse/TUBEMQ-470) | Add query API of TopicName and BrokerId collection  | Major    |
+| [TUBEMQ-470](https://issues.apache.org/jira/browse/TUBEMQ-470) | Add query API of TopicName and BrokerId collection  | Major |
 | [TUBEMQ-471](https://issues.apache.org/jira/browse/TUBEMQ-471) | Add query API Introduction of TopicName and BrokerId collection | Major |
-| [TUBEMQ-472](https://issues.apache.org/jira/browse/TUBEMQ-472) | Adjust Broker's AbstractWebHandler class implementation  | Major    |
-| [TUBEMQ-475](https://issues.apache.org/jira/browse/TUBEMQ-475) | add the offset clone api of the consume group  | Major    |
-| [TUBEMQ-482](https://issues.apache.org/jira/browse/TUBEMQ-482) | Add offset query api  | Major    |
-| [TUBEMQ-484](https://issues.apache.org/jira/browse/TUBEMQ-484) | Add query API for topic publication information  | Major    |
-| [TUBEMQ-485](https://issues.apache.org/jira/browse/TUBEMQ-485) | Add the batch setting API of consume group offset  | Major    |
-| [TUBEMQ-486](https://issues.apache.org/jira/browse/TUBEMQ-486) | Add the delete API of consumer group offset  | Major    |
+| [TUBEMQ-472](https://issues.apache.org/jira/browse/TUBEMQ-472) | Adjust Broker's AbstractWebHandler class implementation  | Major |
+| [TUBEMQ-475](https://issues.apache.org/jira/browse/TUBEMQ-475) | add the offset clone api of the consume group  | Major |
+| [TUBEMQ-482](https://issues.apache.org/jira/browse/TUBEMQ-482) | Add offset query api  | Major |
+| [TUBEMQ-484](https://issues.apache.org/jira/browse/TUBEMQ-484) | Add query API for topic publication information  | Major |
+| [TUBEMQ-485](https://issues.apache.org/jira/browse/TUBEMQ-485) | Add the batch setting API of consume group offset  | Major |
+| [TUBEMQ-486](https://issues.apache.org/jira/browse/TUBEMQ-486) | Add the delete API of consumer group offset  | Major |
 | [TUBEMQ-494](https://issues.apache.org/jira/browse/TUBEMQ-494) | Update API interface instruction document | Major |
-| [TUBEMQ-499](https://issues.apache.org/jira/browse/TUBEMQ-499) | Add configure store  | Major    |
-| [TUBEMQ-500](https://issues.apache.org/jira/browse/TUBEMQ-500) | Add setting operate API  | Major    |
-| [TUBEMQ-501](https://issues.apache.org/jira/browse/TUBEMQ-501) | Adjust max message size check logic  | Major    |
-| [TUBEMQ-502](https://issues.apache.org/jira/browse/TUBEMQ-502) | Add setting API interface document  | Major    |
-| [TUBEMQ-504](https://issues.apache.org/jira/browse/TUBEMQ-504) | Adjust the WebMethodMapper class interfaces  | Major    |
-| [TUBEMQ-508](https://issues.apache.org/jira/browse/TUBEMQ-508) | Optimize Broker's PB parameter check processing logic  | Major    |
-| [TUBEMQ-509](https://issues.apache.org/jira/browse/TUBEMQ-509) | Adjust the packet length check when data is loaded  | Major    |
-| [TUBEMQ-522](https://issues.apache.org/jira/browse/TUBEMQ-522) | Add admin_query_cluster_topic_view API document  | Major    |
+| [TUBEMQ-499](https://issues.apache.org/jira/browse/TUBEMQ-499) | Add configure store  | Major |
+| [TUBEMQ-500](https://issues.apache.org/jira/browse/TUBEMQ-500) | Add setting operate API  | Major |
+| [TUBEMQ-501](https://issues.apache.org/jira/browse/TUBEMQ-501) | Adjust max message size check logic  | Major |
+| [TUBEMQ-502](https://issues.apache.org/jira/browse/TUBEMQ-502) | Add setting API interface document  | Major |
+| [TUBEMQ-504](https://issues.apache.org/jira/browse/TUBEMQ-504) | Adjust the WebMethodMapper class interfaces  | Major |
+| [TUBEMQ-508](https://issues.apache.org/jira/browse/TUBEMQ-508) | Optimize Broker's PB parameter check processing logic  | Major |
+| [TUBEMQ-509](https://issues.apache.org/jira/browse/TUBEMQ-509) | Adjust the packet length check when data is loaded  | Major |
+| [TUBEMQ-522](https://issues.apache.org/jira/browse/TUBEMQ-522) | Add admin_query_cluster_topic_view API document  | Major |
 | [TUBEMQ-544](https://issues.apache.org/jira/browse/TUBEMQ-544) | Adjust the LICENSE statement in the client.conf files of Python and C/C++ SDK | Major |
 | [TUBEMQ-546](https://issues.apache.org/jira/browse/TUBEMQ-546) | Restore the original license header of the referenced external source files | Major |
 | [TUBEMQ-547](https://issues.apache.org/jira/browse/TUBEMQ-547) | Recode the implementation of the *Startup.java classes in the Tool package | Major |
@@ -99,6 +103,9 @@
 | [TUBEMQ-549](https://issues.apache.org/jira/browse/TUBEMQ-549) | Handling the problem of compilation failure | Major |
 | [TUBEMQ-550](https://issues.apache.org/jira/browse/TUBEMQ-550) | Adjust LICENSE file content | Major |
 | [TUBEMQ-551](https://issues.apache.org/jira/browse/TUBEMQ-551) | Adjust NOTICE file content | Major |
+| [TUBEMQ-558](https://issues.apache.org/jira/browse/TUBEMQ-558) | Adjust the LICENSE of the file header | Major |
+| [TUBEMQ-559](https://issues.apache.org/jira/browse/TUBEMQ-559) | Update the LICENSE file according to the 0.8.0-RC2 review | Major |
+| [TUBEMQ-560](https://issues.apache.org/jira/browse/TUBEMQ-560) | Remove unprepared modules | Major |
 
 
 ## Release 0.7.0-incubating - Released (as of 2020-11-25)


[incubator-tubemq] 09/29: [TUBEMQ-529] Update CHANGE.md

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 6fa82bff767765b3d6fe923b74d1a0c23fc40dcd
Author: yuanbo <yu...@apache.org>
AuthorDate: Tue Jan 19 14:18:44 2021 +0800

    [TUBEMQ-529] Update CHANGE.md
---
 CHANGES.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGES.md b/CHANGES.md
index 977b738..3e14289 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -56,6 +56,7 @@
 | [TUBEMQ-511](https://issues.apache.org/jira/browse/TUBEMQ-511) | Replace the conditional operator (?:) with mid()  | Major    |
 | [TUBEMQ-512](https://issues.apache.org/jira/browse/TUBEMQ-512) | Add package length control based on Topic  | Major    |
 | [TUBEMQ-515](https://issues.apache.org/jira/browse/TUBEMQ-515) | Add cluster Topic view web api  | Major    |
+| [TUBEMQ-526](https://issues.apache.org/jira/browse/TUBEMQ-526) | Adjust the packaging script and version check list, remove the "-WIP" tag  | Major    |
 
 ### BUG FIXES:
 | JIRA  | Summary  | Priority |


[incubator-tubemq] 21/29: [TUBEMQ-558] Adjust the LICENSE of the file header (#424)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit d3ca3f0ff238851ccec00e216e1958cf5d9d6cd3
Author: gosonzhang <46...@qq.com>
AuthorDate: Mon Feb 8 22:32:18 2021 +0800

    [TUBEMQ-558] Adjust the LICENSE of the file header (#424)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 tubemq-docker/tubemq-all/Dockerfile           | 20 ++++++++++++--------
 tubemq-manager/bin/start-manager.sh           |  8 +++++++-
 tubemq-manager/bin/stop-manager.sh            |  8 +++++++-
 tubemq-manager/conf/logback.xml               | 25 ++++++++++++++-----------
 tubemq-manager/src/main/assembly/assembly.xml | 25 ++++++++++++++-----------
 5 files changed, 54 insertions(+), 32 deletions(-)

diff --git a/tubemq-docker/tubemq-all/Dockerfile b/tubemq-docker/tubemq-all/Dockerfile
index 1f404d3..605d1f1 100644
--- a/tubemq-docker/tubemq-all/Dockerfile
+++ b/tubemq-docker/tubemq-all/Dockerfile
@@ -1,13 +1,17 @@
-# with the License.  You may obtain a copy of the License at
+# 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
+#     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.
+# 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.
 #
 # tubemq depend on zookeeper
 FROM zookeeper:3.4
diff --git a/tubemq-manager/bin/start-manager.sh b/tubemq-manager/bin/start-manager.sh
index 19acbef..a81953d 100755
--- a/tubemq-manager/bin/start-manager.sh
+++ b/tubemq-manager/bin/start-manager.sh
@@ -1,3 +1,8 @@
+#!/bin/bash
+
+#
+# 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
@@ -8,8 +13,9 @@
 # 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 an
+# See the License for the specific language governing permissions and
 # limitations under the License.
+#
 
 base_dir=$(dirname $0)
 
diff --git a/tubemq-manager/bin/stop-manager.sh b/tubemq-manager/bin/stop-manager.sh
index a3b7abd..e26d999 100755
--- a/tubemq-manager/bin/stop-manager.sh
+++ b/tubemq-manager/bin/stop-manager.sh
@@ -1,3 +1,8 @@
+#!/bin/bash
+
+#
+# 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
@@ -8,8 +13,9 @@
 # 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 an
+# See the License for the specific language governing permissions and
 # limitations under the License.
+#
 
 SIGNAL=${SIGNAL:-TERM}
 
diff --git a/tubemq-manager/conf/logback.xml b/tubemq-manager/conf/logback.xml
index 3e4259f..97130b2 100644
--- a/tubemq-manager/conf/logback.xml
+++ b/tubemq-manager/conf/logback.xml
@@ -1,16 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Licensed 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. See accompanying LICENSE file.
+// 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.
 -->
 <configuration>
     <property name="FILE_ERROR_PATTERN"
diff --git a/tubemq-manager/src/main/assembly/assembly.xml b/tubemq-manager/src/main/assembly/assembly.xml
index 82a8b8a..d1ca6ee 100644
--- a/tubemq-manager/src/main/assembly/assembly.xml
+++ b/tubemq-manager/src/main/assembly/assembly.xml
@@ -1,15 +1,18 @@
 <!--
-  Licensed 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. See accompanying LICENSE file.
+// 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.
 -->
 <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


[incubator-tubemq] 05/29: [TUBEMQ-518] fix parameter pass error

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit b130dab28b353b825eee3664a6643ddefeff146d
Author: leno1001 <19...@qq.com>
AuthorDate: Sun Jan 17 11:44:28 2021 +0800

    [TUBEMQ-518] fix parameter pass error
    
    Co-authored-by: 曹显乐 <xi...@vivo.com>
---
 .../java/org/apache/tubemq/server/common/utils/WebParameterUtils.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java
index d4b1e20..27e61e1 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java
@@ -388,7 +388,7 @@ public class WebParameterUtils {
                 return result.success;
             }
             checkIntValueNorms(fieldDef, paramValue,
-                    hasMinVal, minValue, hasMinVal, maxValue, result);
+                    hasMinVal, minValue, hasMaxVal, maxValue, result);
         }
         return result.success;
     }


[incubator-tubemq] 11/29: [TUBEMQ-546]Restore the original license header of the referenced external source files

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit ffb5205bb02fbdf426073906161f61729bdbeb43
Author: gosonzhang <go...@tencent.com>
AuthorDate: Thu Jan 28 16:55:44 2021 +0800

    [TUBEMQ-546]Restore the original license header of the referenced external source files
---
 pom.xml                                            |  5 +++-
 tubemq-client-twins/tubemq-client-cpp/src/any.h    | 21 +----------------
 tubemq-client-twins/tubemq-client-cpp/src/buffer.h | 22 +++---------------
 .../apache/tubemq/corebase/utils/TStringUtils.java | 27 +++++++++++++---------
 4 files changed, 24 insertions(+), 51 deletions(-)

diff --git a/pom.xml b/pom.xml
index bd51de2..a1e5478 100644
--- a/pom.xml
+++ b/pom.xml
@@ -265,7 +265,10 @@
                         <exclude>resources/assets/public/**</exclude>
                         <exclude>DISCLAIMER</exclude>
                         <exclude>tubemq-web/**</exclude>
-
+                        <!-- copy or modify files from other projects -->
+                        <exclude>**/tubemq-client-twins/tubemq-client-cpp/src/any.h</exclude>
+                        <exclude>**/tubemq-client-twins/tubemq-client-cpp/src/buffer.h</exclude>
+                        <exclude>**/tubemq-core/src/corebase/utils/TStringUtils.java</exclude>
                         <exclude>**/tubemq-client-twins/tubemq-client-cpp/third_party/**</exclude>
                     </excludes>
                 </configuration>
diff --git a/tubemq-client-twins/tubemq-client-cpp/src/any.h b/tubemq-client-twins/tubemq-client-cpp/src/any.h
index 4bb2a15..dd6eaa5 100644
--- a/tubemq-client-twins/tubemq-client-cpp/src/any.h
+++ b/tubemq-client-twins/tubemq-client-cpp/src/any.h
@@ -1,24 +1,5 @@
-/**
- * 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.
- */
-
 // Copy from evpp project
-// @see https://github.com/Qihoo360/evpp/blob/master/evpp/any.h
+// @see https://github.com/Qihoo360/evpp/blob/master/evpp/any.h commit version c5038a6
 
 #ifndef TUBEMQ_CLIENT_CPP_SRC_ANY_H_
 #define TUBEMQ_CLIENT_CPP_SRC_ANY_H_
diff --git a/tubemq-client-twins/tubemq-client-cpp/src/buffer.h b/tubemq-client-twins/tubemq-client-cpp/src/buffer.h
index da8c95b..fc8425d 100644
--- a/tubemq-client-twins/tubemq-client-cpp/src/buffer.h
+++ b/tubemq-client-twins/tubemq-client-cpp/src/buffer.h
@@ -1,24 +1,8 @@
-/**
- * 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.
- */
+// Modified from muduo project http://github.com/chenshuo/muduo
+// @see https://github.com/chenshuo/muduo/blob/master/muduo/net/Buffer.h and https://github.com/chenshuo/muduo/blob/master/muduo/net/Buffer.cc
 
 // Modified from evpp
-// @see https://github.com/Qihoo360/evpp/blob/master/evpp/buffer.h
+// @see https://github.com/Qihoo360/evpp/blob/master/evpp/buffer.h, commit version b2535d7
 
 #ifndef _TUBEMQ_BUFFER_H_
 #define _TUBEMQ_BUFFER_H_
diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
index 985dd5d..f99ba52 100644
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
+++ b/tubemq-core/src/main/java/org/apache/tubemq/corebase/utils/TStringUtils.java
@@ -1,13 +1,13 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+/*
+ * Copyright (c) 2002-2012 Alibaba Group Holding Limited.
+ * All rights reserved.
+ *
+ * Licensed 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.
@@ -15,6 +15,12 @@
  * limitations under the License.
  */
 
+/*
+ * Modified from citrus <a href="https://github.com/webx/citrus">citrus Project</a>
+ *   file address: https://github.com/webx/citrus/blob/r3.1.4/common/util/src/
+ *                          main/java/com/alibaba/citrus/util/StringUtil.java
+ */
+
 package org.apache.tubemq.corebase.utils;
 
 import java.io.PrintWriter;
@@ -28,7 +34,6 @@ import org.apache.tubemq.corebase.TokenConstants;
 
 /**
  * Utility to String operations.
- * Modified version of <a href="https://github.com/webx/citrus">citrus Project</a>
  */
 public class TStringUtils {
 


[incubator-tubemq] 07/29: [TUBEMQ-517] Add 0.8.0 version release modification to CHANGES.md (#399)

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 71dfa8461721aead914b530ba946a76df207de43
Author: Yuanbo Liu <yu...@apache.org>
AuthorDate: Mon Jan 18 17:22:26 2021 +0800

    [TUBEMQ-517] Add 0.8.0 version release modification to CHANGES.md (#399)
    
    * [TUBEMQ-517] Add 0.8.0 version release modification to CHANGES.md
---
 CHANGES.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/CHANGES.md b/CHANGES.md
index 33bfc4d..977b738 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -21,6 +21,73 @@
 # of release header or remove the below marker. This file is generated.
 # DO NOT REMOVE THIS MARKER; FOR INTERPOLATING CHANGES!-->
 
+## Release 0.8.0-incubating - Released (as of 2021-01-18)
+
+### IMPROVEMENTS:
+
+| JIRA  | Summary  | Priority |
+| :---- | :------- | :------- |
+| [TUBEMQ-430](https://issues.apache.org/jira/browse/TUBEMQ-430) | Optimizing the implementation of HTTP API for broke  | Major    |
+| [TUBEMQ-433](https://issues.apache.org/jira/browse/TUBEMQ-433) | add tubemq perf-consumer/producer scripts  | Major    |
+| [TUBEMQ-440](https://issues.apache.org/jira/browse/TUBEMQ-440) | Add feature package tube-manager to zip  | Major    |
+| [TUBEMQ-442](https://issues.apache.org/jira/browse/TUBEMQ-442) | Modifying the jvm parameters when the broker starts does not take effect  | Major    |
+| [TUBEMQ-444](https://issues.apache.org/jira/browse/TUBEMQ-444) | Add consume and produce Cli commands  | Major    |
+| [TUBEMQ-445](https://issues.apache.org/jira/browse/TUBEMQ-445) | Adjust the status check default sleep interval of pullConsumeReadyChkSliceMs  | Major    |
+| [TUBEMQ-447](https://issues.apache.org/jira/browse/TUBEMQ-447) | Add Broker-Admin Cli  | Major    |
+| [TUBEMQ-449](https://issues.apache.org/jira/browse/TUBEMQ-449) | Adjust Example implementation  | Major    |
+| [TUBEMQ-450](https://issues.apache.org/jira/browse/TUBEMQ-450) | TubeClientException: Generate producer id failed  | Major    |
+| [TUBEMQ-451](https://issues.apache.org/jira/browse/TUBEMQ-451) | Replace ConsumeTupleInfo with Tuple2  | Major    |
+| [TUBEMQ-463](https://issues.apache.org/jira/browse/TUBEMQ-463) | Adjust Master rebalance process implementation  | Major    |
+| [TUBEMQ-470](https://issues.apache.org/jira/browse/TUBEMQ-470) | Add query API of TopicName and BrokerId collection  | Major    |
+| [TUBEMQ-472](https://issues.apache.org/jira/browse/TUBEMQ-472) | Adjust Broker's AbstractWebHandler class implementation  | Major    |
+| [TUBEMQ-475](https://issues.apache.org/jira/browse/TUBEMQ-475) | add the offset clone api of the consume group  | Major    |
+| [TUBEMQ-482](https://issues.apache.org/jira/browse/TUBEMQ-482) | Add offset query api  | Major    |
+| [TUBEMQ-484](https://issues.apache.org/jira/browse/TUBEMQ-484) | Add query API for topic publication information  | Major    |
+| [TUBEMQ-485](https://issues.apache.org/jira/browse/TUBEMQ-485) | Add the batch setting API of consume group offset  | Major    |
+| [TUBEMQ-486](https://issues.apache.org/jira/browse/TUBEMQ-486) | Add the delete API of consumer group offset  | Major    |
+| [TUBEMQ-499](https://issues.apache.org/jira/browse/TUBEMQ-499) | Add configure store  | Major    |
+| [TUBEMQ-500](https://issues.apache.org/jira/browse/TUBEMQ-500) | Add setting operate API  | Major    |
+| [TUBEMQ-501](https://issues.apache.org/jira/browse/TUBEMQ-501) | Adjust max message size check logic  | Major    |
+| [TUBEMQ-502](https://issues.apache.org/jira/browse/TUBEMQ-502) | Add setting API interface document  | Major    |
+| [TUBEMQ-504](https://issues.apache.org/jira/browse/TUBEMQ-504) | Adjust the WebMethodMapper class interfaces  | Major    |
+| [TUBEMQ-505](https://issues.apache.org/jira/browse/TUBEMQ-505) | Remove the "WIP" label of the DISCLAIMER file  | Major    |
+| [TUBEMQ-508](https://issues.apache.org/jira/browse/TUBEMQ-508) | Optimize Broker's PB parameter check processing logic  | Major    |
+| [TUBEMQ-509](https://issues.apache.org/jira/browse/TUBEMQ-509) | Adjust the packet length check when data is loaded  | Major    |
+| [TUBEMQ-511](https://issues.apache.org/jira/browse/TUBEMQ-511) | Replace the conditional operator (?:) with mid()  | Major    |
+| [TUBEMQ-512](https://issues.apache.org/jira/browse/TUBEMQ-512) | Add package length control based on Topic  | Major    |
+| [TUBEMQ-515](https://issues.apache.org/jira/browse/TUBEMQ-515) | Add cluster Topic view web api  | Major    |
+
+### BUG FIXES:
+| JIRA  | Summary  | Priority |
+| :---- | :------- | :------- |
+| [TUBEMQ-441](https://issues.apache.org/jira/browse/TUBEMQ-441) | An error occurred when using the Tubemq class to create a sink table | Major |
+| [TUBEMQ-437](https://issues.apache.org/jira/browse/TUBEMQ-437) | Fix tubemq table source sink factory instance creating problem | Major |
+| [TUBEMQ-443](https://issues.apache.org/jira/browse/TUBEMQ-443) | TubemqSourceFunction class prints too many logs problem | Major |
+| [TUBEMQ-446](https://issues.apache.org/jira/browse/TUBEMQ-446) | Small bugs fix that do not affect the main logics | Major |
+| [TUBEMQ-453](https://issues.apache.org/jira/browse/TUBEMQ-453) | TubemqSourceFunction class prints too many logs problem | Major |
+| [TUBEMQ-457](https://issues.apache.org/jira/browse/TUBEMQ-457) | There is no need to return StringBuilder in Master.java | Major |
+| [TUBEMQ-495](https://issues.apache.org/jira/browse/TUBEMQ-495) | Code implementation adjustment based on SpotBugs check | Major |
+| [TUBEMQ-506](https://issues.apache.org/jira/browse/TUBEMQ-506) | cmakelist error | Major |
+| [TUBEMQ-510](https://issues.apache.org/jira/browse/TUBEMQ-510) | Found a bug in MessageProducerExample class | Major |
+| [TUBEMQ-518](https://issues.apache.org/jira/browse/TUBEMQ-518) | fix parameter pass error | Major |
+
+### SUB-TASK:
+
+| JIRA  | Summary  | Priority |
+| :---- | :------- | :------- |
+| [TUBEMQ-433](https://issues.apache.org/jira/browse/TUBEMQ-433) | add tubemq perf-consumer/producer scripts | Major |
+| [TUBEMQ-434](https://issues.apache.org/jira/browse/TUBEMQ-434) | Adjust Broker API mapping | Major |
+| [TUBEMQ-435](https://issues.apache.org/jira/browse/TUBEMQ-435) | Create Web field Mapping | Major |
+| [TUBEMQ-436](https://issues.apache.org/jira/browse/TUBEMQ-436) | Adjust Broker's HTTP API implementation | Major |
+| [TUBEMQ-439](https://issues.apache.org/jira/browse/TUBEMQ-439) | Add Cli field Scheme definition | Major |
+| [TUBEMQ-444](https://issues.apache.org/jira/browse/TUBEMQ-444) | Add consume and produce Cli commands | Major |
+| [TUBEMQ-447](https://issues.apache.org/jira/browse/TUBEMQ-447) | Add Broker-Admin Cli | Major |
+| [TUBEMQ-452](https://issues.apache.org/jira/browse/TUBEMQ-452) | Optimize rebalance performance | Major |
+| [TUBEMQ-464](https://issues.apache.org/jira/browse/TUBEMQ-464) | Add parameter rebalanceParallel in master.ini | Major |
+| [TUBEMQ-467](https://issues.apache.org/jira/browse/TUBEMQ-467) | Add WEB APIs of Master and Broker | Major |
+| [TUBEMQ-471](https://issues.apache.org/jira/browse/TUBEMQ-471) | Add query API Introduction of TopicName and BrokerId collection | Major |
+| [TUBEMQ-494](https://issues.apache.org/jira/browse/TUBEMQ-494) | Update API interface instruction document | Major |
+
 ## Release 0.7.0-incubating - Released (as of 2020-11-25)
 
 ### New Features:


[incubator-tubemq] 06/29: [TUBEMQ-515]Add cluster Topic view web api

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit f25db3019f374189b5012534843d5166d9733258
Author: gosonzhang <go...@tencent.com>
AuthorDate: Sat Jan 16 17:47:22 2021 +0800

    [TUBEMQ-515]Add cluster Topic view web api
---
 resources/assets/scripts/topicList.js              |   8 +-
 .../server/common/utils/WebParameterUtils.java     |  19 ++++
 .../web/handler/WebBrokerTopicConfHandler.java     |  33 ++----
 .../master/web/handler/WebMasterInfoHandler.java   | 115 ++++++++++++++++++++-
 4 files changed, 146 insertions(+), 29 deletions(-)

diff --git a/resources/assets/scripts/topicList.js b/resources/assets/scripts/topicList.js
index b755a94..7dc000a 100644
--- a/resources/assets/scripts/topicList.js
+++ b/resources/assets/scripts/topicList.js
@@ -102,7 +102,7 @@
                 'false': '否',
                 '-': '-'
             };
-            var url = G_CONFIG.HOST + "?type=op_query&method=admin_query_topic_info&" + $.param(
+            var url = G_CONFIG.HOST + "?type=op_query&method=admin_query_cluster_topic_view&" + $.param(
                     opts);
 
             if (!this.$topicListDataTable) {
@@ -126,7 +126,7 @@
                             return html;
                         }
                     }, {
-                        "data": "infoCount"
+                        "data": "totalCfgBrokerCnt"
                     }, {
                         "data": "totalCfgNumPart"
                     }, {
@@ -166,13 +166,13 @@
                                 + '"><input type="checkbox" checked></span>';
                         }
                     }, {
-                        "data": "authData",
+                        "data": "enableAuthControl",
                         "orderable": false,
                         "render": function (data,
                                             type,
                                             full,
                                             meta) {
-                            var checked = data.enableAuthControl
+                            var checked = data
                             === true
                                 ? ' checked'
                                 : '';
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java
index 27e61e1..161966d 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/WebParameterUtils.java
@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.TokenConstants;
 import org.apache.tubemq.corebase.utils.TStringUtils;
+import org.apache.tubemq.corebase.utils.Tuple2;
 import org.apache.tubemq.server.broker.utils.DataStoreUtils;
 import org.apache.tubemq.server.common.TServerConstants;
 import org.apache.tubemq.server.common.TStatusConstants;
@@ -1401,6 +1402,24 @@ public class WebParameterUtils {
         return strManageStatus;
     }
 
+    public static Tuple2<Boolean, Boolean> getPubSubStatusByManageStatus(int manageStatus) {
+        boolean isAcceptPublish = false;
+        boolean isAcceptSubscribe = false;
+        if (manageStatus >= TStatusConstants.STATUS_MANAGE_ONLINE) {
+            if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE) {
+                isAcceptPublish = true;
+                isAcceptSubscribe = true;
+            } else if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE_NOT_WRITE) {
+                isAcceptPublish = false;
+                isAcceptSubscribe = true;
+            } else if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE_NOT_READ) {
+                isAcceptPublish = true;
+                isAcceptSubscribe = false;
+            }
+        }
+        return new Tuple2<>(isAcceptPublish, isAcceptSubscribe);
+    }
+
     public static String date2yyyyMMddHHmmss(Date date) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
         return sdf.format(date);
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java
index 9a4cf04..74a4ed0 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java
@@ -33,6 +33,7 @@ import org.apache.tubemq.corebase.cluster.BrokerInfo;
 import org.apache.tubemq.corebase.cluster.TopicInfo;
 import org.apache.tubemq.corebase.utils.SettingValidUtils;
 import org.apache.tubemq.corebase.utils.TStringUtils;
+import org.apache.tubemq.corebase.utils.Tuple2;
 import org.apache.tubemq.server.common.TServerConstants;
 import org.apache.tubemq.server.common.TStatusConstants;
 import org.apache.tubemq.server.common.fielddef.WebFieldDef;
@@ -628,18 +629,10 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                     if (brokerConfEntity != null) {
                         int manageStatus = brokerConfEntity.getManageStatus();
                         strManageStatus = WebParameterUtils.getBrokerManageStatusStr(manageStatus);
-                        if (manageStatus >= TStatusConstants.STATUS_MANAGE_ONLINE) {
-                            if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE) {
-                                isAcceptPublish = true;
-                                isAcceptSubscribe = true;
-                            } else if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE_NOT_WRITE) {
-                                isAcceptPublish = false;
-                                isAcceptSubscribe = true;
-                            } else if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE_NOT_READ) {
-                                isAcceptPublish = true;
-                                isAcceptSubscribe = false;
-                            }
-                        }
+                        Tuple2<Boolean, Boolean> pubSubStatus =
+                                WebParameterUtils.getPubSubStatusByManageStatus(manageStatus);
+                        isAcceptPublish = pubSubStatus.getF0();
+                        isAcceptSubscribe = pubSubStatus.getF1();
                     }
                     BrokerInfo broker =
                             new BrokerInfo(entity.getBrokerId(), entity.getBrokerIp(), entity.getBrokerPort());
@@ -1243,18 +1236,10 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                 if (brokerConfEntity != null) {
                     int manageStatus = brokerConfEntity.getManageStatus();
                     strManageStatus = WebParameterUtils.getBrokerManageStatusStr(manageStatus);
-                    if (manageStatus >= TStatusConstants.STATUS_MANAGE_ONLINE) {
-                        if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE) {
-                            isAcceptPublish = true;
-                            isAcceptSubscribe = true;
-                        } else if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE_NOT_WRITE) {
-                            isAcceptPublish = false;
-                            isAcceptSubscribe = true;
-                        } else if (manageStatus == TStatusConstants.STATUS_MANAGE_ONLINE_NOT_READ) {
-                            isAcceptPublish = true;
-                            isAcceptSubscribe = false;
-                        }
-                    }
+                    Tuple2<Boolean, Boolean> pubSubStatus =
+                            WebParameterUtils.getPubSubStatusByManageStatus(manageStatus);
+                    isAcceptPublish = pubSubStatus.getF0();
+                    isAcceptSubscribe = pubSubStatus.getF1();
                 }
                 BrokerSyncStatusInfo brokerSyncStatusInfo =
                         brokerSyncStatusInfoMap.get(brokerEntity.getBrokerId());
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebMasterInfoHandler.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebMasterInfoHandler.java
index f2fece8..0e58fbb 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebMasterInfoHandler.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebMasterInfoHandler.java
@@ -19,14 +19,25 @@ package org.apache.tubemq.server.master.web.handler;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
 import javax.servlet.http.HttpServletRequest;
 import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.corebase.cluster.BrokerInfo;
+import org.apache.tubemq.corebase.cluster.TopicInfo;
 import org.apache.tubemq.corebase.utils.SettingValidUtils;
+import org.apache.tubemq.corebase.utils.Tuple2;
 import org.apache.tubemq.server.common.fielddef.WebFieldDef;
 import org.apache.tubemq.server.common.utils.ProcessResult;
 import org.apache.tubemq.server.common.utils.WebParameterUtils;
 import org.apache.tubemq.server.master.TMaster;
+import org.apache.tubemq.server.master.bdbstore.bdbentitys.BdbBrokerConfEntity;
 import org.apache.tubemq.server.master.bdbstore.bdbentitys.BdbClusterSettingEntity;
+import org.apache.tubemq.server.master.bdbstore.bdbentitys.BdbTopicAuthControlEntity;
+import org.apache.tubemq.server.master.bdbstore.bdbentitys.BdbTopicConfEntity;
+import org.apache.tubemq.server.master.nodemanage.nodebroker.TopicPSInfoManager;
 import org.apache.tubemq.server.master.web.model.ClusterGroupVO;
 import org.apache.tubemq.server.master.web.model.ClusterNodeVO;
 
@@ -51,6 +62,9 @@ public class WebMasterInfoHandler extends AbstractWebHandler {
                 "getGroupAddressStrInfo");
         registerQueryWebMethod("admin_query_cluster_default_setting",
                 "adminQueryClusterDefSetting");
+        registerQueryWebMethod("admin_query_cluster_topic_view",
+                "adminQueryClusterTopicView");
+
         // register modify method
         registerModifyWebMethod("admin_transfer_current_master",
                 "transferCurrentMaster");
@@ -210,7 +224,106 @@ public class WebMasterInfoHandler extends AbstractWebHandler {
         return sBuilder;
     }
 
-
+    /**
+     * Query cluster topic overall view
+     *
+     * @param req
+     * @return
+     */
+    public StringBuilder adminQueryClusterTopicView(HttpServletRequest req) {
+        ProcessResult result = new ProcessResult();
+        StringBuilder sBuilder = new StringBuilder(512);
+        // check and get brokerId field
+        if (!WebParameterUtils.getIntParamValue(req,
+                WebFieldDef.COMPSBROKERID, false, result)) {
+            WebParameterUtils.buildFailResult(sBuilder, result.errInfo);
+            return sBuilder;
+        }
+        Set<Integer> brokerIds = (Set<Integer>) result.retData1;
+        // check and get topicName field
+        if (!WebParameterUtils.getStringParamValue(req,
+                WebFieldDef.COMPSTOPICNAME, false, null, result)) {
+            WebParameterUtils.buildFailResult(sBuilder, result.errInfo);
+            return sBuilder;
+        }
+        Set<String> topicNameSet = (Set<String>) result.retData1;
+        // query topic configure info
+        ConcurrentHashMap<String, List<BdbTopicConfEntity>> topicConfigMap =
+                brokerConfManager.getBdbTopicEntityMap(null);
+        TopicPSInfoManager topicPSInfoManager = master.getTopicPSInfoManager();
+        int totalCount = 0;
+        int brokerCount = 0;
+        int totalCfgNumPartCount = 0;
+        int totalRunNumPartCount = 0;
+        boolean isSrvAcceptPublish = false;
+        boolean isSrvAcceptSubscribe = false;
+        boolean isAcceptPublish = false;
+        boolean isAcceptSubscribe = false;
+        boolean enableAuthControl = false;
+        sBuilder.append("{\"result\":true,\"errCode\":0,\"errMsg\":\"OK\",\"data\":[");
+        for (Map.Entry<String, List<BdbTopicConfEntity>> entry : topicConfigMap.entrySet()) {
+            if (!topicNameSet.isEmpty() && !topicNameSet.contains(entry.getKey())) {
+                continue;
+            }
+            if (totalCount++ > 0) {
+                sBuilder.append(",");
+            }
+            brokerCount = 0;
+            totalCfgNumPartCount = 0;
+            totalRunNumPartCount = 0;
+            isSrvAcceptPublish = false;
+            isSrvAcceptSubscribe = false;
+            enableAuthControl = false;
+            isAcceptPublish = false;
+            isAcceptSubscribe = false;
+            for (BdbTopicConfEntity entity : entry.getValue()) {
+                if ((!brokerIds.isEmpty()) && (!brokerIds.contains(entity.getBrokerId()))) {
+                    continue;
+                }
+                brokerCount++;
+                totalCfgNumPartCount += entity.getNumPartitions() * entity.getNumTopicStores();
+                BdbBrokerConfEntity brokerConfEntity =
+                        brokerConfManager.getBrokerDefaultConfigStoreInfo(entity.getBrokerId());
+                if (brokerConfEntity != null) {
+                    Tuple2<Boolean, Boolean> pubSubStatus =
+                            WebParameterUtils.getPubSubStatusByManageStatus(
+                                    brokerConfEntity.getManageStatus());
+                    isAcceptPublish = pubSubStatus.getF0();
+                    isAcceptSubscribe = pubSubStatus.getF1();
+                }
+                BrokerInfo broker =
+                        new BrokerInfo(entity.getBrokerId(),
+                                entity.getBrokerIp(), entity.getBrokerPort());
+                TopicInfo topicInfo = topicPSInfoManager.getTopicInfo(
+                        entity.getTopicName(), broker);
+                if (topicInfo != null) {
+                    if (isAcceptPublish && topicInfo.isAcceptPublish()) {
+                        isSrvAcceptPublish = true;
+                    }
+                    if (isAcceptSubscribe && topicInfo.isAcceptSubscribe()) {
+                        isSrvAcceptSubscribe = true;
+                    }
+                    totalRunNumPartCount +=
+                            topicInfo.getPartitionNum() * topicInfo.getTopicStoreNum();
+                }
+            }
+            BdbTopicAuthControlEntity authEntity =
+                    brokerConfManager.getBdbEnableAuthControlByTopicName(entry.getKey());
+            if (authEntity != null) {
+                enableAuthControl = authEntity.isEnableAuthControl();
+            }
+            sBuilder.append("{\"topicName\":\"").append(entry.getKey())
+                    .append("\",\"totalCfgBrokerCnt\":").append(brokerCount)
+                    .append(",\"totalCfgNumPart\":").append(totalCfgNumPartCount)
+                    .append(",\"totalRunNumPartCount\":").append(totalRunNumPartCount)
+                    .append(",\"isSrvAcceptPublish\":").append(isSrvAcceptPublish)
+                    .append(",\"isSrvAcceptSubscribe\":").append(isSrvAcceptSubscribe)
+                    .append(",\"enableAuthControl\":").append(enableAuthControl)
+                    .append("}");
+        }
+        sBuilder.append("],\"dataCount\":").append(totalCount).append("}");
+        return sBuilder;
+    }
 
 
 }


[incubator-tubemq] 16/29: [TUBEMQ-548] Handle the LICENSE authorization of font files in the resources

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit 35c0b45448d2f28ee64bcdf23ac3e82983b4299c
Author: gosonzhang <go...@tencent.com>
AuthorDate: Fri Jan 29 16:24:31 2021 +0800

    [TUBEMQ-548] Handle the LICENSE authorization of font files in the resources
    
    Co-authored-by: zakwu <za...@apache.org>
---
 resources/assets/public/css/fonts/icon.eot  | Bin 2340 -> 0 bytes
 resources/assets/public/css/fonts/icon.svg  |  16 ++++++++++++++++
 resources/assets/public/css/fonts/icon.ttf  | Bin 2188 -> 0 bytes
 resources/assets/public/css/fonts/icon.woff | Bin 2264 -> 0 bytes
 resources/assets/public/css/style.css       |   3 +--
 5 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/resources/assets/public/css/fonts/icon.eot b/resources/assets/public/css/fonts/icon.eot
deleted file mode 100644
index 0ae1d23..0000000
Binary files a/resources/assets/public/css/fonts/icon.eot and /dev/null differ
diff --git a/resources/assets/public/css/fonts/icon.svg b/resources/assets/public/css/fonts/icon.svg
index 953921f..5b050b8 100644
--- a/resources/assets/public/css/fonts/icon.svg
+++ b/resources/assets/public/css/fonts/icon.svg
@@ -1,4 +1,20 @@
 <?xml version="1.0" standalone="no"?>
+<!--
+  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
+  <p>
+  http://www.apache.org/licenses/LICENSE-2.0
+  <p>
+  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.
+-->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg">
     <metadata>Generated by IcoMoon</metadata>
diff --git a/resources/assets/public/css/fonts/icon.ttf b/resources/assets/public/css/fonts/icon.ttf
deleted file mode 100644
index c74e16b..0000000
Binary files a/resources/assets/public/css/fonts/icon.ttf and /dev/null differ
diff --git a/resources/assets/public/css/fonts/icon.woff b/resources/assets/public/css/fonts/icon.woff
deleted file mode 100644
index 2f388d2..0000000
Binary files a/resources/assets/public/css/fonts/icon.woff and /dev/null differ
diff --git a/resources/assets/public/css/style.css b/resources/assets/public/css/style.css
index 8b4d292..27540a0 100644
--- a/resources/assets/public/css/style.css
+++ b/resources/assets/public/css/style.css
@@ -1344,8 +1344,7 @@ input[type="text"].expand {
 
 @font-face {
     font-family: 'icon';
-    src: url("fonts/icon.eot");
-    src: url("fonts/icon.eot#iefix") format("embedded-opentype"), url("fonts/icon.ttf") format("truetype"), url("fonts/icon.woff") format("woff"), url("fonts/icon.svg#icon") format("svg");
+    src: url("fonts/icon.svg#icon") format("svg");
     font-weight: normal;
     font-style: normal;
 }


[incubator-tubemq] 15/29: [TUBEMQ-550] Adjust LICENSE file content

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit ada8bed8fadd7ef42742b15dfb4271b81b062bba
Author: gosonzhang <go...@tencent.com>
AuthorDate: Fri Jan 29 15:14:34 2021 +0800

    [TUBEMQ-550] Adjust LICENSE file content
---
 LICENSE | 1 +
 1 file changed, 1 insertion(+)

diff --git a/LICENSE b/LICENSE
index e34b43b..74ba1b1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -355,6 +355,7 @@ The following components are provided under the Apache 2.0 License.
  License : https://github.com/apache/pulsar/blob/master/LICENSE
 
 3.6 resources/assets/public/css/style.css
+    resources/assets/public/css/ie.css
  Source  : openmct v0.9.0
  License : https://gitee.com/ford25v6/openmct/blob/v0.9.0/LICENSES.md
 


[incubator-tubemq] 04/29: [TUBEMQ-512] Add package length control based on Topic

Posted by yu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

yuanbo pushed a commit to branch TUBEMQ-469
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git

commit f6ce2be685859d777e34982dafa2eab83b808f61
Author: gosonzhang <go...@tencent.com>
AuthorDate: Fri Jan 15 17:38:25 2021 +0800

    [TUBEMQ-512] Add package length control based on Topic
---
 .../tubemq/server/broker/BrokerServiceServer.java  | 12 +++---
 .../broker/metadata/ClusterConfigHolder.java       | 25 ++++++++-----
 .../server/broker/metadata/TopicMetadata.java      | 43 +++++++++++++++++++++-
 .../server/broker/msgstore/MessageStore.java       | 14 ++++---
 .../tubemq/server/common/TServerConstants.java     |  1 +
 .../server/common/paramcheck/PBParameterUtils.java |  2 +-
 .../bdbstore/bdbentitys/BdbTopicConfEntity.java    | 18 +++++++++
 .../nodemanage/nodebroker/BrokerConfManager.java   |  6 +++
 .../nodebroker/BrokerSyncStatusInfo.java           | 15 ++++++++
 .../web/handler/WebBrokerTopicConfHandler.java     | 43 ++++++++++++++++++++--
 10 files changed, 153 insertions(+), 26 deletions(-)

diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java
index c9cfba4..a95fa09 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java
@@ -55,8 +55,8 @@ import org.apache.tubemq.corerpc.RpcConstants;
 import org.apache.tubemq.corerpc.service.BrokerReadService;
 import org.apache.tubemq.corerpc.service.BrokerWriteService;
 import org.apache.tubemq.server.Server;
-import org.apache.tubemq.server.broker.metadata.ClusterConfigHolder;
 import org.apache.tubemq.server.broker.metadata.MetadataManager;
+import org.apache.tubemq.server.broker.metadata.TopicMetadata;
 import org.apache.tubemq.server.broker.msgstore.MessageStore;
 import org.apache.tubemq.server.broker.msgstore.MessageStoreManager;
 import org.apache.tubemq.server.broker.msgstore.disk.GetMessageResult;
@@ -621,7 +621,8 @@ public class BrokerServiceServer implements BrokerReadService, BrokerWriteServic
             builder.setErrMsg(result.errInfo);
             return builder.build();
         }
-        final String topicName = (String) result.retData1;
+        final TopicMetadata topicMetadata = (TopicMetadata) result.retData1;
+        final String topicName = topicMetadata.getTopic();
         String msgType = null;
         int msgTypeCode = -1;
         if (TStringUtils.isNotBlank(request.getMsgType())) {
@@ -635,10 +636,10 @@ public class BrokerServiceServer implements BrokerReadService, BrokerWriteServic
             builder.setErrMsg("data length is zero!");
             return builder.build();
         }
-        if (dataLength > ClusterConfigHolder.getMaxMsgSize()) {
+        if (dataLength > topicMetadata.getMaxMsgSize()) {
             builder.setErrCode(TErrCodeConstants.BAD_REQUEST);
             builder.setErrMsg(strBuffer.append("data length over max length, allowed max length is ")
-                    .append(ClusterConfigHolder.getMaxMsgSize())
+                    .append(topicMetadata.getMaxMsgSize())
                     .append(", data length is ").append(dataLength).toString());
             return builder.build();
         }
@@ -1137,7 +1138,8 @@ public class BrokerServiceServer implements BrokerReadService, BrokerWriteServic
             builder.setErrMsg(result.errInfo);
             return builder.build();
         }
-        final String topicName = (String) result.retData1;
+        final TopicMetadata topicMetadata = (TopicMetadata) result.retData1;
+        final String topicName = topicMetadata.getTopic();
         String partStr = getPartStr(groupName, topicName, partitionId);
         ConsumerNodeInfo consumerNodeInfo = consumerRegisterMap.get(partStr);
         if (consumerNodeInfo == null) {
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/ClusterConfigHolder.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/ClusterConfigHolder.java
index 1b370d5..7d89dba 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/ClusterConfigHolder.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/ClusterConfigHolder.java
@@ -22,7 +22,7 @@ import java.util.concurrent.atomic.AtomicLong;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.protobuf.generated.ClientMaster;
 import org.apache.tubemq.corebase.utils.MixedUtils;
-
+import org.apache.tubemq.corebase.utils.Tuple2;
 
 
 public class ClusterConfigHolder {
@@ -46,14 +46,11 @@ public class ClusterConfigHolder {
         if (configId.get() != clusterConfig.getConfigId()) {
             configId.set(clusterConfig.getConfigId());
             if (clusterConfig.hasMaxMsgSize()) {
-                int tmpMaxSize = MixedUtils.mid(clusterConfig.getMaxMsgSize(),
-                        TBaseConstants.META_MAX_MESSAGE_DATA_SIZE,
-                        TBaseConstants.META_MAX_MESSAGE_DATA_SIZE_UPPER_LIMIT)
-                        + TBaseConstants.META_MAX_MESSAGE_HEADER_SIZE;
-                if (tmpMaxSize != maxMsgSize.get()) {
-                    maxMsgSize.set(tmpMaxSize);
-                    minMemCacheSize.set(tmpMaxSize +
-                            (tmpMaxSize % 4 + 1) * TBaseConstants.META_MESSAGE_SIZE_ADJUST);
+                Tuple2<Integer, Integer> calcResult =
+                        calcMaxMsgSize(clusterConfig.getMaxMsgSize());
+                if (calcResult.getF0() != maxMsgSize.get()) {
+                    maxMsgSize.set(calcResult.getF0());
+                    minMemCacheSize.set(calcResult.getF1());
                 }
             }
         }
@@ -71,4 +68,14 @@ public class ClusterConfigHolder {
         return minMemCacheSize.get();
     }
 
+    public static Tuple2<Integer, Integer> calcMaxMsgSize(int maxMsgSize) {
+        int tmpMaxSize = MixedUtils.mid(maxMsgSize,
+                TBaseConstants.META_MAX_MESSAGE_DATA_SIZE,
+                TBaseConstants.META_MAX_MESSAGE_DATA_SIZE_UPPER_LIMIT)
+                + TBaseConstants.META_MAX_MESSAGE_HEADER_SIZE;
+        int tmpMinMemCacheSize = tmpMaxSize +
+                (tmpMaxSize % 4 + 1) * TBaseConstants.META_MESSAGE_SIZE_ADJUST;
+        return new Tuple2<>(tmpMaxSize, tmpMinMemCacheSize);
+    }
+
 }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/TopicMetadata.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/TopicMetadata.java
index 800254b..6e47d63 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/TopicMetadata.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/metadata/TopicMetadata.java
@@ -25,6 +25,7 @@ import java.util.Set;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.TokenConstants;
 import org.apache.tubemq.corebase.utils.TStringUtils;
+import org.apache.tubemq.corebase.utils.Tuple2;
 import org.apache.tubemq.server.common.TStatusConstants;
 
 
@@ -62,6 +63,10 @@ public class TopicMetadata {
     private int memCacheMsgCnt = 5 * 1024;
     // the max interval(milliseconds) that topic's memory cache will flush to disk.
     private int memCacheFlushIntvl = 20000;
+    // the allowed max message size
+    private int maxMsgSize = TBaseConstants.META_VALUE_UNDEFINED;
+    // the allowed min memory cache size
+    private int minMemCacheSize = TBaseConstants.META_VALUE_UNDEFINED;
 
     /***
      * Build TopicMetadata from brokerDefMetadata(default config) and topicMetaConfInfo(custom config).
@@ -141,6 +146,17 @@ public class TopicMetadata {
         } else {
             this.memCacheFlushIntvl = Integer.parseInt(topicConfInfoArr[13]);
         }
+        this.maxMsgSize = ClusterConfigHolder.getMaxMsgSize();
+        this.minMemCacheSize = ClusterConfigHolder.getMinMemCacheSize();
+        if (topicConfInfoArr.length > 14) {
+            if (TStringUtils.isNotBlank(topicConfInfoArr[14])) {
+                int maxMsgSize = Integer.parseInt(topicConfInfoArr[14]);
+                Tuple2<Integer, Integer> calcResult =
+                        ClusterConfigHolder.calcMaxMsgSize(maxMsgSize);
+                this.maxMsgSize = calcResult.getF0();
+                this.minMemCacheSize = calcResult.getF1();
+            }
+        }
     }
 
     private TopicMetadata(String topic, int unflushThreshold,
@@ -149,7 +165,8 @@ public class TopicMetadata {
                           int numPartitions, boolean acceptPublish,
                           boolean acceptSubscribe, int statusId,
                           int numTopicStores, int memCacheMsgSize,
-                          int memCacheMsgCnt, int memCacheFlushIntvl) {
+                          int memCacheMsgCnt, int memCacheFlushIntvl,
+                          int maxMsgSize, int minMemCacheSize) {
         this.topic = topic;
         this.unflushThreshold = unflushThreshold;
         this.unflushInterval = unflushInterval;
@@ -165,6 +182,8 @@ public class TopicMetadata {
         this.memCacheMsgSize = memCacheMsgSize;
         this.memCacheMsgCnt = memCacheMsgCnt;
         this.memCacheFlushIntvl = memCacheFlushIntvl;
+        this.maxMsgSize = maxMsgSize;
+        this.minMemCacheSize = minMemCacheSize;
     }
 
     @Override
@@ -175,7 +194,8 @@ public class TopicMetadata {
                 this.numPartitions, this.acceptPublish,
                 this.acceptSubscribe, this.statusId,
                 this.numTopicStores, this.memCacheMsgSize,
-                this.memCacheMsgCnt, this.memCacheFlushIntvl);
+                this.memCacheMsgCnt, this.memCacheFlushIntvl,
+                this.maxMsgSize, this.minMemCacheSize);
     }
 
     public boolean isAcceptPublish() {
@@ -304,6 +324,14 @@ public class TopicMetadata {
         return memCacheFlushIntvl;
     }
 
+    public int getMaxMsgSize() {
+        return maxMsgSize;
+    }
+
+    public int getMinMemCacheSize() {
+        return minMemCacheSize;
+    }
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -323,6 +351,8 @@ public class TopicMetadata {
         result = prime * result + this.memCacheMsgSize;
         result = prime * result + this.memCacheMsgCnt;
         result = prime * result + this.memCacheFlushIntvl;
+        result = prime * result + this.maxMsgSize;
+        result = prime * result + this.minMemCacheSize;
         return result;
     }
 
@@ -400,6 +430,12 @@ public class TopicMetadata {
         if (this.memCacheFlushIntvl != other.memCacheFlushIntvl) {
             return false;
         }
+        if (this.maxMsgSize != other.maxMsgSize) {
+            return false;
+        }
+        if (this.minMemCacheSize != other.minMemCacheSize) {
+            return false;
+        }
 
         return true;
     }
@@ -418,6 +454,7 @@ public class TopicMetadata {
                 && this.memCacheMsgSize == other.memCacheMsgSize
                 && this.memCacheMsgCnt == other.memCacheMsgCnt
                 && this.memCacheFlushIntvl == other.memCacheFlushIntvl
+                && this.maxMsgSize == other.maxMsgSize
                 && this.deletePolicy.equals(other.deletePolicy));
     }
 
@@ -438,6 +475,8 @@ public class TopicMetadata {
                 .append(", memCacheMsgSizeInMs=").append(this.memCacheMsgSize / 1024 / 512)
                 .append(", memCacheMsgCntInK=").append(this.memCacheMsgCnt / 512)
                 .append(", memCacheFlushIntvl=").append(this.memCacheFlushIntvl)
+                .append(", maxMsgSize=").append(this.maxMsgSize)
+                .append(", minMemCacheSize=").append(this.minMemCacheSize)
                 .append("]").toString();
     }
 }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java
index 1987c32..a025f7c 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/msgstore/MessageStore.java
@@ -131,7 +131,7 @@ public class MessageStore implements Closeable {
         this.unflushThreshold.set(topicMetadata.getUnflushThreshold());
         this.unflushDataHold.set(topicMetadata.getUnflushDataHold());
         this.writeCacheMaxCnt = topicMetadata.getMemCacheMsgCnt();
-        this.writeCacheMaxSize = validAndGetMemCacheSize(topicMetadata.getMemCacheMsgSize());
+        this.writeCacheMaxSize = validAndGetMemCacheSize(topicMetadata);
         this.writeCacheFlushIntvl = topicMetadata.getMemCacheFlushIntvl();
         int tmpIndexReadCnt = tubeConfig.getIndexTransCount() * partitionNum;
         memMaxIndexReadCnt.set(MixedUtils.mid(tmpIndexReadCnt, 6000, 10000));
@@ -419,7 +419,7 @@ public class MessageStore implements Closeable {
         writeCacheMutex.readLock().lock();
         try {
             writeCacheMaxCnt = topicMetadata.getMemCacheMsgCnt();
-            writeCacheMaxSize = validAndGetMemCacheSize(topicMetadata.getMemCacheMsgSize());
+            writeCacheMaxSize = validAndGetMemCacheSize(topicMetadata);
             writeCacheFlushIntvl = topicMetadata.getMemCacheFlushIntvl();
         } finally {
             writeCacheMutex.readLock().unlock();
@@ -601,13 +601,15 @@ public class MessageStore implements Closeable {
         }
     }
 
-    private int validAndGetMemCacheSize(int memCacheSize) {
-        if (memCacheSize <= ClusterConfigHolder.getMinMemCacheSize()) {
+    private int validAndGetMemCacheSize(TopicMetadata topicMetadata) {
+        int memCacheSize = topicMetadata.getMemCacheMsgSize();
+        if (memCacheSize <= topicMetadata.getMinMemCacheSize()) {
             logger.info(new StringBuilder(512)
-                    .append("[Data Store] writeCacheMaxSize changed, from ")
+                    .append("[Data Store] ").append(getTopic())
+                    .append(" writeCacheMaxSize changed, from ")
                     .append(memCacheSize).append(" to ")
                     .append(ClusterConfigHolder.getMinMemCacheSize()).toString());
-            memCacheSize = ClusterConfigHolder.getMinMemCacheSize();
+            memCacheSize = topicMetadata.getMinMemCacheSize();
         }
         return memCacheSize;
     }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/TServerConstants.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/TServerConstants.java
index 5793364..4e2547a 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/TServerConstants.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/TServerConstants.java
@@ -26,6 +26,7 @@ public final class TServerConstants {
     public static final String TOKEN_JOB_STORE_MGR = "messageStoreManager";
     public static final String TOKEN_DEFAULT_FLOW_CONTROL = "default_master_ctrl";
     public static final String TOKEN_DEFAULT_CLUSTER_SETTING = "default_cluster_config";
+    public static final String TOKEN_MAX_MSG_SIZE = "maxMsgSize";
 
     public static final String TOKEN_BLANK_FILTER_CONDITION = ",,";
 
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/paramcheck/PBParameterUtils.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/paramcheck/PBParameterUtils.java
index 1c2d5ca..c27ad5b 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/paramcheck/PBParameterUtils.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/paramcheck/PBParameterUtils.java
@@ -608,7 +608,7 @@ public class PBParameterUtils {
             strBuffer.delete(0, strBuffer.length());
             return result.success;
         }
-        result.setSuccResult(tmpValue);
+        result.setSuccResult(topicMetadata);
         return result.success;
     }
 }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
index 3763ef9..de9f6ef 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/bdbstore/bdbentitys/BdbTopicConfEntity.java
@@ -345,6 +345,23 @@ public class BdbTopicConfEntity implements Serializable {
                         String.valueOf(memCacheFlushIntvl));
     }
 
+    public int getMaxMsgSize() {
+        String atrVal =
+                TStringUtils.getAttrValFrmAttributes(this.attributes,
+                        TServerConstants.TOKEN_MAX_MSG_SIZE);
+        if (atrVal != null) {
+            return Integer.parseInt(atrVal);
+        }
+        return TBaseConstants.META_VALUE_UNDEFINED;
+    }
+
+    public void setMaxMsgSize(int maxMsgSize) {
+        this.attributes =
+                TStringUtils.setAttrValToAttributes(this.attributes,
+                        TServerConstants.TOKEN_MAX_MSG_SIZE,
+                        String.valueOf(maxMsgSize));
+    }
+
     public void appendAttributes(String attrKey, String attrVal) {
         this.attributes =
                 TStringUtils.setAttrValToAttributes(this.attributes, attrKey, attrVal);
@@ -375,6 +392,7 @@ public class BdbTopicConfEntity implements Serializable {
                 .append(",\"memCacheMsgCntInK\":").append(getMemCacheMsgCntInK())
                 .append(",\"memCacheMsgSizeInMB\":").append(getMemCacheMsgSizeInMB())
                 .append(",\"memCacheFlushIntvl\":").append(getMemCacheFlushIntvl())
+                .append(",\"maxMsgSize\":").append(getMaxMsgSize())
                 .append(",\"dataPath\":\"").append(dataPath)
                 .append("\",\"createUser\":\"").append(createUser)
                 .append("\",\"createDate\":\"")
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerConfManager.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerConfManager.java
index 3eae7dc..56f1914 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerConfManager.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerConfManager.java
@@ -1205,6 +1205,12 @@ public class BrokerConfManager implements Server {
                 } else {
                     sbuffer.append(TokenConstants.ATTR_SEP).append(topicEntity.getMemCacheFlushIntvl());
                 }
+                int maxMsgSize = topicEntity.getMaxMsgSize();
+                if (maxMsgSize == TBaseConstants.META_VALUE_UNDEFINED) {
+                    sbuffer.append(TokenConstants.ATTR_SEP).append(" ");
+                } else {
+                    sbuffer.append(TokenConstants.ATTR_SEP).append(maxMsgSize);
+                }
                 brokerTopicStrConfSet.add(sbuffer.toString());
                 sbuffer.delete(0, sbuffer.length());
             }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerSyncStatusInfo.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerSyncStatusInfo.java
index 176c39a..83e2794 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerSyncStatusInfo.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/nodemanage/nodebroker/BrokerSyncStatusInfo.java
@@ -26,6 +26,8 @@ import org.apache.commons.codec.binary.StringUtils;
 import org.apache.tubemq.corebase.TokenConstants;
 import org.apache.tubemq.corebase.utils.CheckSum;
 import org.apache.tubemq.corebase.utils.TStringUtils;
+import org.apache.tubemq.corebase.utils.Tuple2;
+import org.apache.tubemq.server.broker.metadata.ClusterConfigHolder;
 import org.apache.tubemq.server.common.TServerConstants;
 import org.apache.tubemq.server.common.TStatusConstants;
 import org.apache.tubemq.server.master.bdbstore.bdbentitys.BdbBrokerConfEntity;
@@ -730,6 +732,8 @@ public class BrokerSyncStatusInfo {
             int tmpmemCacheMsgSizeInMB = memCacheMsgSizeInMB;
             int tmpmemCacheMsgCntInK = memCacheMsgCntInK;
             int tmpmemCacheFlushIntvl = memCacheFlushIntvl;
+            int tmpMaxMsgSize = ClusterConfigHolder.getMaxMsgSize();
+            int tmpMinMemCacheSize = ClusterConfigHolder.getMinMemCacheSize();
             if (!TStringUtils.isBlank(topicConfInfoArr[11])) {
                 tmpmemCacheMsgSizeInMB = Integer.parseInt(topicConfInfoArr[11]);
             }
@@ -739,9 +743,20 @@ public class BrokerSyncStatusInfo {
             if (!TStringUtils.isBlank(topicConfInfoArr[13])) {
                 tmpmemCacheFlushIntvl = Integer.parseInt(topicConfInfoArr[13]);
             }
+            if (topicConfInfoArr.length > 14) {
+                if (!TStringUtils.isNotBlank(topicConfInfoArr[14])) {
+                    tmpMaxMsgSize = Integer.parseInt(topicConfInfoArr[14]);
+                    Tuple2<Integer, Integer> calcResult =
+                            ClusterConfigHolder.calcMaxMsgSize(tmpMaxMsgSize);
+                    tmpMaxMsgSize = calcResult.getF0();
+                    tmpMinMemCacheSize = calcResult.getF1();
+                }
+            }
             strBuffer.append(",\"memCacheMsgSizeInMB\":").append(tmpmemCacheMsgSizeInMB);
             strBuffer.append(",\"memCacheMsgCntInK\":").append(tmpmemCacheMsgCntInK);
             strBuffer.append(",\"memCacheFlushIntvl\":").append(tmpmemCacheFlushIntvl);
+            strBuffer.append(",\"maxMsgSize\":").append(tmpMaxMsgSize);
+            strBuffer.append(",\"minMemCacheSize\":").append(tmpMinMemCacheSize);
             strBuffer.append(",\"topicStatusId\":").append(topicStatusId);
             strBuffer.append("}");
         }
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java
index 8bef5ab..9a4cf04 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/web/handler/WebBrokerTopicConfHandler.java
@@ -25,11 +25,13 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+
 import javax.servlet.http.HttpServletRequest;
 import org.apache.tubemq.corebase.TBaseConstants;
 import org.apache.tubemq.corebase.TokenConstants;
 import org.apache.tubemq.corebase.cluster.BrokerInfo;
 import org.apache.tubemq.corebase.cluster.TopicInfo;
+import org.apache.tubemq.corebase.utils.SettingValidUtils;
 import org.apache.tubemq.corebase.utils.TStringUtils;
 import org.apache.tubemq.server.common.TServerConstants;
 import org.apache.tubemq.server.common.TStatusConstants;
@@ -212,6 +214,11 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                         WebParameterUtils.validIntDataParameter("memCacheFlushIntvl",
                                 req.getParameter("memCacheFlushIntvl"),
                                 false, defmemCacheFlushIntvl, 4000);
+                int maxMsgSizeInMB =
+                        WebParameterUtils.validIntDataParameter("maxMsgSizeInMB",
+                                req.getParameter("maxMsgSizeInMB"),
+                                false, TBaseConstants.META_MIN_ALLOWED_MESSAGE_SIZE_MB,
+                                TBaseConstants.META_MIN_ALLOWED_MESSAGE_SIZE_MB);
                 String attributes = strBuffer.append(TokenConstants.TOKEN_STORE_NUM)
                         .append(TokenConstants.EQ).append(numTopicStores)
                         .append(TokenConstants.SEGMENT_SEP).append(TokenConstants.TOKEN_DATA_UNFLUSHHOLD)
@@ -221,7 +228,11 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                         .append(TokenConstants.SEGMENT_SEP).append(TokenConstants.TOKEN_MCACHE_MSG_SIZE)
                         .append(TokenConstants.EQ).append(memCacheMsgSizeInMB)
                         .append(TokenConstants.SEGMENT_SEP).append(TokenConstants.TOKEN_MCACHE_FLUSH_INTVL)
-                        .append(TokenConstants.EQ).append(memCacheFlushIntvl).toString();
+                        .append(TokenConstants.EQ).append(memCacheFlushIntvl)
+                        .append(TokenConstants.SEGMENT_SEP).append(TServerConstants.TOKEN_MAX_MSG_SIZE)
+                        .append(TokenConstants.EQ)
+                        .append(SettingValidUtils.validAndXfeMaxMsgSizeFromMBtoB(maxMsgSizeInMB))
+                        .toString();
                 strBuffer.delete(0, strBuffer.length());
                 for (String itemTopicName : batchAddTopicNames) {
                     batchAddBdbTopicEntities.add(new BdbTopicConfEntity(oldEntity.getBrokerId(),
@@ -359,6 +370,11 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                             WebParameterUtils.validIntDataParameter("memCacheFlushIntvl",
                                     jsonObject.get("memCacheFlushIntvl"),
                                     false, brokerConfEntity.getDftMemCacheFlushIntvl(), 4000);
+                    int maxMsgSizeInMB =
+                            WebParameterUtils.validIntDataParameter("maxMsgSizeInMB",
+                                    jsonObject.get("maxMsgSizeInMB"),
+                                    false, TBaseConstants.META_MIN_ALLOWED_MESSAGE_SIZE_MB,
+                                    TBaseConstants.META_MIN_ALLOWED_MESSAGE_SIZE_MB);
                     String itemCreateUser =
                             WebParameterUtils.validStringParameter("createUser",
                                     jsonObject.get("createUser"),
@@ -381,7 +397,11 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                                     .append(TokenConstants.SEGMENT_SEP).append(TokenConstants.TOKEN_MCACHE_MSG_SIZE)
                                     .append(TokenConstants.EQ).append(memCacheMsgSizeInMB)
                                     .append(TokenConstants.SEGMENT_SEP).append(TokenConstants.TOKEN_MCACHE_FLUSH_INTVL)
-                                    .append(TokenConstants.EQ).append(memCacheFlushIntvl).toString();
+                                    .append(TokenConstants.EQ).append(memCacheFlushIntvl)
+                                    .append(TokenConstants.SEGMENT_SEP).append(TServerConstants.TOKEN_MAX_MSG_SIZE)
+                                    .append(TokenConstants.EQ)
+                                    .append(SettingValidUtils.validAndXfeMaxMsgSizeFromMBtoB(maxMsgSizeInMB))
+                                    .toString();
                     strBuffer.delete(0, strBuffer.length());
                     batchAddItemKeys.add(inputKey);
                     batchAddBdbTopicEntities.add(new BdbTopicConfEntity(brokerConfEntity.getBrokerId(),
@@ -595,6 +615,8 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                             .append(",\"memCacheMsgSizeInMB\":").append(entity.getMemCacheMsgSizeInMB())
                             .append(",\"memCacheFlushIntvl\":").append(entity.getMemCacheFlushIntvl())
                             .append(",\"memCacheMsgCntInK\":").append(entity.getMemCacheMsgCntInK())
+                            .append(",\"maxMsgSizeInMB\":")
+                            .append(entity.getMaxMsgSize() / TBaseConstants.META_MB_UNIT_SIZE)
                             .append(",\"createUser\":\"").append(entity.getCreateUser())
                             .append("\",\"createDate\":\"").append(formatter.format(entity.getCreateDate()))
                             .append("\",\"modifyUser\":\"").append(entity.getModifyUser())
@@ -1334,13 +1356,19 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
             int memCacheMsgSizeInMB =
                     WebParameterUtils.validIntDataParameter("memCacheMsgSizeInMB",
                             req.getParameter("memCacheMsgSizeInMB"), false, TBaseConstants.META_VALUE_UNDEFINED, 2);
-            memCacheMsgSizeInMB = memCacheMsgSizeInMB >= 2048 ? 2048 : memCacheMsgSizeInMB;
+            memCacheMsgSizeInMB = Math.min(memCacheMsgSizeInMB, 2048);
             int memCacheFlushIntvl =
                     WebParameterUtils.validIntDataParameter("memCacheFlushIntvl",
                             req.getParameter("memCacheFlushIntvl"), false, TBaseConstants.META_VALUE_UNDEFINED, 4000);
             int unFlushDataHold =
                     WebParameterUtils.validIntDataParameter("unflushDataHold",
                             req.getParameter("unflushDataHold"), false, TBaseConstants.META_VALUE_UNDEFINED, 0);
+            int maxMsgSizeInMB =
+                    WebParameterUtils.validIntDataParameter("maxMsgSizeInMB",
+                            req.getParameter("maxMsgSizeInMB"),
+                            false, TBaseConstants.META_VALUE_UNDEFINED,
+                            TBaseConstants.META_MIN_ALLOWED_MESSAGE_SIZE_MB);
+
             List<BdbTopicConfEntity> batchModBdbTopicEntities = new ArrayList<>();
             for (BdbBrokerConfEntity tgtEntity : batchBrokerEntitySet) {
                 if (tgtEntity == null) {
@@ -1418,6 +1446,15 @@ public class WebBrokerTopicConfHandler extends AbstractWebHandler {
                         newEntity.appendAttributes(TokenConstants.TOKEN_MCACHE_MSG_SIZE,
                                 String.valueOf(memCacheMsgSizeInMB));
                     }
+                    if (maxMsgSizeInMB > 0) {
+                        int maxMsgSizeInB =
+                                SettingValidUtils.validAndXfeMaxMsgSizeFromMBtoB(maxMsgSizeInMB);
+                        if (maxMsgSizeInB != oldEntity.getMaxMsgSize()) {
+                            foundChange = true;
+                            newEntity.appendAttributes(TServerConstants.TOKEN_MAX_MSG_SIZE,
+                                    String.valueOf(maxMsgSizeInB));
+                        }
+                    }
                     if (memCacheFlushIntvl >= 0 && memCacheFlushIntvl != oldEntity.getMemCacheFlushIntvl()) {
                         foundChange = true;
                         newEntity.appendAttributes(TokenConstants.TOKEN_MCACHE_FLUSH_INTVL,