You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by sn...@apache.org on 2018/11/27 02:34:49 UTC
[incubator-pinot] branch master updated: Fix the wrong number
reported by numSegmentsQueried (#3552)
This is an automated email from the ASF dual-hosted git repository.
snlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 8e2076f Fix the wrong number reported by numSegmentsQueried (#3552)
8e2076f is described below
commit 8e2076f5ba8b1869b3f6016a295210ccb6213ee6
Author: Seunghyun Lee <sn...@linkedin.com>
AuthorDate: Mon Nov 26 18:34:45 2018 -0800
Fix the wrong number reported by numSegmentsQueried (#3552)
Current code will report numSegmentsQueried & numSegmentsProcessed the same. This pr fixes the issue.
---
.../linkedin/pinot/core/query/executor/ServerQueryExecutorV1Impl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pinot-core/src/main/java/com/linkedin/pinot/core/query/executor/ServerQueryExecutorV1Impl.java b/pinot-core/src/main/java/com/linkedin/pinot/core/query/executor/ServerQueryExecutorV1Impl.java
index 1e8ef70..45e1a8b 100644
--- a/pinot-core/src/main/java/com/linkedin/pinot/core/query/executor/ServerQueryExecutorV1Impl.java
+++ b/pinot-core/src/main/java/com/linkedin/pinot/core/query/executor/ServerQueryExecutorV1Impl.java
@@ -121,6 +121,7 @@ public class ServerQueryExecutorV1Impl implements QueryExecutor {
TableDataManager tableDataManager = _instanceDataManager.getTableDataManager(tableNameWithType);
Preconditions.checkState(tableDataManager != null, "Failed to find data manager for table: " + tableNameWithType);
List<SegmentDataManager> segmentDataManagers = tableDataManager.acquireSegments(queryRequest.getSegmentsToQuery());
+ int numSegmentsQueried = segmentDataManagers.size();
boolean enableTrace = queryRequest.isEnableTrace();
if (enableTrace) {
TraceContext.register(requestId);
@@ -188,7 +189,7 @@ public class ServerQueryExecutorV1Impl implements QueryExecutor {
queryProcessingTimer.stopAndRecord();
long queryProcessingTime = queryProcessingTimer.getDurationMs();
- dataTable.getMetadata().put(DataTable.NUM_SEGMENTS_QUERIED, Long.toString(segmentDataManagers.size()));
+ dataTable.getMetadata().put(DataTable.NUM_SEGMENTS_QUERIED, Integer.toString(numSegmentsQueried));
dataTable.getMetadata().put(DataTable.TIME_USED_MS_METADATA_KEY, Long.toString(queryProcessingTime));
LOGGER.debug("Query processing time for request Id - {}: {}", requestId, queryProcessingTime);
LOGGER.debug("InstanceResponse for request Id - {}: {}", requestId, dataTable);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org