BinShi-SecularBird commented on a change in pull request #463: Phoenix stats
Initial Commit
URL: https://github.com/apache/phoenix/pull/463#discussion_r265828110
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
##########
@@ -550,6 +550,76 @@ public BaseResultIterators(QueryPlan plan, Integer
perScanLimit, Integer offset,
}
return ranges;
}
+
+ private List<KeyRange> getRegionRowKeyRanges() throws SQLException {
+ List<HRegionLocation> regionLocations =
getRegionBoundaries(scanGrouper); //Load the region information
+
+ List<KeyRange> regionKeyRanges =
Lists.newArrayListWithExpectedSize(regionLocations.size());
+
+ //Map each HRegionLocation to a KeyRange - no Java 8
+ for(HRegionLocation regionLocation : regionLocations){
+ HRegionInfo regionInfo = regionLocation.getRegionInfo();
+
+ //Region is upperInclusive false by definition
+ KeyRange range = KeyRange.getKeyRange(regionInfo.getStartKey(),
true, regionInfo.getEndKey(), false);
Review comment:
Should be
{
byte[] lowerRange = isFirstRegion ? KeyRange.UNBOUND :
regionLocations.get(0).getLowerRange; // Even they are both new byte[0], they
are different.
boolean lowerInclusive = ! isFirstRegion;
byte[] upperRange = isLastRegion ? KeyRange.UNBOUND :
regionLocations.get(regionLocations.size()-1).getUpperRange; // Even they are
both new byte[0], they are different.
boolean upperExclusive = false;
}
I just use the code showed above, as a quick sample code, to explain the
problem in your original change.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services