hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1439754 - in /hbase/branches/0.94: security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
Date Tue, 29 Jan 2013 06:23:24 GMT
Author: larsh
Date: Tue Jan 29 06:23:23 2013
New Revision: 1439754

URL: http://svn.apache.org/viewvc?rev=1439754&view=rev
Log:
HBASE-7694 Secure HBase should use repliation call queue (Jieshan Bean)

Modified:
    hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java

Modified: hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java?rev=1439754&r1=1439753&r2=1439754&view=diff
==============================================================================
--- hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java
(original)
+++ hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java
Tue Jan 29 06:23:23 2013
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.ipc;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.io.HbaseObjectWritable;
 import org.apache.hadoop.hbase.io.WritableWithSize;
 import org.apache.hadoop.hbase.security.HBaseSaslRpcServer;
@@ -620,8 +621,13 @@ public abstract class SecureServer exten
 
       if (priorityCallQueue != null && getQosLevel(param) > highPriorityLevel)
{
         priorityCallQueue.put(call);
+        updateCallQueueLenMetrics(priorityCallQueue);
+      } else if (replicationQueue != null && getQosLevel(param) == HConstants.REPLICATION_QOS)
{
+        replicationQueue.put(call);
+        updateCallQueueLenMetrics(replicationQueue);
       } else {
         callQueue.put(call);              // queue the call; maybe blocked here
+        updateCallQueueLenMetrics(callQueue);
       }
     }
 

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java?rev=1439754&r1=1439753&r2=1439754&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java Tue Jan
29 06:23:23 2013
@@ -235,7 +235,7 @@ public abstract class HBaseServer implem
   private Handler[] handlers = null;
   private Handler[] priorityHandlers = null;
   /** replication related queue; */
-  private BlockingQueue<Call> replicationQueue;
+  protected BlockingQueue<Call> replicationQueue;
   private int numOfReplicationHandlers = 0;
   private Handler[] replicationHandlers = null;
   protected HBaseRPCErrorHandler errorHandler = null;
@@ -1355,7 +1355,7 @@ public abstract class HBaseServer implem
    * Reports length of the call queue to HBaseRpcMetrics.
    * @param queue Which queue to report
    */
-  private void updateCallQueueLenMetrics(BlockingQueue<Call> queue) {
+  protected void updateCallQueueLenMetrics(BlockingQueue<Call> queue) {
     if (queue == callQueue) {
       rpcMetrics.callQueueLen.set(callQueue.size());
     } else if (queue == priorityCallQueue) {



Mime
View raw message