Skip to content

Commit

Permalink
[INLONG-570] Optimizing the implementations of HTTP API for Master (a…
Browse files Browse the repository at this point in the history
…pache#1460)

* [INLONG-625] Add unit tests for metamanage.metastore.impl.* (apache#1438)

* [INLONG-1439] Add the port legal check and remove the useless deleteWhen field (apache#1440)

* [INLONG-1441]Repair Broker configuration API bugs (apache#1442)

* [INLONG-1444] Fix Web API multiple field search logic bug (apache#1445)

* [INLONG-1447] Fix Group Control API logic bug (apache#1450)

* [INLONG-1451] Fix the bugs of topic control api (apache#1452)
  • Loading branch information
gosonzhang authored Aug 23, 2021
1 parent 5688601 commit d742df1
Show file tree
Hide file tree
Showing 129 changed files with 21,781 additions and 12,669 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright 2019-2021 The Apache Software Foundation.
This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).

The initial codebase donated to the ASF by Tencent, copyright 2012-2019.
The initial codebase was donated to the ASF by Tencent, copyright 2012-2019.


=======================================================================
Expand Down
7 changes: 0 additions & 7 deletions inlong-tubemq/resources/assets/scripts/brokerDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@
' <div class="cnt">' + dataSet.unflushThreshold + '</div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">deleteWhen:</div>' +
' <div class="cnt">' + dataSet.deleteWhen + '</div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">numPartitions:</div>' +
' <div class="cnt">' + dataSet.numPartitions + '</div>' +
' </div>' +
Expand Down Expand Up @@ -289,9 +285,6 @@
"data": "unflushThreshold"
}, {
"data": "unflushInterval"
}, {
"data": "deleteWhen",
"orderable": false
}, {
"data": "deletePolicy",
"orderable": false
Expand Down
24 changes: 4 additions & 20 deletions inlong-tubemq/resources/assets/scripts/common/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ Dialog.prototype.addBrokerInfo = function (type, brokerId, callback) {
'brokerId': '0',
'brokerIp': '',
'brokerPort': '8123',
'deleteWhen': '0 0 6,18 * * ?',
'deletePolicy': 'delete,168h',
'numPartitions': '3',
'unflushThreshold': '1000',
Expand Down Expand Up @@ -330,13 +329,6 @@ Dialog.prototype.addBrokerInfo = function (type, brokerId, callback) {
' </div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">deleteWhen</div>' +
' <div class="cnt">' +
' <input type="text" class="m" value="'
+ data.deleteWhen + '" name="deleteWhen">' +
' </div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">unflushThreshold</div>' +
' <div class="cnt">' +
' <input type="text" class="m" value="'
Expand Down Expand Up @@ -673,7 +665,6 @@ Dialog.prototype.addTopicInfo = function (type, topicName, data) {
};
data = data || {
'topicName': '',
'deleteWhen': '0 0 6,18 * * ?',
'deletePolicy': 'delete,168h',
'numPartitions': '3',
'unflushThreshold': '1000',
Expand All @@ -699,13 +690,6 @@ Dialog.prototype.addTopicInfo = function (type, topicName, data) {
' </div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">deleteWhen</div>' +
' <div class="cnt">' +
' <input type="text" class="m" value="'
+ data.deleteWhen + '" name="deleteWhen">' +
' </div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">unflushThreshold</div>' +
' <div class="cnt">' +
' <input type="text" class="m" value="'
Expand Down Expand Up @@ -1070,12 +1054,12 @@ CheckBox.prototype.process = function (type, $target, dialogInstance, ext, callb
var types = {
'sub': {
'text': '订阅broker',
'api': 'admin_set_broker_read_or_write&isAcceptSubscribe=' + stateStr + '&brokerId='
'api': 'admin_set_broker_read_or_write&acceptSubscribe=' + stateStr + '&brokerId='
+ ext
},
'pub': {
'text': '发布broker',
'api': 'admin_set_broker_read_or_write&isAcceptPublish=' + stateStr + '&brokerId=' + ext
'api': 'admin_set_broker_read_or_write&acceptPublish=' + stateStr + '&brokerId=' + ext
},
'setTopicAuth': {
'text': 'topic的消费组授权控制',
Expand Down Expand Up @@ -1126,12 +1110,12 @@ CheckBox.prototype.processTopic = function (type, $target, dialogInstance, ext,
var types = {
'sub': {
'text': '订阅broker',
'api': 'admin_set_broker_read_or_write&isAcceptSubscribe=' + stateStr + '&brokerId='
'api': 'admin_set_broker_read_or_write&acceptSubscribe=' + stateStr + '&brokerId='
+ ext
},
'pub': {
'text': '发布broker',
'api': 'admin_set_broker_read_or_write&isAcceptPublish=' + stateStr + '&brokerId=' + ext
'api': 'admin_set_broker_read_or_write&acceptPublish=' + stateStr + '&brokerId=' + ext
},
'setTopicAuth': {
'text': 'topic的消费组授权控制',
Expand Down
7 changes: 0 additions & 7 deletions inlong-tubemq/resources/assets/scripts/topicDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@
' <div class="cnt">' + dataSet.unflushThreshold + '</div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">deleteWhen:</div>' +
' <div class="cnt">' + dataSet.deleteWhen + '</div>' +
' </div>' +
' <div class="row">' +
' <div class="tit">numPartitions:</div>' +
' <div class="cnt">' + dataSet.numPartitions + '</div>' +
' </div>' +
Expand Down Expand Up @@ -294,9 +290,6 @@
"data": "unflushThreshold"
}, {
"data": "unflushInterval"
}, {
"data": "deleteWhen",
"orderable": false
}, {
"data": "deletePolicy",
"orderable": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
<th>acceptSubscribe</th>
<th>unflushThreshold</th>
<th>unflushInterval</th>
<th>deleteWhen</th>
<th>deletePolicy</th>
</tr>
</thead>
Expand Down Expand Up @@ -136,7 +135,6 @@
<th>acceptSubscribe</th>
<th>unflushThreshold</th>
<th>unflushInterval</th>
<th>deleteWhen</th>
<th>deletePolicy</th>
</tr>
</thead>
Expand Down Expand Up @@ -168,7 +166,6 @@
<th>acceptSubscribe</th>
<th>unflushThreshold</th>
<th>unflushInterval</th>
<th>deleteWhen</th>
<th>deletePolicy</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<th>numPartitions</th>
<th>unflushThreshold</th>
<th>unflushInterval</th>
<th>deleteWhen</th>
<th>deletePolicy</th>
<th>acceptPublish</th>
<th>acceptSubscribe</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,13 @@ public void printExceptionCaught(Throwable e, String hostName, String nodeName)
//
}

@Override
public void printWarn(String err) {
//
}

@Override
public void printError(String err) {
//
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ 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;
public static final int META_DEFAULT_BROKER_TLS_PORT = 8124;
public static final int META_DEFAULT_BROKER_WEB_PORT = 8081;
public static final int META_STORE_INS_BASE = 10000;

public static final String META_DEFAULT_CHARSET_NAME = "UTF-8";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public class TokenConstants {
public static final String BLANK = " ";


public static final String TOKEN_STORE_NUM = "storeNum";
public static final String TOKEN_QRY_PRIORITY_ID = "qryPriorityId";
public static final String TOKEN_DATA_UNFLUSHHOLD = "unFlushDataHold";
public static final String TOKEN_MCACHE_MSG_CNT = "memCacheMsgCntInK";
public static final String TOKEN_TLS_PORT = "TLSPort";
public static final String TOKEN_MCACHE_MSG_SIZE = "memCacheMsgSizeInMB";
public static final String TOKEN_MCACHE_FLUSH_INTVL = "memCacheFlushIntvl";
public static final String TOKEN_MSG_TYPE = "$msgType$";
public static final String TOKEN_MSG_TIME = "$msgTime$";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.io.Serializable;
import org.apache.inlong.tubemq.corebase.TokenConstants;
import org.apache.inlong.tubemq.corebase.utils.Tuple2;


public class TopicInfo implements Serializable {
Expand Down Expand Up @@ -74,6 +75,21 @@ public void setAcceptSubscribe(boolean acceptSubscribe) {
this.acceptSubscribe = acceptSubscribe;
}

// return result <isChanged, isScaleOut>
public Tuple2<Boolean, Boolean> updAndJudgeTopicInfo(TopicInfo newTopicInfo) {
boolean isChanged = false;
if (this.acceptPublish != newTopicInfo.acceptPublish) {
isChanged = true;
this.acceptPublish = newTopicInfo.acceptPublish;
}
if (this.acceptSubscribe != newTopicInfo.acceptSubscribe) {
isChanged = true;
this.acceptSubscribe = newTopicInfo.acceptSubscribe;
}
return new Tuple2<>(isChanged, (this.partitionNum != newTopicInfo.partitionNum
|| this.topicStoreNum != newTopicInfo.topicStoreNum));
}

public int getTopicStoreNum() {
return topicStoreNum;
}
Expand Down
Loading

0 comments on commit d742df1

Please sign in to comment.