You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by go...@apache.org on 2021/03/13 05:42:28 UTC

[incubator-tubemq] branch TUBEMQ-570 updated: [TUBEMQ-576] Build metadata entity classes

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

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


The following commit(s) were added to refs/heads/TUBEMQ-570 by this push:
     new ca66b85  [TUBEMQ-576] Build metadata entity classes
ca66b85 is described below

commit ca66b85fcba6151691ec6bcce9f03a0093508e33
Author: gosonzhang <go...@tencent.com>
AuthorDate: Fri Mar 12 17:38:33 2021 +0800

    [TUBEMQ-576] Build metadata entity classes
---
 .../org/apache/tubemq/corebase/TBaseConstants.java |   2 +
 .../tubemq/server/common/TServerConstants.java     |   4 +-
 .../server/common/statusdef/ManageStatus.java      |  55 ++++++
 .../tubemq/server/common/statusdef/RuleStatus.java |  52 ++++++
 .../server/common/statusdef/TopicStatus.java       |  53 ++++++
 .../tubemq/server/common/utils/ProcessResult.java  |  16 ++
 .../server/common/utils/WebParameterUtils.java     |   2 +-
 .../master/metastore/dao/entity/BaseEntity.java    | 130 +++++++++++++
 .../metastore/dao/entity/BrokerConfEntity.java     | 207 +++++++++++++++++++++
 .../metastore/dao/entity/ClusterSettingEntity.java | 135 ++++++++++++++
 .../metastore/dao/entity/GroupBlackListEntity.java |  67 +++++++
 .../dao/entity/GroupConsumeCtrlEntity.java         | 113 +++++++++++
 .../metastore/dao/entity/GroupFlowCtrlEntity.java  |  99 ++++++++++
 .../metastore/dao/entity/TopicAuthCtrlEntity.java  |  68 +++++++
 .../metastore/dao/entity/TopicConfEntity.java      | 129 +++++++++++++
 .../metastore/dao/entity/TopicPropGroup.java       | 168 +++++++++++++++++
 .../metastore/dao/mapper/BrokerConfigMapper.java   |  31 +++
 .../metastore/dao/mapper/ClusterConfigMapper.java  |  33 ++++
 .../metastore/dao/mapper/GroupBlackListMapper.java |  31 +++
 .../dao/mapper/GroupConsumeCtrlMapper.java         |  31 +++
 .../metastore/dao/mapper/GroupFlowCtrlMapper.java  |  31 +++
 .../metastore/dao/mapper/TopicAuthCtrlMapper.java  |  31 +++
 .../metastore/dao/mapper/TopicConfigMapper.java    |  31 +++
 .../nodemanage/nodebroker/BrokerConfManager.java   |   2 +-
 .../web/handler/WebAdminGroupCtrlHandler.java      |   2 +-
 25 files changed, 1519 insertions(+), 4 deletions(-)

diff --git a/tubemq-core/src/main/java/org/apache/tubemq/corebase/TBaseConstants.java b/tubemq-core/src/main/java/org/apache/tubemq/corebase/TBaseConstants.java
index 5238323..35aaffd 100644
--- a/tubemq-core/src/main/java/org/apache/tubemq/corebase/TBaseConstants.java
+++ b/tubemq-core/src/main/java/org/apache/tubemq/corebase/TBaseConstants.java
@@ -21,6 +21,8 @@ public class TBaseConstants {
 
     public static final int META_VALUE_UNDEFINED = -2;
 
+    public static final int BUILDER_DEFAULT_SIZE = 512;
+
     public static final int META_DEFAULT_MASTER_PORT = 8715;
     public static final int META_DEFAULT_MASTER_TLS_PORT = 8716;
     public static final int META_DEFAULT_BROKER_PORT = 8123;
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 4e2547a..186c9ff 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
@@ -28,7 +28,9 @@ public final class TServerConstants {
     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 = ",,";
+    public static final long DEFAULT_DATA_VERSION = 0L;
+
+    public static final String BLANK_FILTER_ITEM_STR = ",,";
 
     public static final int CFG_MODAUTHTOKEN_MAX_LENGTH = 128;
     public static final int CFG_ROWLOCK_DEFAULT_DURATION = 30000;
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/ManageStatus.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/ManageStatus.java
new file mode 100644
index 0000000..3217fd6
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/ManageStatus.java
@@ -0,0 +1,55 @@
+/**
+ * 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.common.statusdef;
+
+public enum ManageStatus {
+
+    STATUS_MANAGE_UNDEFINED(-2, "Undefined."),
+    STATUS_MANAGE_APPLY(1, "Apply."),
+    STATUS_MANAGE_ONLINE(5, "Online."),
+    STATUS_MANAGE_ONLINE_NOT_WRITE(6, "Online with not write"),
+    STATUS_MANAGE_ONLINE_NOT_READ(7, "Online with not read"),
+    STATUS_MANAGE_OFFLINE(9, "Offline");
+
+    private int code;
+    private String description;
+
+
+    ManageStatus(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public static ManageStatus valueOf(int code) {
+        for (ManageStatus status : ManageStatus.values()) {
+            if (status.getCode() == code) {
+                return status;
+            }
+        }
+        throw new IllegalArgumentException(String.format(
+                "unknown broker manage status code %s", code));
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/RuleStatus.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/RuleStatus.java
new file mode 100644
index 0000000..29675c9
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/RuleStatus.java
@@ -0,0 +1,52 @@
+/**
+ * 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.common.statusdef;
+
+
+public enum RuleStatus {
+    STATUS_UNDEFINE(-2, "Undefined."),
+    STATUS_ENABLE(1, "Enable."),
+    STATUS_DISABLE(0, "Disable.");
+
+    private int code;
+    private String description;
+
+
+    RuleStatus(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public static RuleStatus valueOf(int code) {
+        for (RuleStatus status : RuleStatus.values()) {
+            if (status.getCode() == code) {
+                return status;
+            }
+        }
+        throw new IllegalArgumentException(String.format("unknown Rule status code %s", code));
+    }
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/TopicStatus.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/TopicStatus.java
new file mode 100644
index 0000000..f54ab7e
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/statusdef/TopicStatus.java
@@ -0,0 +1,53 @@
+/**
+ * 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.common.statusdef;
+
+public enum TopicStatus {
+
+    STATUS_TOPIC_OK(0, "Normal"),
+    STATUS_TOPIC_SOFT_DELETE(1, "Soft deleted"),
+    STATUS_TOPIC_SOFT_REMOVE(2, "Soft removed"),
+    STATUS_TOPIC_HARD_REMOVE(3, "Hard removed");
+
+    private int code;
+    private String description;
+
+
+    TopicStatus(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public static TopicStatus valueOf(int code) {
+        for (TopicStatus status : TopicStatus.values()) {
+            if (status.getCode() == code) {
+                return status;
+            }
+        }
+        throw new IllegalArgumentException(String.format("unknown topic status code %s", code));
+    }
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/ProcessResult.java b/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/ProcessResult.java
index 5b13dd8..adf36f1 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/ProcessResult.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/common/utils/ProcessResult.java
@@ -60,4 +60,20 @@ public class ProcessResult {
         this.errCode = TErrCodeConstants.SUCCESS;
         this.retData1 = retData;
     }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public int getErrCode() {
+        return errCode;
+    }
+
+    public String getErrInfo() {
+        return errInfo;
+    }
+
+    public Object getRetData() {
+        return retData1;
+    }
 }
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 2747efd..e48583e 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
@@ -947,7 +947,7 @@ public class WebParameterUtils {
         }
         if (TStringUtils.isBlank(inFilterConds)) {
             if (isTransBlank) {
-                sb.append(TServerConstants.TOKEN_BLANK_FILTER_CONDITION);
+                sb.append(TServerConstants.BLANK_FILTER_ITEM_STR);
             }
         } else {
             sb.append(TokenConstants.ARRAY_SEP);
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/BaseEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/BaseEntity.java
new file mode 100644
index 0000000..666e2c1
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/BaseEntity.java
@@ -0,0 +1,130 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import com.google.gson.Gson;
+import java.io.Serializable;
+import java.util.Date;
+import org.apache.tubemq.corebase.utils.TStringUtils;
+import org.apache.tubemq.server.common.TServerConstants;
+
+
+
+// AbstractEntity: entity's abstract class
+public class BaseEntity implements Serializable {
+
+    private long dataVersionId =
+            TServerConstants.DEFAULT_DATA_VERSION;    // 0: default version, other: version
+    private String createUser = "";      //create user
+    private Date createDate = null;        //create date
+    private String modifyUser = "";      //modify user
+    private Date modifyDate = null;        //modify date
+    private String attributes = "";        //attribute info
+
+
+    public BaseEntity() {
+
+    }
+
+    public BaseEntity(long dataVersionId) {
+        this.dataVersionId = dataVersionId;
+    }
+
+    public BaseEntity(String createUser, Date createDate) {
+        this(TServerConstants.DEFAULT_DATA_VERSION,
+                createUser, createDate, createUser, createDate);
+    }
+
+    public BaseEntity(long dataVersionId, String createUser, Date createDate) {
+        this(dataVersionId, createUser, createDate, createUser, createDate);
+    }
+
+    public BaseEntity(String createUser, Date createDate,
+                      String modifyUser, Date modifyDate) {
+        this(TServerConstants.DEFAULT_DATA_VERSION,
+                createUser, createDate, modifyUser, modifyDate);
+    }
+
+    public BaseEntity(long dataVersionId,
+                      String createUser, Date createDate,
+                      String modifyUser, Date modifyDate) {
+        this.dataVersionId = dataVersionId;
+        this.createUser = createUser;
+        this.createDate = createDate;
+        this.modifyUser = modifyUser;
+        this.modifyDate = modifyDate;
+    }
+
+    public void setCreateUserInfo(String createUser, Date createDate) {
+        this.createUser = createUser;
+        this.createDate = createDate;
+        this.modifyUser = createUser;
+        this.modifyDate = createDate;
+    }
+
+    public void setModifyUserInfo(String modifyUser, Date modifyDate) {
+        this.modifyUser = modifyUser;
+        this.modifyDate = modifyDate;
+    }
+
+    public void setDataVersionId(long dataVersionId) {
+        this.dataVersionId = dataVersionId;
+    }
+
+    public void setKeyAndVal(String key, String value) {
+        this.attributes =
+                TStringUtils.setAttrValToAttributes(this.attributes, key, value);
+    }
+
+    public String getValueByKey(String key) {
+        return TStringUtils.getAttrValFrmAttributes(this.attributes, key);
+    }
+
+    public String getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(String attributes) {
+        this.attributes = attributes;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public long getDataVersionId() {
+        return dataVersionId;
+    }
+
+    public String getModifyUser() {
+        return modifyUser;
+    }
+
+    public Date getModifyDate() {
+        return modifyDate;
+    }
+
+    public String toJsonString(Gson gson) {
+        return gson.toJson(this);
+    }
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/BrokerConfEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/BrokerConfEntity.java
new file mode 100644
index 0000000..e6601fc
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/BrokerConfEntity.java
@@ -0,0 +1,207 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import java.util.Date;
+import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.corebase.TokenConstants;
+import org.apache.tubemq.server.common.statusdef.ManageStatus;
+
+
+
+/*
+ * store the broker default setting
+ *
+ */
+
+public class BrokerConfEntity extends BaseEntity  {
+    private int brokerId = TBaseConstants.META_VALUE_UNDEFINED;
+    private String brokerIp = "";
+    private int brokerPort = TBaseConstants.META_VALUE_UNDEFINED;
+    //broker tls port
+    private int brokerTLSPort = TBaseConstants.META_VALUE_UNDEFINED;
+    private String brokerAddress = "";       // broker ip:port
+    private String brokerFullInfo = "";      // broker brokerId:ip:port
+    private String brokerSimpleInfo = "";    // broker brokerId:ip:
+    private String brokerTLSSimpleInfo = ""; //tls simple info
+    private String brokerTLSFullInfo = "";   //tls full info
+    private int regionId = TBaseConstants.META_VALUE_UNDEFINED;
+    private int groupId = TBaseConstants.META_VALUE_UNDEFINED;
+    private ManageStatus manageStatus = ManageStatus.STATUS_MANAGE_UNDEFINED;
+    private boolean isConfDataUpdated = false;  //conf data update flag
+    private boolean isBrokerLoaded = false;     //broker conf load flag
+    private TopicPropGroup defTopicPropGroup = null;
+
+
+    public BrokerConfEntity() {
+        super();
+    }
+
+
+    public BrokerConfEntity(int brokerId, String brokerIp, int brokerPort,
+                            int brokerTLSPort, ManageStatus manageStatus,
+                            boolean isConfDataUpdated, boolean isBrokerLoaded,
+                            TopicPropGroup defTopicPropGroup,
+                            String createUser, Date createDate,
+                            String modifyUser, Date modifyDate) {
+        super(createUser, createDate, modifyUser, modifyDate);
+        setBrokerIpAndAllPort(brokerId, brokerIp, brokerPort, brokerTLSPort);
+        this.manageStatus = manageStatus;
+        this.isConfDataUpdated = isConfDataUpdated;
+        this.isBrokerLoaded = isBrokerLoaded;
+        this.defTopicPropGroup = defTopicPropGroup;
+        this.buildStrInfo();
+    }
+
+    public int getBrokerId() {
+        return brokerId;
+    }
+
+    public void setBrokerId(int brokerId) {
+        this.brokerId = brokerId;
+    }
+
+    public ManageStatus getManageStatus() {
+        return manageStatus;
+    }
+
+    public void setManageStatus(ManageStatus manageStatus) {
+        this.manageStatus = manageStatus;
+    }
+
+    public void setConfDataUpdated() {
+        this.isBrokerLoaded = false;
+        this.isConfDataUpdated = true;
+    }
+
+    public void setBrokerLoaded() {
+        this.isBrokerLoaded = true;
+        this.isConfDataUpdated = false;
+    }
+
+    public boolean isConfDataUpdated() {
+        return this.isConfDataUpdated;
+    }
+
+    public boolean isBrokerLoaded() {
+        return this.isBrokerLoaded;
+    }
+
+    public void setBrokerIpAndPort(String brokerIp, int brokerPort) {
+        this.brokerPort = brokerPort;
+        this.brokerIp = brokerIp;
+        this.buildStrInfo();
+    }
+
+    public String getBrokerAddress() {
+        return brokerAddress;
+    }
+
+    public String getBrokerIp() {
+        return brokerIp;
+    }
+
+    public int getBrokerPort() {
+        return brokerPort;
+    }
+
+    public void setBrokerIpAndAllPort(int brokerId, String brokerIp,
+                                      int brokerPort, int brokerTLSPort) {
+        this.brokerId = brokerId;
+        this.brokerIp = brokerIp;
+        this.brokerPort = brokerPort;
+        this.brokerTLSPort = brokerTLSPort;
+        this.buildStrInfo();
+    }
+
+    public int getBrokerTLSPort() {
+        return brokerTLSPort;
+    }
+
+    public String getBrokerIdAndAddress() {
+        return brokerFullInfo;
+    }
+
+    public String getSimpleBrokerInfo() {
+        if (this.brokerPort == TBaseConstants.META_DEFAULT_BROKER_PORT) {
+            return this.brokerSimpleInfo;
+        } else {
+            return this.brokerFullInfo;
+        }
+    }
+
+    public String getSimpleTLSBrokerInfo() {
+        if (getBrokerTLSPort() == TBaseConstants.META_DEFAULT_BROKER_PORT) {
+            return this.brokerTLSSimpleInfo;
+        } else {
+            return this.brokerTLSFullInfo;
+        }
+    }
+
+    public String getBrokerTLSFullInfo() {
+        return brokerTLSFullInfo;
+    }
+
+    public int getRegionId() {
+        return regionId;
+    }
+
+    public void setRegionId(int regionId) {
+        this.regionId = regionId;
+    }
+
+    public int getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(int groupId) {
+        this.groupId = groupId;
+    }
+
+    public TopicPropGroup getDefTopicPropGroup() {
+        return defTopicPropGroup;
+    }
+
+    public void setDefTopicPropGroup(TopicPropGroup defTopicPropGroup) {
+        this.defTopicPropGroup = defTopicPropGroup;
+    }
+
+    private void buildStrInfo() {
+        StringBuilder sBuilder = new StringBuilder(512);
+        this.brokerAddress = sBuilder.append(this.brokerIp)
+                .append(TokenConstants.ATTR_SEP)
+                .append(this.brokerPort).toString();
+        sBuilder.delete(0, sBuilder.length());
+        this.brokerSimpleInfo = sBuilder.append(this.brokerId)
+                .append(TokenConstants.ATTR_SEP).append(this.brokerIp)
+                .append(TokenConstants.ATTR_SEP).append(" ").toString();
+        sBuilder.delete(0, sBuilder.length());
+        this.brokerFullInfo = sBuilder.append(this.brokerId)
+                .append(TokenConstants.ATTR_SEP).append(this.brokerIp)
+                .append(TokenConstants.ATTR_SEP).append(this.brokerPort).toString();
+        sBuilder.delete(0, sBuilder.length());
+        this.brokerTLSSimpleInfo = sBuilder.append(this.brokerId)
+                .append(TokenConstants.ATTR_SEP).append(this.brokerIp)
+                .append(TokenConstants.ATTR_SEP).append(" ").toString();
+        sBuilder.delete(0, sBuilder.length());
+        this.brokerTLSFullInfo = sBuilder.append(this.brokerId)
+                .append(TokenConstants.ATTR_SEP).append(this.brokerIp)
+                .append(TokenConstants.ATTR_SEP).append(brokerTLSPort).toString();
+    }
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/ClusterSettingEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/ClusterSettingEntity.java
new file mode 100644
index 0000000..f75b3b2
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/ClusterSettingEntity.java
@@ -0,0 +1,135 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.server.common.TServerConstants;
+import org.apache.tubemq.server.common.statusdef.RuleStatus;
+
+
+
+/*
+ * store the cluster default setting
+ *
+ */
+public class ClusterSettingEntity extends BaseEntity {
+
+    private String recordKey =
+            TServerConstants.TOKEN_DEFAULT_CLUSTER_SETTING;
+    //broker tcp port
+    private int brokerPort = TBaseConstants.META_VALUE_UNDEFINED;
+    //broker tls port
+    private int brokerTLSPort = TBaseConstants.META_VALUE_UNDEFINED;
+    //broker web port
+    private int brokerWebPort = TBaseConstants.META_VALUE_UNDEFINED;
+    private TopicPropGroup clsDefTopicPropGroup = new TopicPropGroup();
+    private int maxMsgSizeInB = TBaseConstants.META_VALUE_UNDEFINED;
+    private int qryPriorityId = TBaseConstants.META_VALUE_UNDEFINED;
+    private RuleStatus flowCtrlStatus = RuleStatus.STATUS_UNDEFINE;
+    private int flowCtrlRuleCnt = 0;                //flow control rule count
+    private String flowCtrlRuleInfo = "";  // flow control info
+
+    public ClusterSettingEntity() {
+        super();
+    }
+
+    public String getRecordKey() {
+        return recordKey;
+    }
+
+    public int getBrokerPort() {
+        return brokerPort;
+    }
+
+    public void setBrokerPort(int brokerPort) {
+        this.brokerPort = brokerPort;
+    }
+
+    public int getBrokerTLSPort() {
+        return brokerTLSPort;
+    }
+
+    public void setBrokerTLSPort(int brokerTLSPort) {
+        this.brokerTLSPort = brokerTLSPort;
+    }
+
+    public int getBrokerWebPort() {
+        return brokerWebPort;
+    }
+
+    public void setBrokerWebPort(int brokerWebPort) {
+        this.brokerWebPort = brokerWebPort;
+    }
+
+    public int getMaxMsgSizeInB() {
+        return maxMsgSizeInB;
+    }
+
+    public void setMaxMsgSizeInB(int maxMsgSizeInB) {
+        this.maxMsgSizeInB = maxMsgSizeInB;
+    }
+
+    public int getQryPriorityId() {
+        return qryPriorityId;
+    }
+
+    public void setQryPriorityId(int qryPriorityId) {
+        this.qryPriorityId = qryPriorityId;
+    }
+
+    public void setFlowCtrlRuleCnt(Boolean enableFlowCtrl,
+                                   int flowCtrlCnt, String flowCtrlInfo) {
+        if (enableFlowCtrl != null) {
+            if (enableFlowCtrl) {
+                this.flowCtrlStatus = RuleStatus.STATUS_ENABLE;
+            } else {
+                this.flowCtrlStatus = RuleStatus.STATUS_DISABLE;
+            }
+        }
+        this.flowCtrlRuleCnt = flowCtrlCnt;
+        this.flowCtrlRuleInfo = flowCtrlInfo;
+    }
+
+    public int getFlowCtrlRuleCnt() {
+        return flowCtrlRuleCnt;
+    }
+
+    public String getFlowCtrlRuleInfo() {
+        return flowCtrlRuleInfo;
+    }
+
+    public boolean enableFlowCtrl() {
+        return flowCtrlStatus == RuleStatus.STATUS_ENABLE;
+    }
+
+    public void setEnableFlowCtrl(boolean enableFlowCtrl) {
+        if (enableFlowCtrl) {
+            this.flowCtrlStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.flowCtrlStatus = RuleStatus.STATUS_DISABLE;
+        }
+    }
+
+    public TopicPropGroup getClsDefTopicPropGroup() {
+        return clsDefTopicPropGroup;
+    }
+
+    public void setClsDefTopicPropGroup(TopicPropGroup clsDefTopicPropGroup) {
+        this.clsDefTopicPropGroup = clsDefTopicPropGroup;
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupBlackListEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupBlackListEntity.java
new file mode 100644
index 0000000..194f4ca
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupBlackListEntity.java
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <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.master.metastore.dao.entity;
+
+import java.util.Date;
+import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.corebase.TokenConstants;
+
+
+/*
+ * store group black list setting
+ *
+ */
+public class GroupBlackListEntity extends BaseEntity {
+
+    private String recordKey = "";
+    private String topicName = "";
+    private String groupName = "";
+    private String reason = "";
+
+    public GroupBlackListEntity() {
+        super();
+    }
+
+    public GroupBlackListEntity(String topicName, String groupName,
+                                String reason, String createUser, Date createDate) {
+        super(createUser, createDate);
+        this.recordKey = new StringBuilder(TBaseConstants.BUILDER_DEFAULT_SIZE)
+                .append(topicName).append(TokenConstants.ATTR_SEP)
+                .append(groupName).toString();
+        this.topicName = topicName;
+        this.groupName = groupName;
+        this.reason = reason;
+    }
+
+    public String getRecordKey() {
+        return recordKey;
+    }
+
+    public String getTopicName() {
+        return topicName;
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupConsumeCtrlEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupConsumeCtrlEntity.java
new file mode 100644
index 0000000..975443c
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupConsumeCtrlEntity.java
@@ -0,0 +1,113 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import java.util.Date;
+import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.corebase.TokenConstants;
+import org.apache.tubemq.server.common.statusdef.RuleStatus;
+
+
+/*
+ * store the group consume control setting
+ *
+ */
+public class GroupConsumeCtrlEntity extends BaseEntity {
+    private String recordKey = "";
+    private String topicName = "";
+    private String groupName = "";
+    private RuleStatus resCheckStatus = RuleStatus.STATUS_UNDEFINE;
+    private int allowedBrokerClientRate = TBaseConstants.META_VALUE_UNDEFINED;
+    private RuleStatus filterConsumeStatus = RuleStatus.STATUS_UNDEFINE;
+    private String filterCondStr = "";
+
+
+    public GroupConsumeCtrlEntity() {
+        super();
+    }
+
+    public GroupConsumeCtrlEntity(String topicName, String groupName,
+                                  String createUser, Date createDate) {
+        super(createUser, createDate);
+        this.recordKey = new StringBuilder(TBaseConstants.BUILDER_DEFAULT_SIZE)
+                .append(topicName).append(TokenConstants.ATTR_SEP)
+                .append(groupName).toString();
+        this.topicName = topicName;
+        this.groupName = groupName;
+    }
+
+    public String getRecordKey() {
+        return recordKey;
+    }
+
+    public void setTopicName(String topicName) {
+        this.topicName = topicName;
+    }
+
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    public String getTopicName() {
+        return topicName;
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public boolean isEnableResCheck() {
+        return resCheckStatus == RuleStatus.STATUS_ENABLE;
+    }
+
+    public void setResCheckStatus(boolean enableResChk) {
+        if (enableResChk) {
+            this.resCheckStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.resCheckStatus = RuleStatus.STATUS_DISABLE;
+        }
+    }
+
+    public int getAllowedBrokerClientRate() {
+        return allowedBrokerClientRate;
+    }
+
+    public void setAllowedBrokerClientRate(int allowedBrokerClientRate) {
+        this.allowedBrokerClientRate = allowedBrokerClientRate;
+    }
+
+    public boolean isEnableFilterConsume() {
+        return filterConsumeStatus == RuleStatus.STATUS_ENABLE;
+    }
+
+    public void setFilterConsumeStatus(boolean enableFilterConsume) {
+        if (enableFilterConsume) {
+            this.filterConsumeStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.filterConsumeStatus = RuleStatus.STATUS_DISABLE;
+        }
+    }
+
+    public String getFilterCondStr() {
+        return filterCondStr;
+    }
+
+    public void setFilterCondStr(String filterCondStr) {
+        this.filterCondStr = filterCondStr;
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupFlowCtrlEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupFlowCtrlEntity.java
new file mode 100644
index 0000000..5ffa81c
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/GroupFlowCtrlEntity.java
@@ -0,0 +1,99 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import java.util.Date;
+import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.server.common.statusdef.RuleStatus;
+
+/*
+ * store the group flow control setting
+ *
+ */
+public class GroupFlowCtrlEntity extends BaseEntity {
+    private String groupName = "";           // group name
+    private RuleStatus flowCtrlStatus = RuleStatus.STATUS_UNDEFINE;
+    private int qryPriorityId =
+            TBaseConstants.META_VALUE_UNDEFINED;  // consume priority id
+    private int ruleCnt = 0;             //flow control rule count
+    private String flowCtrlInfo = "";  // flow control info
+
+
+    public GroupFlowCtrlEntity() {
+        super();
+    }
+
+    public GroupFlowCtrlEntity(String groupName, boolean enableFlowCtrl,
+                               int qryPriorityId, int ruleCnt,
+                               String flowCtrlInfo, String createUser,
+                               Date createDate) {
+        super(createUser, createDate);
+        this.groupName = groupName;
+        if (enableFlowCtrl) {
+            this.flowCtrlStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.flowCtrlStatus = RuleStatus.STATUS_DISABLE;
+        }
+        this.qryPriorityId = qryPriorityId;
+        this.ruleCnt = ruleCnt;
+        this.flowCtrlInfo = flowCtrlInfo;
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    public void setFlowCtrlRule(int ruleCnt, String flowCtrlInfo) {
+        this.ruleCnt = ruleCnt;
+        this.flowCtrlInfo = flowCtrlInfo;
+    }
+
+    public int getRuleCnt() {
+        return ruleCnt;
+    }
+
+    public String getFlowCtrlInfo() {
+        return flowCtrlInfo;
+    }
+
+    public void setFlowCtrlStatus(boolean enableFlowCtrl) {
+        if (enableFlowCtrl) {
+            this.flowCtrlStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.flowCtrlStatus = RuleStatus.STATUS_DISABLE;
+        }
+    }
+
+    public int getQryPriorityId() {
+        return qryPriorityId;
+    }
+
+    public void setQryPriorityId(int qryPriorityId) {
+        this.qryPriorityId = qryPriorityId;
+    }
+
+    public boolean isFlowCtrlEnable() {
+        return (this.flowCtrlStatus == RuleStatus.STATUS_ENABLE);
+    }
+
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicAuthCtrlEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicAuthCtrlEntity.java
new file mode 100644
index 0000000..2c613b4
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicAuthCtrlEntity.java
@@ -0,0 +1,68 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import java.util.Date;
+import org.apache.tubemq.server.common.statusdef.RuleStatus;
+
+
+/*
+ * store the topic authenticate control setting
+ *
+ */
+public class TopicAuthCtrlEntity extends BaseEntity {
+
+    private String topicName = "";
+    private RuleStatus authCtrlStatus = RuleStatus.STATUS_UNDEFINE;
+
+
+    public TopicAuthCtrlEntity() {
+        super();
+    }
+
+    public TopicAuthCtrlEntity(String topicName, boolean enableAuth,
+                               String createUser, Date createDate) {
+        super(createUser, createDate);
+        this.topicName = topicName;
+        if (enableAuth) {
+            this.authCtrlStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.authCtrlStatus = RuleStatus.STATUS_DISABLE;
+        }
+    }
+
+    public String getTopicName() {
+        return topicName;
+    }
+
+    public void setTopicName(String topicName) {
+        this.topicName = topicName;
+    }
+
+    public boolean isAuthCtrlEnable() {
+        return authCtrlStatus == RuleStatus.STATUS_ENABLE;
+    }
+
+    public void setAuthCtrlStatus(boolean enableAuth) {
+        if (enableAuth) {
+            this.authCtrlStatus = RuleStatus.STATUS_ENABLE;
+        } else {
+            this.authCtrlStatus = RuleStatus.STATUS_DISABLE;
+        }
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicConfEntity.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicConfEntity.java
new file mode 100644
index 0000000..1556cec
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicConfEntity.java
@@ -0,0 +1,129 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import java.util.Date;
+import org.apache.tubemq.corebase.TBaseConstants;
+import org.apache.tubemq.corebase.TokenConstants;
+import org.apache.tubemq.server.common.statusdef.TopicStatus;
+
+
+/*
+ * store the topic configure setting
+ *
+ */
+public class TopicConfEntity extends BaseEntity {
+
+    private String recordKey = "";
+    private String topicName = "";         //topic name
+    private int brokerId = TBaseConstants.META_VALUE_UNDEFINED;     //broker id
+    private TopicStatus topicStatus = TopicStatus.STATUS_TOPIC_OK;  // topic status
+    private String brokerIp = "";          //broker ip
+    private int brokerPort = TBaseConstants.META_VALUE_UNDEFINED;   //broker port
+    private String brokerAddress = "";     //broker address
+    private TopicPropGroup topicPropGroup = null;
+    private int maxMsgSizeInM = TBaseConstants.META_VALUE_UNDEFINED;
+
+
+
+    public TopicConfEntity() {
+        super();
+    }
+
+    public TopicConfEntity(String topicName, int brokerId, TopicStatus topicStatus,
+                           String brokerIp, int brokerPort, TopicPropGroup topicPropGroup,
+                           int maxMsgSizeInM, String createUser, Date createDate) {
+        super(createUser, createDate);
+        setBrokerAndTopicInfo(brokerId, brokerIp, brokerPort, topicName);
+        this.topicStatus = topicStatus;
+        this.topicPropGroup = topicPropGroup;
+        this.maxMsgSizeInM = maxMsgSizeInM;
+    }
+
+    public void setBrokerAndTopicInfo(int brokerId, String brokerIp,
+                                      int brokerPort, String topicName) {
+        StringBuilder sBuilder = new StringBuilder(TBaseConstants.BUILDER_DEFAULT_SIZE);
+        this.recordKey = sBuilder.append(brokerId)
+                .append(TokenConstants.ATTR_SEP).append(topicName).toString();
+        this.brokerId = brokerId;
+        this.brokerIp = brokerIp;
+        this.brokerPort = brokerPort;
+        this.topicName = topicName;
+        if (this.brokerPort != TBaseConstants.META_VALUE_UNDEFINED) {
+            sBuilder.delete(0, sBuilder.length());
+            this.brokerAddress = sBuilder.append(brokerIp)
+                    .append(TokenConstants.ATTR_SEP).append(brokerPort).toString();
+        }
+    }
+
+    public String getRecordKey() {
+        return recordKey;
+    }
+
+    public String getTopicName() {
+        return topicName;
+    }
+
+    public void setTopicName(String topicName) {
+        this.topicName = topicName;
+    }
+
+    public int getBrokerId() {
+        return brokerId;
+    }
+
+    public String getBrokerIp() {
+        return brokerIp;
+    }
+
+    public int getBrokerPort() {
+        return brokerPort;
+    }
+
+    public String getBrokerAddress() {
+        return brokerAddress;
+    }
+
+    public int getMaxMsgSizeInM() {
+        return maxMsgSizeInM;
+    }
+
+    public void setMaxMsgSizeInM(int maxMsgSizeInM) {
+        this.maxMsgSizeInM = maxMsgSizeInM;
+    }
+
+    public void setTopicStatusId(int topicStatusId) {
+        this.topicStatus = TopicStatus.valueOf(topicStatusId);
+    }
+
+    public int getTopicStatusId() {
+        return topicStatus.getCode();
+    }
+
+    public boolean isValidTopicStatus() {
+        return this.topicStatus == TopicStatus.STATUS_TOPIC_OK;
+    }
+
+    public TopicPropGroup getTopicPropGroup() {
+        return topicPropGroup;
+    }
+
+    public void setTopicPropGroup(TopicPropGroup topicPropGroup) {
+        this.topicPropGroup = topicPropGroup;
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicPropGroup.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicPropGroup.java
new file mode 100644
index 0000000..2c9931a
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/entity/TopicPropGroup.java
@@ -0,0 +1,168 @@
+/**
+ * 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.master.metastore.dao.entity;
+
+import org.apache.tubemq.corebase.TBaseConstants;
+
+
+/*
+ * Topic property group, save topic related storage and configuration information.
+ *
+ */
+public class TopicPropGroup {
+
+    private int numTopicStores = TBaseConstants.META_VALUE_UNDEFINED;        //store num
+    private int numPartitions = TBaseConstants.META_VALUE_UNDEFINED;        //partition num
+    private int unflushThreshold = TBaseConstants.META_VALUE_UNDEFINED;     //flush threshold
+    private int unflushInterval = TBaseConstants.META_VALUE_UNDEFINED;      //flush interval
+    private int unflushDataHold = TBaseConstants.META_VALUE_UNDEFINED;      // flush dataSize
+    private int memCacheMsgSizeInMB = TBaseConstants.META_VALUE_UNDEFINED;  // cache block size
+    private int memCacheMsgCntInK = TBaseConstants.META_VALUE_UNDEFINED;    // cache max count
+    private int memCacheFlushIntvl = TBaseConstants.META_VALUE_UNDEFINED;   // cache max interval
+    private boolean acceptPublish = true;    //enable publish
+    private boolean acceptSubscribe = true;  //enable subscribe
+    private String deletePolicy = "";        // delete policy
+    private int dataStoreType = TBaseConstants.META_VALUE_UNDEFINED;  // type
+    private String dataPath = "";   //data path
+
+    public TopicPropGroup() {
+
+    }
+
+    public TopicPropGroup(int numTopicStores, int numPartitions,
+                          int unflushThreshold, int unflushInterval,
+                          int unflushDataHold, int memCacheMsgSizeInMB,
+                          int memCacheMsgCntInK, int memCacheFlushIntvl,
+                          boolean acceptPublish, boolean acceptSubscribe,
+                          String deletePolicy, int dataStoreType, String dataPath) {
+        this.numTopicStores = numTopicStores;
+        this.numPartitions = numPartitions;
+        this.unflushThreshold = unflushThreshold;
+        this.unflushInterval = unflushInterval;
+        this.unflushDataHold = unflushDataHold;
+        this.memCacheMsgSizeInMB = memCacheMsgSizeInMB;
+        this.memCacheMsgCntInK = memCacheMsgCntInK;
+        this.memCacheFlushIntvl = memCacheFlushIntvl;
+        this.acceptPublish = acceptPublish;
+        this.acceptSubscribe = acceptSubscribe;
+        this.deletePolicy = deletePolicy;
+        this.dataStoreType = dataStoreType;
+        this.dataPath = dataPath;
+    }
+
+    public int getNumTopicStores() {
+        return numTopicStores;
+    }
+
+    public void setNumTopicStores(int numTopicStores) {
+        this.numTopicStores = numTopicStores;
+    }
+
+    public int getNumPartitions() {
+        return numPartitions;
+    }
+
+    public void setNumPartitions(int numPartitions) {
+        this.numPartitions = numPartitions;
+    }
+
+    public int getUnflushThreshold() {
+        return unflushThreshold;
+    }
+
+    public void setUnflushThreshold(int unflushThreshold) {
+        this.unflushThreshold = unflushThreshold;
+    }
+
+    public int getUnflushInterval() {
+        return unflushInterval;
+    }
+
+    public void setUnflushInterval(int unflushInterval) {
+        this.unflushInterval = unflushInterval;
+    }
+
+    public int getUnflushDataHold() {
+        return unflushDataHold;
+    }
+
+    public void setUnflushDataHold(int unflushDataHold) {
+        this.unflushDataHold = unflushDataHold;
+    }
+
+    public int getMemCacheMsgSizeInMB() {
+        return memCacheMsgSizeInMB;
+    }
+
+    public void setMemCacheMsgSizeInMB(int memCacheMsgSizeInMB) {
+        this.memCacheMsgSizeInMB = memCacheMsgSizeInMB;
+    }
+
+    public int getMemCacheMsgCntInK() {
+        return memCacheMsgCntInK;
+    }
+
+    public void setMemCacheMsgCntInK(int memCacheMsgCntInK) {
+        this.memCacheMsgCntInK = memCacheMsgCntInK;
+    }
+
+    public int getMemCacheFlushIntvl() {
+        return memCacheFlushIntvl;
+    }
+
+    public void setMemCacheFlushIntvl(int memCacheFlushIntvl) {
+        this.memCacheFlushIntvl = memCacheFlushIntvl;
+    }
+
+    public boolean isAcceptPublish() {
+        return acceptPublish;
+    }
+
+    public void setAcceptPublish(boolean acceptPublish) {
+        this.acceptPublish = acceptPublish;
+    }
+
+    public boolean isAcceptSubscribe() {
+        return acceptSubscribe;
+    }
+
+    public void setAcceptSubscribe(boolean acceptSubscribe) {
+        this.acceptSubscribe = acceptSubscribe;
+    }
+
+    public String getDeletePolicy() {
+        return deletePolicy;
+    }
+
+    public void setDeletePolicy(String deletePolicy) {
+        this.deletePolicy = deletePolicy;
+    }
+
+    public void setDataStoreInfo(int dataStoreType, String dataPath) {
+        this.dataPath = dataPath;
+        this.dataStoreType = dataStoreType;
+    }
+
+    public String getDataPath() {
+        return dataPath;
+    }
+
+    public int getDataStoreType() {
+        return dataStoreType;
+    }
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/BrokerConfigMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/BrokerConfigMapper.java
new file mode 100644
index 0000000..0178623
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/BrokerConfigMapper.java
@@ -0,0 +1,31 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import java.util.Map;
+
+public interface BrokerConfigMapper {
+
+    boolean loadBrokerConfig(Map<String, String> metaDataMap);
+
+    boolean putBrokerConfig(String key, String brokerJsonData);
+
+    boolean delBrokerConfig(String key);
+
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/ClusterConfigMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/ClusterConfigMapper.java
new file mode 100644
index 0000000..ff4f093
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/ClusterConfigMapper.java
@@ -0,0 +1,33 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import org.apache.tubemq.server.common.utils.ProcessResult;
+import org.apache.tubemq.server.master.metastore.dao.entity.ClusterSettingEntity;
+
+
+public interface ClusterConfigMapper {
+
+    void close();
+
+    boolean loadClusterConfig(ProcessResult result);
+
+    boolean putClusterConfig(ClusterSettingEntity entity, ProcessResult result);
+
+    boolean delClusterConfig(String key);
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupBlackListMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupBlackListMapper.java
new file mode 100644
index 0000000..a08ab41
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupBlackListMapper.java
@@ -0,0 +1,31 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import java.util.Map;
+
+public interface GroupBlackListMapper {
+
+    boolean loadGroupBlackListConfig(Map<String, String> metaDataMap);
+
+    boolean putGroupBlackListConfig(String key, String blackListJsonData);
+
+    boolean delGroupBlackListConfig(String key);
+
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupConsumeCtrlMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupConsumeCtrlMapper.java
new file mode 100644
index 0000000..b45620e
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupConsumeCtrlMapper.java
@@ -0,0 +1,31 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import java.util.Map;
+
+public interface GroupConsumeCtrlMapper {
+
+    boolean loadGroupConsumeCtrlConfig(Map<String, String> metaDataMap);
+
+    boolean putGroupConsumeCtrlConfig(String key, String consumeCtrlJsonData);
+
+    boolean delGroupConsumeCtrlConfig(String key);
+
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupFlowCtrlMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupFlowCtrlMapper.java
new file mode 100644
index 0000000..960dda7
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/GroupFlowCtrlMapper.java
@@ -0,0 +1,31 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import java.util.Map;
+
+public interface GroupFlowCtrlMapper {
+
+    boolean loadGroupFlowCtrlConfig(Map<String, String> metaDataMap);
+
+    boolean putGroupFlowCtrlConfig(String key, String flowCtrlJsonData);
+
+    boolean delGroupFlowCtrlConfig(String key);
+
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/TopicAuthCtrlMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/TopicAuthCtrlMapper.java
new file mode 100644
index 0000000..30aaadf
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/TopicAuthCtrlMapper.java
@@ -0,0 +1,31 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import java.util.Map;
+
+public interface TopicAuthCtrlMapper {
+
+    boolean loadTopicAuthCtrlConfig(Map<String, String> metaDataMap);
+
+    boolean putTopicAuthCtrlConfig(String key, String topicAuthCtrlJsonData);
+
+    boolean delTopicAuthCtrlConfig(String key);
+
+
+}
diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/TopicConfigMapper.java b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/TopicConfigMapper.java
new file mode 100644
index 0000000..658feda
--- /dev/null
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/master/metastore/dao/mapper/TopicConfigMapper.java
@@ -0,0 +1,31 @@
+/**
+ * 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.master.metastore.dao.mapper;
+
+import java.util.Map;
+
+public interface TopicConfigMapper {
+
+    boolean loadTopicConfig(Map<String, String> metaDataMap);
+
+    boolean putTopicConfig(String key, String topicJsonData);
+
+    boolean delTopicConfig(String key);
+
+
+}
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 ea1e613..125a490 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
@@ -382,7 +382,7 @@ public class BrokerConfManager implements Server {
             String allowedConds = bdbGroupFilterCondEntity.getAttributes();
             TreeSet<String> condItemSet = reqTopicConditions.get(tmpTopic);
             if (allowedConds.length() == 2
-                    && allowedConds.equals(TServerConstants.TOKEN_BLANK_FILTER_CONDITION)) {
+                    && allowedConds.equals(TServerConstants.BLANK_FILTER_ITEM_STR)) {
                 isAllowed = false;
                 sb.append("[Restricted Group] ")
                         .append(consumerId)
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 028cd6b..9039d66 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
@@ -693,7 +693,7 @@ public class WebAdminGroupCtrlHandler extends AbstractWebHandler {
                 if (!filterCondSet.isEmpty()) {
                     String filterItems = entity.getAttributes();
                     if (filterItems.length() == 2
-                            && filterItems.equals(TServerConstants.TOKEN_BLANK_FILTER_CONDITION)) {
+                            && filterItems.equals(TServerConstants.BLANK_FILTER_ITEM_STR)) {
                         continue;
                     } else {
                         boolean allInc = true;