You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/04/12 20:42:22 UTC

[GitHub] [phoenix] karanmehta93 commented on a change in pull request #482: PHOENIX-4925 Use Segment tree to organize Guide Post Info

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