Github user twdsilva commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/55#discussion_r27269432
--- Diff:
phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
---
@@ -40,28 +40,34 @@
private static final int DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER = 10;
private RpcScheduler delegate;
- private int minPriority;
- private int maxPriority;
- private RpcExecutor callExecutor;
+ private int indexPriority;
+ private int metadataPriority;
+ private RpcExecutor indexCallExecutor;
+ private RpcExecutor metadataCallExecutor;
private int port;
- public PhoenixIndexRpcScheduler(int indexHandlerCount, Configuration
conf,
- RpcScheduler delegate, int minPriority, int maxPriority) {
+ public PhoenixRpcScheduler(int indexHandlerCount, int
metadataHandlerCount, Configuration conf,
--- End diff --
I modified the controller factory to use create a chain of controllers,
which was easy I could just have them extend
DelegatingPayloadCarryingRpcController.
However for the PhoenixRpcScheduler needs to implement
getGeneralQueueLength and getActiveRpcHandlerCount which need queue lengths and
counts of the indexCallExecutor and metadataCallExecutor .
Do you think it would be easier to have a map from prioirity to queue and
then in dispatch() we just lookup the queue based on the priority (and if its
not found in the map call delegate.dispatch(callTask) )?
---
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.
---