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

    https://github.com/apache/phoenix/pull/55#discussion_r27152399
  
    --- 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);
    --- End diff --
    
    I spoke with @jyates, I added the min/max range in case we want to support 
setting priorities of specific tables in the future, but if this is not 
required I can remove it and just have a single priority. Should I make the 
same change for the index priorities?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to