Review Board 1.7.22


[HBase-4120] isolation and allocation,patch for table priority, test cases are added too.

Review Request #1421 - Created Aug. 9, 2011 and updated

Jia Liu
trunk
HBase-4120
Reviewers
hbase
hbase
Patch used for table priority alone,In this patch, not only tables can have different priorities but also the different actions like "get","scan","put" and "delete" can have priorities.
Tested with test cases in  TestCase_For_TablePriority_trunk_v1.patch 
please apply the patch of HBASE-4181 first,in some circumstances this bug will affect the performance of client.
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java
Revision 1155226 New Change
[20] 371 lines
[+20] [+] public static Object[] call(Method method, Object[][] params,
372
                                 final Class<?>[] ifaces,
372
                                 final Class<?>[] ifaces,
373
                                 final String bindAddress, final int port,
373
                                 final String bindAddress, final int port,
374
                                 final int numHandlers,
374
                                 final int numHandlers,
375
                                 int metaHandlerCount, final boolean verbose, Configuration conf, int highPriorityLevel)
375
                                 int metaHandlerCount, final boolean verbose, Configuration conf, int highPriorityLevel)
376
    throws IOException {
376
    throws IOException {

    
   
377
    if (instance instanceof HRegionInterface

    
   
378
        && conf.getBoolean("hbase.tablepriority.enable", true)) {

    
   
379
      return new PriorityHBaseServer(instance, ifaces, conf, bindAddress, port,

    
   
380
          numHandlers, metaHandlerCount, verbose, highPriorityLevel);

    
   
381
    }
377
    return getServer(instance.getClass(), instance, ifaces, bindAddress, port, numHandlers, metaHandlerCount, verbose, conf, highPriorityLevel);
382
    return getServer(instance.getClass(), instance, ifaces, bindAddress, port, numHandlers, metaHandlerCount, verbose, conf, highPriorityLevel);
378
  }
383
  }
379

    
   
384

   
380
  /** Construct a server for a protocol implementation instance. */
385
  /** Construct a server for a protocol implementation instance. */
381
  public static RpcServer getServer(Class protocol,
386
  public static RpcServer getServer(Class protocol,
[+20] [20] 22 lines
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Revision 1155226 New Change
 
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/PriorityFunction.java
New File
 
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/PriorityHBaseServer.java
New File
 
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/PriorityJobQueue.java
New File
 
http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Revision 1155226 New Change
 
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/allocation/test/TestForActionPriority.java
New File
 
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/allocation/test/TestForPriorityJobQueue.java
New File
 
http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/allocation/test/TestForTablePriority.java
New File
 
  1. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseRPC.java: Loading...
  2. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java: Loading...
  3. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/PriorityFunction.java: Loading...
  4. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/PriorityHBaseServer.java: Loading...
  5. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/PriorityJobQueue.java: Loading...
  6. http://svn.apache.org/repos/asf/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java: Loading...
  7. http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/allocation/test/TestForActionPriority.java: Loading...
  8. http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/allocation/test/TestForPriorityJobQueue.java: Loading...
  9. http://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/allocation/test/TestForTablePriority.java: Loading...