chrisdutz commented on code in PR #12852:
URL: https://github.com/apache/iotdb/pull/12852#discussion_r1668342062
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java:
##########
@@ -2790,6 +2795,119 @@ public SettableFuture<ConfigTaskResult>
showDatabases(ShowDB showDB) {
return future;
}
+ @Override
+ public SettableFuture<ConfigTaskResult> showCluster(ShowCluster showCluster)
{
+ SettableFuture<ConfigTaskResult> future = SettableFuture.create();
+ TShowClusterResp showClusterResp = new TShowClusterResp();
+ try (ConfigNodeClient client =
+
CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
+ showClusterResp = client.showCluster();
+ } catch (ClientManagerException | TException e) {
+ if (showClusterResp.getConfigNodeList() == null) {
+ future.setException(new TException(MSG_RECONNECTION_FAIL));
+ } else {
+ future.setException(e);
+ }
+ return future;
+ }
+ // build TSBlock
+ if (showCluster.getDetails().orElse(false)) {
+ ShowClusterDetailsTask.buildTSBlock(showClusterResp, future);
+ } else {
+
org.apache.iotdb.db.queryengine.plan.execution.config.metadata.relational.ShowClusterTask
Review Comment:
The problem here is that we have both the talbe and tree executions in the
same class ... that was also why I asked, if we shouldn't refactor the
structure. If I omit the package name it will use the tree model task.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]