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 01:27:49 UTC

[incubator-pinot] branch fix-num-segment-queried created (now 847322e)

This is an automated email from the ASF dual-hosted git repository.

snlee pushed a change to branch fix-num-segment-queried
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at 847322e  Fix the wrong number reported by numSegmentsQueried Current code will report numSegmentsQueried & numSegmentsProcessed the same. This pr fixes the issue.

This branch includes the following new commits:

     new 847322e  Fix the wrong number reported by numSegmentsQueried Current code will report numSegmentsQueried & numSegmentsProcessed the same. This pr fixes the issue.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Fix the wrong number reported by numSegmentsQueried Current code will report numSegmentsQueried & numSegmentsProcessed the same. This pr fixes the issue.

Posted by sn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

snlee pushed a commit to branch fix-num-segment-queried
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 847322e77b306bd007396864cdb24c469ed75119
Author: Seunghyun Lee <sn...@linkedin.com>
AuthorDate: Mon Nov 26 17:25:04 2018 -0800

    Fix the wrong number reported by numSegmentsQueried
    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