phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jyates <...@git.apache.org>
Subject [GitHub] phoenix pull request: PHOENIX-1457 Use high priority queue for met...
Date Wed, 25 Mar 2015 18:58:31 GMT
Github user jyates commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/55#discussion_r27154220
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/hbase/index/ipc/PhoenixRpcSchedulerFactory.java
---
    @@ -62,30 +62,59 @@ public RpcScheduler create(Configuration conf, RegionServerServices
services) {
                 return delegate;
             }
     
    +        // get the index priority configs
             int indexHandlerCount = conf.getInt(QueryServices.INDEX_HANDLER_COUNT_ATTRIB,
QueryServicesOptions.DEFAULT_INDEX_HANDLER_COUNT);
    -        int minPriority = getMinPriority(conf);
    -        int maxPriority = conf.getInt(QueryServices.MAX_INDEX_PRIOIRTY_ATTRIB, QueryServicesOptions.DEFAULT_INDEX_MAX_PRIORITY);
    -        // make sure the ranges are outside the warning ranges
    -        Preconditions.checkArgument(maxPriority > minPriority, "Max index priority
(" + maxPriority
    -                + ") must be larger than min priority (" + minPriority + ")");
    -        boolean allSmaller =
    -                minPriority < HConstants.REPLICATION_QOS
    -                        && maxPriority < HConstants.REPLICATION_QOS;
    -        boolean allLarger = minPriority > HConstants.HIGH_QOS;
    -        Preconditions.checkArgument(allSmaller || allLarger, "Index priority range ("
+ minPriority
    -                + ",  " + maxPriority + ") must be outside HBase priority range ("
    -                + HConstants.REPLICATION_QOS + ", " + HConstants.HIGH_QOS + ")");
    +        int indexMinPriority = getIndexMinPriority(conf);
    +        int indexMaxPriority = conf.getInt(QueryServices.MAX_INDEX_PRIOIRTY_ATTRIB, QueryServicesOptions.DEFAULT_INDEX_MAX_PRIORITY);
    +        validatePriority(indexMinPriority, indexMaxPriority);
    +        
    +        // get the metadata priority configs
    +        int metadataHandlerCount = conf.getInt(QueryServices.INDEX_HANDLER_COUNT_ATTRIB,
QueryServicesOptions.DEFAULT_METADATA_HANDLER_COUNT);
    +        int metadataMinPriority = getMetadataMinPriority(conf);
    +        int metadataMaxPriority = conf.getInt(QueryServices.MAX_INDEX_PRIOIRTY_ATTRIB,
QueryServicesOptions.DEFAULT_METADATA_MAX_PRIORITY);
    +        validatePriority(indexMinPriority, indexMaxPriority);
    +        
    +        //validate index and metadata priorities do not overlap
    +        Preconditions.checkArgument(doesNotOverlap(indexMinPriority, indexMaxPriority,
metadataMinPriority, metadataMaxPriority), "Priority ranges ("
    +                + indexMinPriority + ",  " + indexMaxPriority + ") and  (" + metadataMinPriority
+ ", " + metadataMaxPriority
    --- End diff --
    
    super nit: Might be cleaner if you just use a format string here


---
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