Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify connection && Refactor async connection framework #12667

Merged
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6029a58
init thrift
liyuheng55555 May 28, 2024
42e651f
antlr grammar
liyuheng55555 May 28, 2024
9a9ac6e
make AsyncDataNodeClientPool nice and clear
liyuheng55555 May 29, 2024
a40e53b
make AsyncDataNodeClientPool nice and clear
liyuheng55555 May 29, 2024
c1126ce
make AsyncDataNodeClientPool nice and clear
liyuheng55555 May 29, 2024
179f130
fxxk, tooooo complicated
liyuheng55555 May 29, 2024
2d12841
fxxk, tooooo complicated
liyuheng55555 May 29, 2024
0cf3803
save
liyuheng55555 Jun 4, 2024
f90770f
ConfigNodeClient
liyuheng55555 Jun 4, 2024
5bbd64f
save
liyuheng55555 Jun 5, 2024
81a8e35
ConfigNode -> all internal service done
liyuheng55555 Jun 5, 2024
9343fe3
ConfigNode asynchronize
liyuheng55555 Jun 5, 2024
c223d3c
all internal service async
liyuheng55555 Jun 6, 2024
d12e8b5
mpp, external service done
liyuheng55555 Jun 6, 2024
13e7713
bad refactor
liyuheng55555 Jun 7, 2024
856e726
Revert "bad refactor"
liyuheng55555 Jun 7, 2024
f3a2f8f
rename Handler to Context && move a function
liyuheng55555 Jun 7, 2024
ad24d6c
move function && rename var
liyuheng55555 Jun 7, 2024
f7f03bc
refactoring... cn->dn seems done.
liyuheng55555 Jun 7, 2024
d3240e6
refactoring... cn->cn...
liyuheng55555 Jun 7, 2024
3527e50
Revert "ConfigNodeClient"
liyuheng55555 Jun 11, 2024
d86df01
fix compile problem, it's working now
liyuheng55555 Jun 11, 2024
12b14a4
rename RequestSender to RequestManager
liyuheng55555 Jun 11, 2024
25053c6
rename AbstractAsyncRPCHandler to AsyncRequestRPCHandler
liyuheng55555 Jun 11, 2024
37e72ae
dn -> cn
liyuheng55555 Jun 11, 2024
8481693
remove comment
liyuheng55555 Jun 11, 2024
1e7ae4b
dn -> dn done, refactor done
liyuheng55555 Jun 11, 2024
3e70cb7
refactor something
liyuheng55555 Jun 11, 2024
94347f6
refactor AsyncRequestManager
liyuheng55555 Jun 12, 2024
8a06f10
rename gg to request
liyuheng55555 Jun 12, 2024
9bc5f37
remove comments
liyuheng55555 Jun 12, 2024
78dd6f8
merge master
liyuheng55555 Jun 12, 2024
c2b76e3
rename function
liyuheng55555 Jun 12, 2024
02ca31d
delete useless class
liyuheng55555 Jun 12, 2024
f801c89
delete something
liyuheng55555 Jun 12, 2024
388e1da
fix ci
liyuheng55555 Jun 12, 2024
3972d81
self review
liyuheng55555 Jun 12, 2024
f1d65c9
self review
liyuheng55555 Jun 12, 2024
283f009
self review
liyuheng55555 Jun 12, 2024
baf1be9
self review
liyuheng55555 Jun 12, 2024
c78a149
self review
liyuheng55555 Jun 12, 2024
fa57ba0
fix mpp
liyuheng55555 Jun 12, 2024
b6c76ad
support verify connection details
liyuheng55555 Jun 12, 2024
78fd700
optimize
liyuheng55555 Jun 13, 2024
b11b8a3
ConfigNodeToConfigNode -> CnToCn
liyuheng55555 Jun 13, 2024
5b0ed9e
CnToDn
liyuheng55555 Jun 13, 2024
3eab19a
DnToDn
liyuheng55555 Jun 13, 2024
179de72
DnToCn
liyuheng55555 Jun 13, 2024
2f5e159
rename
liyuheng55555 Jun 13, 2024
a8f4e8f
spotless
liyuheng55555 Jun 13, 2024
83747df
tan review
liyuheng55555 Jun 13, 2024
1ed9292
add Exception
liyuheng55555 Jun 14, 2024
3ffac24
add IT
liyuheng55555 Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ keyWords
| CONDITION
| CONFIGNODES
| CONFIGURATION
| CONNECTION
| CONNECTOR
| CONTAIN
| CONTAINS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ddlStatement
| createContinuousQuery | dropContinuousQuery | showContinuousQueries
// Cluster
| showVariables | showCluster | showRegions | showDataNodes | showConfigNodes | showClusterId
| getRegionId | getTimeSlotList | countTimeSlotList | getSeriesSlotList | migrateRegion
| getRegionId | getTimeSlotList | countTimeSlotList | getSeriesSlotList | migrateRegion | verifyConnection
// Quota
| setSpaceQuota | showSpaceQuota | setThrottleQuota | showThrottleQuota
// View
Expand Down Expand Up @@ -524,6 +524,10 @@ migrateRegion
: MIGRATE REGION regionId=INTEGER_LITERAL FROM fromId=INTEGER_LITERAL TO toId=INTEGER_LITERAL
;

verifyConnection
: VERIFY CONNECTION (DETAILS)?
;

// Pipe Task =========================================================================================
createPipe
: CREATE PIPE pipeName=identifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ CONFIGURATION
: C O N F I G U R A T I O N
;

CONNECTION
: C O N N E C T I O N
;

CONNECTOR
: C O N N E C T O R
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.apache.iotdb.confignode.client;

public enum ConfigNodeRequestType {
public enum CnToCnNodeRequestType {
ADD_CONSENSUS_GROUP,
NOTIFY_REGISTER_SUCCESS,
REGISTER_CONFIG_NODE,
Expand All @@ -30,4 +30,6 @@ public enum ConfigNodeRequestType {
STOP_CONFIG_NODE,
SET_CONFIGURATION,
SHOW_CONFIGURATION,
SUBMIT_TEST_CONNECTION_TASK,
TEST_CONNECTION,
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.apache.iotdb.confignode.client;

public enum DataNodeRequestType {
public enum CnToDnRequestType {

// Node Maintenance
DISABLE_DATA_NODE,
Expand All @@ -35,6 +35,9 @@ public enum DataNodeRequestType {
SET_CONFIGURATION,
SHOW_CONFIGURATION,

SUBMIT_TEST_CONNECTION_TASK,
TEST_CONNECTION,

// Region Maintenance
CREATE_DATA_REGION,
CREATE_SCHEMA_REGION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
import org.apache.iotdb.common.rpc.thrift.TEndPoint;
import org.apache.iotdb.commons.client.ClientPoolFactory;
import org.apache.iotdb.commons.client.IClientManager;
import org.apache.iotdb.commons.client.async.AsyncConfigNodeIServiceClient;
import org.apache.iotdb.commons.client.async.AsyncConfigNodeInternalServiceClient;
import org.apache.iotdb.confignode.client.async.handlers.heartbeat.ConfigNodeHeartbeatHandler;
import org.apache.iotdb.confignode.rpc.thrift.TConfigNodeHeartbeatReq;

public class AsyncConfigNodeHeartbeatClientPool {

private final IClientManager<TEndPoint, AsyncConfigNodeIServiceClient> clientManager;
private final IClientManager<TEndPoint, AsyncConfigNodeInternalServiceClient> clientManager;

private AsyncConfigNodeHeartbeatClientPool() {
clientManager =
new IClientManager.Factory<TEndPoint, AsyncConfigNodeIServiceClient>()
new IClientManager.Factory<TEndPoint, AsyncConfigNodeInternalServiceClient>()
.createClientManager(
new ClientPoolFactory.AsyncConfigNodeHeartbeatServiceClientPoolFactory());
}
Expand All @@ -53,7 +53,6 @@ public void getConfigNodeHeartBeat(
}
}

// TODO: Is the ClientPool must be a singleton?
private static class AsyncConfigNodeHeartbeatClientPoolHolder {

private static final AsyncConfigNodeHeartbeatClientPool INSTANCE =
Expand Down
Loading
Loading