wchevreuil commented on code in PR #5550:
URL: https://github.com/apache/hbase/pull/5550#discussion_r1410479230


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCall.java:
##########
@@ -132,4 +132,24 @@ public interface RpcCall extends RpcCallContext {
 
   /** Returns A short string format of this call without possibly lengthy 
params */
   String toShortString();
+
+  /**
+   * The queue type where the call is located. If {@link RWQueueRpcExecutor} 
is used, the queue type
+   * can be divided into read, write and scan.
+   */
+  static enum CallQueueType {
+    DEFAULT,
+    WRITE,
+    READ,
+    SCAN
+  }
+
+  /** Returns The queue type of this call. */
+  CallQueueType getQueueType();

Review Comment:
   nit: provide a default implementation here, then you don't need to change 
all extending interfaces.



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RWQueueRpcExecutor.java:
##########
@@ -142,13 +142,17 @@ public boolean dispatch(final CallRunner callTask) {
 
   protected boolean dispatchTo(boolean toWriteQueue, boolean toScanQueue,

Review Comment:
   I guess all executors that do different queues for different call types will 
be extending this one?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCall.java:
##########
@@ -132,4 +132,24 @@ public interface RpcCall extends RpcCallContext {
 
   /** Returns A short string format of this call without possibly lengthy 
params */
   String toShortString();
+
+  /**
+   * The queue type where the call is located. If {@link RWQueueRpcExecutor} 
is used, the queue type
+   * can be divided into read, write and scan.
+   */
+  static enum CallQueueType {

Review Comment:
   Maybe we could just rename it as `CallType`? As an RpcCall should be 
agnostic to the concept of a queue, it could still have a `type` attribute.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to