phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] karanmehta93 commented on a change in pull request #482: PHOENIX-4925 Use Segment tree to organize Guide Post Info
Date Fri, 12 Apr 2019 20:42:22 GMT
karanmehta93 commented on a change in pull request #482: PHOENIX-4925 Use Segment tree to organize
Guide Post Info
URL: https://github.com/apache/phoenix/pull/482#discussion_r275057705
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/iterate/SnapshotScanner.java
 ##########
 @@ -111,7 +111,11 @@ public SnapshotScanner(Configuration conf, FileSystem fs, Path rootDir,
   public Result next() throws IOException {
     values.clear();
     scanner.nextRaw(values);
-    statisticsCollector.collectStatistics(values);
+    // Needs to call collectStatistics even when values is empty.
+    // In this case, we pass hasMore with value 'false' so a new
+    // guide post will be created for the remaining cached data.
+    statisticsCollector.collectStatistics(values, ! values.isEmpty());
 
 Review comment:
   Suggestion: another way of handling the last GPW is with the scanner close method as well
or when trying to commit the GPW. With that approach, you won't need to explicitly add this
boolean here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message