hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1305469 - /hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.java
Date Mon, 26 Mar 2012 17:39:50 GMT
Author: jdcryans
Date: Mon Mar 26 17:39:50 2012
New Revision: 1305469

URL: http://svn.apache.org/viewvc?rev=1305469&view=rev
Log:
HBASE-5190 Limit the IPC queue size based on calls' payload size
           (Ted's addendum)

Modified:
    hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureServer.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=1305469&r1=1305468&r2=1305469&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
Mon Mar 26 17:39:50 2012
@@ -95,8 +95,8 @@ public abstract class SecureServer exten
 
   protected class SecureCall extends HBaseServer.Call {
     public SecureCall(int id, Writable param, Connection connection,
-        Responder responder) {
-      super(id, param, connection, responder);
+        Responder responder, long size) {
+      super(id, param, connection, responder, size);
     }
 
     @Override
@@ -205,7 +205,7 @@ public abstract class SecureServer exten
     private final int AUTHORIZATION_FAILED_CALLID = -1;
     // Fake 'call' for SASL context setup
     private static final int SASL_CALLID = -33;
-    private final SecureCall saslCall = new SecureCall(SASL_CALLID, null, this, null);
+    private final SecureCall saslCall = new SecureCall(SASL_CALLID, null, this, null, 0);
 
     private boolean useWrap = false;
 
@@ -414,7 +414,7 @@ public abstract class SecureServer exten
             AccessControlException ae = new AccessControlException(
                 "Authentication is required");
             SecureCall failedCall = new SecureCall(AUTHORIZATION_FAILED_CALLID, null, this,
-                null);
+                null, 0);
             failedCall.setResponse(null, Status.FATAL, ae.getClass().getName(),
                 ae.getMessage());
             responder.doRespond(failedCall);
@@ -595,7 +595,7 @@ public abstract class SecureServer exten
       Writable param = ReflectionUtils.newInstance(paramClass, conf);           // read param
       param.readFields(dis);
 
-      SecureCall call = new SecureCall(id, param, this, responder);
+      SecureCall call = new SecureCall(id, param, this, responder, buf.length);
 
       if (priorityCallQueue != null && getQosLevel(param) > highPriorityLevel)
{
         priorityCallQueue.put(call);
@@ -623,7 +623,7 @@ public abstract class SecureServer exten
         LOG.debug("Connection authorization failed: "+ae.getMessage(), ae);
         rpcMetrics.authorizationFailures.inc();
         SecureCall failedCall = new SecureCall(AUTHORIZATION_FAILED_CALLID, null, this,
-            null);
+            null, 0);
         failedCall.setResponse(null, Status.FATAL, ae.getClass().getName(),
             ae.getMessage());
         responder.doRespond(failedCall);



Mime
View raw message