[ https://issues.apache.org/jira/browse/PHOENIX-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14380442#comment-14380442 ]
ASF GitHub Bot commented on PHOENIX-1457: ----------------------------------------- Github user JamesRTaylor commented on a diff in the pull request: https://github.com/apache/phoenix/pull/55#discussion_r27151502 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/hbase/index/PhoenixRpcControllerFactory.java --- @@ -26,52 +26,57 @@ import org.apache.hadoop.hbase.ipc.DelegatingPayloadCarryingRpcController; import org.apache.hadoop.hbase.ipc.PayloadCarryingRpcController; import org.apache.hadoop.hbase.ipc.RpcControllerFactory; -import org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory; +import org.apache.phoenix.hbase.index.ipc.PhoenixRpcSchedulerFactory; import org.apache.phoenix.util.SchemaUtil; /** * {@link RpcControllerFactory} that overrides the standard {@link PayloadCarryingRpcController} to * allow the configured index tables (via {@link #INDEX_TABLE_NAMES_KEY}) to use the Index priority. */ -public class IndexQosRpcControllerFactory extends RpcControllerFactory { +public class PhoenixRpcControllerFactory extends RpcControllerFactory { public static final String INDEX_TABLE_NAMES_KEY = "phoenix.index.rpc.controller.index-tables"; - public IndexQosRpcControllerFactory(Configuration conf) { + public PhoenixRpcControllerFactory(Configuration conf) { super(conf); } @Override public PayloadCarryingRpcController newController() { PayloadCarryingRpcController delegate = super.newController(); - return new IndexQosRpcController(delegate, conf); + return new PhoenixRpcController(delegate, conf); } @Override public PayloadCarryingRpcController newController(CellScanner cellScanner) { PayloadCarryingRpcController delegate = super.newController(cellScanner); - return new IndexQosRpcController(delegate, conf); + return new PhoenixRpcController(delegate, conf); } @Override public PayloadCarryingRpcController newController(List<CellScannable> cellIterables) { PayloadCarryingRpcController delegate = super.newController(cellIterables); - return new IndexQosRpcController(delegate, conf); + return new PhoenixRpcController(delegate, conf); } - private class IndexQosRpcController extends DelegatingPayloadCarryingRpcController { + private class PhoenixRpcController extends DelegatingPayloadCarryingRpcController { - private int priority; + private int indexPriority; + private int metadataPriority; - public IndexQosRpcController(PayloadCarryingRpcController delegate, Configuration conf) { + public PhoenixRpcController(PayloadCarryingRpcController delegate, Configuration conf) { super(delegate); - this.priority = PhoenixIndexRpcSchedulerFactory.getMinPriority(conf); + this.indexPriority = PhoenixRpcSchedulerFactory.getIndexMinPriority(conf); + this.metadataPriority = PhoenixRpcSchedulerFactory.getMetadataMinPriority(conf); } @Override public void setPriority(final TableName tn) { - // if its an index table, then we override to the index priority - if (!tn.isSystemTable() && !SchemaUtil.isSystemDataTable(tn.getNameAsString())) { - setPriority(this.priority); + // this is function is called for hbase system tables, phoenix system tables and index tables + if (SchemaUtil.isSystemDataTable(tn.getNameAsString())) { --- End diff -- Minor nit: how about moving SchemaUtil.isSystemDataTable() here and calling it useHighPriorityQueue() instead as I don't think it'd be called elsewhere (since it's somewhat random subset of our system tables). > 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)