[Bug] Change get load state interface (#4081)

Now, the PathTrie will match wrong interface between
/api/{db}/{table} and /api/{db}/{label}
This commit is contained in:
lichaoyong
2020-07-20 15:51:27 +08:00
committed by GitHub
parent 03cf9b2a24
commit fbf7bd6a1d
5 changed files with 11 additions and 11 deletions

View File

@ -76,7 +76,7 @@ module.exports = [
"cancel-label",
"compaction-action",
"fe-get-log-file",
"get-label-state",
"get-load-state",
"restore-tablet",
"profile-action",
"connection-action",

View File

@ -83,7 +83,7 @@ module.exports = [
"cancel-label",
"compaction-action",
"fe-get-log-file",
"get-label-state",
"get-load-state",
"restore-tablet",
"profile-action",
"connection-action",

View File

@ -27,10 +27,10 @@ under the License.
# GET LABEL STATE
## description
NAME:
get_label_state: get label's state
get_load_state: get load's state of label
SYNOPSIS
curl -u user:passwd http://host:port/api/{db}/{label}/_state
curl -u user:passwd http://host:port/api/{db}/get_load_state?label=xxx
DESCRIPTION
@ -51,9 +51,9 @@ under the License.
1. Get status of label "testLabel" on database "testDb"
curl -u root http://host:port/api/testDb/testLabel/_state
curl -u root http://host:port/api/testDb/get_load_state?label=testLabel
## keyword
GET, LABEL, STATE
GET, LOAD, STATE

View File

@ -27,10 +27,10 @@ under the License.
# GET LABEL STATE
## description
NAME:
get_label_state: get label's state
get_load_state: get load's state by label
SYNOPSIS
curl -u user:passwd http://host:port/api/{db}/{label}/_state
curl -u user:passwd http://host:port/api/{db}/get_load_state?label=xxx
DESCRIPTION
该命令用于查看一个Label对应的事务状态
@ -52,8 +52,8 @@ under the License.
## example
1. 获得testDb, testLabel的状态
curl -u root http://host:port/api/testDb/testLabel/_state
curl -u root http://host:port/api/testDb/get_load_state?label=testLabel
## keyword
GET, LABEL, STATE
GET, LOAD, STATE

View File

@ -39,7 +39,7 @@ public class GetStreamLoadState extends RestBaseAction {
public static void registerAction(ActionController controller)
throws IllegalArgException {
GetStreamLoadState action = new GetStreamLoadState(controller);
controller.registerHandler(HttpMethod.GET, "/api/{" + DB_KEY + "}/{" + LABEL_KEY + "}/_state", action);
controller.registerHandler(HttpMethod.GET, "/api/{" + DB_KEY + "}/get_load_state", action);
}
@Override