hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject hbase git commit: HBASE-12071 Separate out thread pool for Master <-> RegionServer communication (Stephen Yuan Jiang)
Date Thu, 08 Jan 2015 22:17:47 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.0 285223618 -> bfc0c74cb


HBASE-12071 Separate out thread pool for Master <-> RegionServer communication (Stephen
Yuan Jiang)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/bfc0c74c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/bfc0c74c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/bfc0c74c

Branch: refs/heads/branch-1.0
Commit: bfc0c74cbabb97955b1355fb921f2f05a9fe972b
Parents: 2852236
Author: Nick Dimiduk <ndimiduk@apache.org>
Authored: Thu Jan 8 14:11:32 2015 -0800
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Thu Jan 8 14:14:35 2015 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/HRegionInfo.java    |  7 +++++++
 .../hbase/ipc/PayloadCarryingRpcController.java |  3 ++-
 .../org/apache/hadoop/hbase/HConstants.java     |  9 ++++++---
 .../hbase/protobuf/generated/RPCProtos.java     | 16 +++++++--------
 hbase-protocol/src/main/protobuf/RPC.proto      |  2 +-
 .../hadoop/hbase/ipc/SimpleRpcScheduler.java    |  7 ++++---
 .../AnnotationReadingPriorityFunction.java      |  8 ++++----
 .../hbase/regionserver/RSRpcServices.java       | 21 +++++++++++---------
 .../regionserver/SimpleRpcSchedulerFactory.java |  5 +++--
 .../hbase/regionserver/TestPriorityRpc.java     | 12 +++++------
 .../hbase/regionserver/TestQosFunction.java     |  2 +-
 11 files changed, 54 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
index aaa36f5..ca0f540 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
@@ -736,6 +736,13 @@ public class HRegionInfo implements Comparable<HRegionInfo> {
   }
 
   /**
+   * @return true if this region is from a system table
+   */
+  public boolean isSystemTable() {
+    return tableName.isSystemTable();
+  }
+
+  /**
    * @return True if has been split and has daughters.
    */
   public boolean isSplit() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
index ba7ecf8..6da93a6 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/PayloadCarryingRpcController.java
@@ -87,7 +87,8 @@ public class PayloadCarryingRpcController
    * @param tn Set priority based off the table we are going against.
    */
   public void setPriority(final TableName tn) {
-    this.priority = tn != null && tn.isSystemTable()? HConstants.HIGH_QOS: HConstants.NORMAL_QOS;
+    this.priority =
+        (tn != null && tn.isSystemTable())? HConstants.SYSTEMTABLE_QOS: HConstants.NORMAL_QOS;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
index 0ac3fbc..5e0be73 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
@@ -870,9 +870,10 @@ public final class HConstants {
 		  "hbase.regionserver.handler.abort.on.error.percent";
   public static final double DEFAULT_REGION_SERVER_HANDLER_ABORT_ON_ERROR_PERCENT = 0.5;
 
-  public static final String REGION_SERVER_META_HANDLER_COUNT =
+  //High priority handlers to deal with admin requests and system table operation requests
+  public static final String REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT =
       "hbase.regionserver.metahandler.count";
-  public static final int DEFAULT_REGION_SERVER_META_HANDLER_COUNT = 10;
+  public static final int DEFAULT_REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT = 10;
 
   public static final String REGION_SERVER_REPLICATION_HANDLER_COUNT =
       "hbase.regionserver.replication.handler.count";
@@ -933,9 +934,11 @@ public final class HConstants {
    */
   public static final int NORMAL_QOS = 0;
   public static final int QOS_THRESHOLD = 10;
-  public static final int HIGH_QOS = 100;
+  public static final int HIGH_QOS = 200;
   public static final int REPLICATION_QOS = 5; // normal_QOS < replication_QOS < high_QOS
   public static final int REPLAY_QOS = 6; // REPLICATION_QOS < REPLAY_QOS < high_QOS
+  public static final int ADMIN_QOS = 100; // QOS_THRESHOLD < ADMIN_QOS < high_QOS
+  public static final int SYSTEMTABLE_QOS = HIGH_QOS;
 
   /** Directory under /hbase where archived hfiles are stored */
   public static final String HFILE_ARCHIVE_DIRECTORY = "archive";

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java
----------------------------------------------------------------------
diff --git a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java
b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java
index 313d7b2..5c1b959 100644
--- a/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java
+++ b/hbase-protocol/src/main/java/org/apache/hadoop/hbase/protobuf/generated/RPCProtos.java
@@ -3668,7 +3668,7 @@ public final class RPCProtos {
      * <code>optional uint32 priority = 6;</code>
      *
      * <pre>
-     * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+     * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
      * See HConstants.
      * </pre>
      */
@@ -3677,7 +3677,7 @@ public final class RPCProtos {
      * <code>optional uint32 priority = 6;</code>
      *
      * <pre>
-     * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+     * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
      * See HConstants.
      * </pre>
      */
@@ -3978,7 +3978,7 @@ public final class RPCProtos {
      * <code>optional uint32 priority = 6;</code>
      *
      * <pre>
-     * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+     * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
      * See HConstants.
      * </pre>
      */
@@ -3989,7 +3989,7 @@ public final class RPCProtos {
      * <code>optional uint32 priority = 6;</code>
      *
      * <pre>
-     * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+     * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
      * See HConstants.
      * </pre>
      */
@@ -4864,7 +4864,7 @@ public final class RPCProtos {
        * <code>optional uint32 priority = 6;</code>
        *
        * <pre>
-       * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+       * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
        * See HConstants.
        * </pre>
        */
@@ -4875,7 +4875,7 @@ public final class RPCProtos {
        * <code>optional uint32 priority = 6;</code>
        *
        * <pre>
-       * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+       * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
        * See HConstants.
        * </pre>
        */
@@ -4886,7 +4886,7 @@ public final class RPCProtos {
        * <code>optional uint32 priority = 6;</code>
        *
        * <pre>
-       * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+       * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
        * See HConstants.
        * </pre>
        */
@@ -4900,7 +4900,7 @@ public final class RPCProtos {
        * <code>optional uint32 priority = 6;</code>
        *
        * <pre>
-       * 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+       * 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
        * See HConstants.
        * </pre>
        */

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-protocol/src/main/protobuf/RPC.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol/src/main/protobuf/RPC.proto b/hbase-protocol/src/main/protobuf/RPC.proto
index 9bf69a1..adef373 100644
--- a/hbase-protocol/src/main/protobuf/RPC.proto
+++ b/hbase-protocol/src/main/protobuf/RPC.proto
@@ -119,7 +119,7 @@ message RequestHeader {
   optional bool request_param = 4;
   // If present, then an encoded data block follows.
   optional CellBlockMeta cell_block_meta = 5;
-  // 0 is NORMAL priority.  100 is HIGH.  If no priority, treat it as NORMAL.
+  // 0 is NORMAL priority.  200 is HIGH.  If no priority, treat it as NORMAL.
   // See HConstants.
   optional uint32 priority = 6;
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
index cbe8adc..d8ae3ba 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
@@ -150,9 +150,10 @@ public class SimpleRpcScheduler extends RpcScheduler {
       }
     }
 
-   this.priorityExecutor =
-     priorityHandlerCount > 0 ? new BalancedQueueRpcExecutor("Priority", priorityHandlerCount,
-       1, maxQueueLength, conf, abortable) : null;
+    // Create 2 queues to help priorityExecutor be more scalable.
+    this.priorityExecutor = priorityHandlerCount > 0 ?
+        new BalancedQueueRpcExecutor("Priority", priorityHandlerCount, 2, maxQueueLength)
: null;
+
    this.replicationExecutor =
      replicationHandlerCount > 0 ? new BalancedQueueRpcExecutor("Replication",
        replicationHandlerCount, 1, maxQueueLength, conf, abortable) : null;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
index 3035086..ddeabfa 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
@@ -177,11 +177,11 @@ class AnnotationReadingPriorityFunction implements PriorityFunction
{
         Method getRegion = methodMap.get("getRegion").get(rpcArgClass);
         regionSpecifier = (RegionSpecifier)getRegion.invoke(param, (Object[])null);
         HRegion region = rpcServices.getRegion(regionSpecifier);
-        if (region.getRegionInfo().isMetaTable()) {
+        if (region.getRegionInfo().isSystemTable()) {
           if (LOG.isTraceEnabled()) {
             LOG.trace("High priority because region=" + region.getRegionNameAsString());
           }
-          return HConstants.HIGH_QOS;
+          return HConstants.SYSTEMTABLE_QOS;
         }
       }
     } catch (Exception ex) {
@@ -197,12 +197,12 @@ class AnnotationReadingPriorityFunction implements PriorityFunction
{
         return HConstants.NORMAL_QOS;
       }
       RegionScanner scanner = rpcServices.getScanner(request.getScannerId());
-      if (scanner != null && scanner.getRegionInfo().isMetaRegion()) {
+      if (scanner != null && scanner.getRegionInfo().isSystemTable()) {
         if (LOG.isTraceEnabled()) {
           // Scanner requests are small in size so TextFormat version should not overwhelm
log.
           LOG.trace("High priority scanner request " + TextFormat.shortDebugString(request));
         }
-        return HConstants.HIGH_QOS;
+        return HConstants.SYSTEMTABLE_QOS;
       }
     }
     return HConstants.NORMAL_QOS;

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 015c147..42bf098 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -903,7 +903,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
 
   @Retention(RetentionPolicy.RUNTIME)
   protected @interface QosPriority {
-    int priority() default 0;
+    int priority() default HConstants.NORMAL_QOS;
   }
 
   public InetSocketAddress getSocketAddress() {
@@ -955,7 +955,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public CloseRegionResponse closeRegion(final RpcController controller,
       final CloseRegionRequest request) throws ServiceException {
     final ServerName sn = (request.hasDestinationServer() ?
@@ -1001,7 +1001,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public CompactRegionResponse compactRegion(final RpcController controller,
       final CompactRegionRequest request) throws ServiceException {
     try {
@@ -1059,7 +1059,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public FlushRegionResponse flushRegion(final RpcController controller,
       final FlushRegionRequest request) throws ServiceException {
     try {
@@ -1101,7 +1101,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
   }
 
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
       final GetOnlineRegionRequest request) throws ServiceException {
     try {
@@ -1120,7 +1120,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
   }
 
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public GetRegionInfoResponse getRegionInfo(final RpcController controller,
       final GetRegionInfoRequest request) throws ServiceException {
     try {
@@ -1148,6 +1148,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public GetServerInfoResponse getServerInfo(final RpcController controller,
       final GetServerInfoRequest request) throws ServiceException {
     try {
@@ -1161,6 +1162,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
   }
 
   @Override
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public GetStoreFileResponse getStoreFile(final RpcController controller,
       final GetStoreFileRequest request) throws ServiceException {
     try {
@@ -1196,7 +1198,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
-  @QosPriority(priority = HConstants.HIGH_QOS)
+  @QosPriority(priority = HConstants.ADMIN_QOS)
   public MergeRegionsResponse mergeRegions(final RpcController controller,
       final MergeRegionsRequest request) throws ServiceException {
     try {
@@ -1252,7 +1254,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public OpenRegionResponse openRegion(final RpcController controller,
       final OpenRegionRequest request) throws ServiceException {
     requestCount.increment();
@@ -1553,7 +1555,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
-  @QosPriority(priority=HConstants.HIGH_QOS)
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public SplitRegionResponse splitRegion(final RpcController controller,
       final SplitRegionRequest request) throws ServiceException {
     try {
@@ -1588,6 +1590,7 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
    * @throws ServiceException
    */
   @Override
+  @QosPriority(priority=HConstants.ADMIN_QOS)
   public StopServerResponse stopServer(final RpcController controller,
       final StopServerRequest request) throws ServiceException {
     requestCount.increment();

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java
index b044a43..1f496b4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SimpleRpcSchedulerFactory.java
@@ -42,11 +42,12 @@ public class SimpleRpcSchedulerFactory implements RpcSchedulerFactory
{
   public RpcScheduler create(Configuration conf, PriorityFunction priority, Abortable server)
{
     int handlerCount = conf.getInt(HConstants.REGION_SERVER_HANDLER_COUNT,
 		HConstants.DEFAULT_REGION_SERVER_HANDLER_COUNT);
+
     return new SimpleRpcScheduler(
       conf,
       handlerCount,
-      conf.getInt(HConstants.REGION_SERVER_META_HANDLER_COUNT,
-        HConstants.DEFAULT_REGION_SERVER_META_HANDLER_COUNT),
+      conf.getInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT,
+        HConstants.DEFAULT_REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT),
       conf.getInt(HConstants.REGION_SERVER_REPLICATION_HANDLER_COUNT,
           HConstants.DEFAULT_REGION_SERVER_REPLICATION_HANDLER_COUNT),
       priority,

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
index d54d889..6e1c360 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
@@ -91,10 +91,10 @@ public class TestPriorityRpc {
     HRegionInfo mockRegionInfo = Mockito.mock(HRegionInfo.class);
     Mockito.when(mockRpc.getRegion((RegionSpecifier)Mockito.any())).thenReturn(mockRegion);
     Mockito.when(mockRegion.getRegionInfo()).thenReturn(mockRegionInfo);
-    Mockito.when(mockRegionInfo.isMetaTable()).thenReturn(true);
+    Mockito.when(mockRegionInfo.isSystemTable()).thenReturn(true);
     // Presume type.
     ((AnnotationReadingPriorityFunction)priority).setRegionServer(mockRS);
-    assertEquals(HConstants.HIGH_QOS, priority.getPriority(header, getRequest));
+    assertEquals(HConstants.SYSTEMTABLE_QOS, priority.getPriority(header, getRequest));
   }
 
   @Test
@@ -126,7 +126,7 @@ public class TestPriorityRpc {
     HRegionInfo mockRegionInfo = Mockito.mock(HRegionInfo.class);
     Mockito.when(mockRpc.getRegion((RegionSpecifier)Mockito.any())).thenReturn(mockRegion);
     Mockito.when(mockRegion.getRegionInfo()).thenReturn(mockRegionInfo);
-    Mockito.when(mockRegionInfo.isMetaRegion()).thenReturn(false);
+    Mockito.when(mockRegionInfo.isSystemTable()).thenReturn(false);
     // Presume type.
     ((AnnotationReadingPriorityFunction)priority).setRegionServer(mockRS);
     int qos = priority.getPriority(header, scanRequest);
@@ -142,15 +142,15 @@ public class TestPriorityRpc {
     Mockito.when(mockRegionScanner.getRegionInfo()).thenReturn(mockRegionInfo);
     Mockito.when(mockRpc.getRegion((RegionSpecifier)Mockito.any())).thenReturn(mockRegion);
     Mockito.when(mockRegion.getRegionInfo()).thenReturn(mockRegionInfo);
-    Mockito.when(mockRegionInfo.isMetaRegion()).thenReturn(true);
+    Mockito.when(mockRegionInfo.isSystemTable()).thenReturn(true);
 
     // Presume type.
     ((AnnotationReadingPriorityFunction)priority).setRegionServer(mockRS);
 
-    assertEquals(HConstants.HIGH_QOS, priority.getPriority(header, scanRequest));
+    assertEquals(HConstants.SYSTEMTABLE_QOS, priority.getPriority(header, scanRequest));
 
     //the same as above but with non-meta region
-    Mockito.when(mockRegionInfo.isMetaRegion()).thenReturn(false);
+    Mockito.when(mockRegionInfo.isSystemTable()).thenReturn(false);
     assertEquals(HConstants.NORMAL_QOS, priority.getPriority(header, scanRequest));
   }
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/bfc0c74c/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
index 0998e1a..dde3e37 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestQosFunction.java
@@ -49,7 +49,7 @@ public class TestQosFunction {
     // Set method name in pb style with the method name capitalized.
     checkMethod("ReplicateWALEntry", HConstants.REPLICATION_QOS, qosFunction);
     // Set method name in pb style with the method name capitalized.
-    checkMethod("OpenRegion", HConstants.HIGH_QOS, qosFunction);
+    checkMethod("OpenRegion", HConstants.ADMIN_QOS, qosFunction);
     // Check multi works.
     checkMethod("Multi", HConstants.NORMAL_QOS, qosFunction, MultiRequest.getDefaultInstance());
   }


Mime
View raw message