phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkrish86 <...@git.apache.org>
Subject [GitHub] phoenix pull request: Phoenix 180
Date Wed, 03 Sep 2014 12:11:59 GMT
Github user ramkrish86 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/8#discussion_r17045111
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/iterate/DefaultParallelIteratorRegionSplitter.java
---
    @@ -138,14 +146,10 @@ public boolean apply(HRegionLocation location) {
             //    split each region in s splits such that:
             //    s = max(x) where s * x < t
             //
    -        // The idea is to align splits with region boundaries. If rows are not evenly
    -        // distributed across regions, using this scheme compensates for regions that
    -        // have more rows than others, by applying tighter splits and therefore spawning
    -        // off more scans over the overloaded regions.
    -        int splitsPerRegion = getSplitsPerRegion(regions.size());
             // Create a multi-map of ServerName to List<KeyRange> which we'll use to
round robin from to ensure
             // that we keep each region server busy for each query.
    -        ListMultimap<HRegionLocation,KeyRange> keyRangesPerRegion = ArrayListMultimap.create(regions.size(),regions.size()
* splitsPerRegion);;
    +        int splitsPerRegion = getSplitsPerRegion(regions.size());
    +        ListMultimap<HRegionLocation,KeyRange> keyRangesPerRegion = ArrayListMultimap.create(regions.size(),regions.size()
* splitsPerRegion);
             if (splitsPerRegion == 1) {
                 for (HRegionLocation region : regions) {
    --- End diff --
    
    
         this will be a bit easier if the guideposts are sorted already
    Ideally the guideposts should be sorted because we are inserting the guideposts with the
following rowkey - tablename, fam and regioname - so considering there is only one fam those
sets of guideposts would be sorted i feel. 
    Another is, if the scan has to retrieve the row that is part of the guidepost itself then
the splits that we form from the guideposts, will actually needs to be incremented by +1 (last
byte) so that the upperrange of the key range could be used as the stop row and will cover
the exact row that is as part of the guide posts.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message