[ 
https://issues.apache.org/jira/browse/TEPHRA-245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16174414#comment-16174414
 ] 

ASF GitHub Bot commented on TEPHRA-245:
---------------------------------------

Github user anew commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/62#discussion_r140172443
  
    --- Diff: 
tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/InvalidListPruningDebugTool.java
 ---
    @@ -204,16 +204,19 @@ public int compare(RegionPruneInfo o1, 
RegionPruneInfo o2) {
             return Long.compare(o1.getPruneUpperBound(), 
o2.getPruneUpperBound());
           }
         };
    -    Queue<RegionPruneInfoPretty> lowestPrunes =
    +    MinMaxPriorityQueue<RegionPruneInfoPretty> lowestPrunes =
           
MinMaxPriorityQueue.orderedBy(comparator).maximumSize(numRegions).create();
     
         for (RegionPruneInfo pruneInfo : regionPruneInfos) {
           lowestPrunes.add(new RegionPruneInfoPretty(pruneInfo));
         }
     
    -    TreeSet<RegionPruneInfoPretty> regionSet = new TreeSet<>(comparator);
    -    regionSet.addAll(lowestPrunes);
    -    return regionSet;
    +    List<RegionPruneInfoPretty> regions = new ArrayList<>(numRegions);
    +    RegionPruneInfoPretty e;
    +    while ((e = lowestPrunes.pollFirst()) != null) {
    --- End diff --
    
    isn't that the same as addAll?


> Improve the prune debug tool
> ----------------------------
>
>                 Key: TEPHRA-245
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-245
>             Project: Tephra
>          Issue Type: Improvement
>          Components: core, manager
>    Affects Versions: 0.12.0-incubating
>            Reporter: Andreas Neumann
>            Assignee: Poorna Chandra
>             Fix For: 0.14.0-incubating
>
>
> The current tool is not very intuitive and it requires deep understanding of 
> how pruning works to use it, It would be better if the tool could provide 
> instructions: what is needed to make pruning proceed?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to