You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by la...@apache.org on 2013/01/30 06:43:11 UTC

svn commit: r1440282 - /hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureClient.java

Author: larsh
Date: Wed Jan 30 05:43:11 2013
New Revision: 1440282

URL: http://svn.apache.org/viewvc?rev=1440282&view=rev
Log:
HBASE-7684 NullPointerException in SecureClient when Call is cleaned up due to RPC timeout (cuijianwei)

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

Modified: hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureClient.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureClient.java?rev=1440282&r1=1440281&r2=1440282&view=diff
==============================================================================
--- hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureClient.java (original)
+++ hbase/branches/0.94/security/src/main/java/org/apache/hadoop/hbase/ipc/SecureClient.java Wed Jan 30 05:43:11 2013
@@ -375,10 +375,16 @@ public class SecureClient extends HBaseC
           if (LOG.isDebugEnabled()) {
             LOG.debug("call #"+id+", response is:\n"+value.toString());
           }
-          call.setValue(value);
+          // it's possible that this call may have been cleaned up due to a RPC
+          // timeout, so check if it still exists before setting the value.
+          if (call != null) {
+            call.setValue(value);
+          }
         } else if (state == Status.ERROR.state) {
-          call.setException(new RemoteException(WritableUtils.readString(in),
-                                                WritableUtils.readString(in)));
+          if (call != null) {
+            call.setException(new RemoteException(WritableUtils.readString(in), WritableUtils
+                .readString(in)));
+          }
         } else if (state == Status.FATAL.state) {
           // Close the connection
           markClosed(new RemoteException(WritableUtils.readString(in),