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

ASF GitHub Bot commented on PHOENIX-1457:
-----------------------------------------

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


> Use high priority queue for metadata endpoint calls
> ---------------------------------------------------
>
>                 Key: PHOENIX-1457
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1457
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>              Labels: 4.3.1
>
> If the RS hosting the system table gets swamped, then we'd be bottlenecked 
> waiting for the response back before running a query when we check if the 
> metadata is in sync. We should run endpoint coprocessor calls for 
> MetaDataService at a high priority to avoid that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to