You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/11/14 10:26:45 UTC
[iotdb] 01/02: spotless
This is an automated email from the ASF dual-hosted git repository.
hui pushed a commit to branch ml/windowSet
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit f49ad6f1131f6007e3aca65f303e37ffefb7de90
Author: Minghui Liu <li...@foxmail.com>
AuthorDate: Mon Nov 14 18:24:55 2022 +0800
spotless
---
.../service/thrift/impl/ClientRPCServiceImpl.java | 27 +++++++++++-----------
.../apache/iotdb/db/utils/QueryDataSetUtils.java | 6 ++---
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index a7796ac5d7..ab027fb138 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -457,8 +457,9 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
try (SetThreadName threadName = new SetThreadName(result.queryId.getId())) {
TSFetchWindowBatchResp resp =
- createTSFetchWindowBatchResp(queryExecution.getDatasetHeader());
- resp.setWindowBatchDataSetList(QueryDataSetUtils.convertTsBlocksToWindowBatchDataSetList(queryExecution));
+ createTSFetchWindowBatchResp(queryExecution.getDatasetHeader());
+ resp.setWindowBatchDataSetList(
+ QueryDataSetUtils.convertTsBlocksToWindowBatchDataSetList(queryExecution));
return resp;
}
} catch (Exception e) {
@@ -492,17 +493,17 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
QUERY_FREQUENCY_RECORDER.incrementAndGet();
AUDIT_LOGGER.debug("Session {} execute fetch window set: {}", req.sessionId, req);
long queryId =
- SESSION_MANAGER.requestQueryId(SESSION_MANAGER.getCurrSession(), req.statementId);
+ SESSION_MANAGER.requestQueryId(SESSION_MANAGER.getCurrSession(), req.statementId);
// create and cache dataset
ExecutionResult result =
- COORDINATOR.execute(
- s,
- queryId,
- SESSION_MANAGER.getSessionInfo(SESSION_MANAGER.getCurrSession()),
- "",
- PARTITION_FETCHER,
- SCHEMA_FETCHER,
- config.getQueryTimeoutThreshold());
+ COORDINATOR.execute(
+ s,
+ queryId,
+ SESSION_MANAGER.getSessionInfo(SESSION_MANAGER.getCurrSession()),
+ "",
+ PARTITION_FETCHER,
+ SCHEMA_FETCHER,
+ config.getQueryTimeoutThreshold());
if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
throw new RuntimeException("error code: " + result.status);
@@ -512,14 +513,14 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
try (SetThreadName threadName = new SetThreadName(result.queryId.getId())) {
TSFetchWindowBatchResp resp =
- createTSFetchWindowBatchResp(queryExecution.getDatasetHeader());
+ createTSFetchWindowBatchResp(queryExecution.getDatasetHeader());
resp.setWindowBatch(QueryDataSetUtils.convertTsBlocksToWindowBatch(queryExecution));
return resp;
}
} catch (Exception e) {
// TODO call the coordinator to release query resource
return RpcUtils.getTSFetchWindowBatchResp(
- onQueryException(e, "\"" + req + "\". " + OperationType.EXECUTE_RAW_DATA_QUERY));
+ onQueryException(e, "\"" + req + "\". " + OperationType.EXECUTE_RAW_DATA_QUERY));
} finally {
addOperationLatency(Operation.EXECUTE_QUERY, startTime);
long costTime = System.currentTimeMillis() - startTime;
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java b/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
index 17dd769f5a..8880ca2810 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
@@ -428,8 +428,8 @@ public class QueryDataSetUtils {
return windowSet;
}
- public static List<TSQueryDataSet> convertTsBlocksToWindowBatchDataSetList(IQueryExecution queryExecution)
- throws IoTDBException, IOException {
+ public static List<TSQueryDataSet> convertTsBlocksToWindowBatchDataSetList(
+ IQueryExecution queryExecution) throws IoTDBException, IOException {
List<TSQueryDataSet> windowSet = new ArrayList<>();
int columnNum = queryExecution.getOutputValueColumnCount();
@@ -584,7 +584,7 @@ public class QueryDataSetUtils {
break;
default:
throw new UnSupportedDataTypeException(
- String.format("Data type %s is not supported.", type));
+ String.format("Data type %s is not supported.", type));
}
if (k != columnNum - 1) {
rowCount -= currentCount;