You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nk...@apache.org on 2013/04/24 09:26:55 UTC
svn commit: r1471271 -
/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Author: nkeywal
Date: Wed Apr 24 07:26:55 2013
New Revision: 1471271
URL: http://svn.apache.org/r1471271
Log:
HBASE-8380 NPE in HBaseClient.readResponse
Modified:
hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java?rev=1471271&r1=1471270&r2=1471271&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Wed Apr 24 07:26:55 2013
@@ -392,7 +392,7 @@ public class HBaseClient {
if (LOG.isDebugEnabled()) {
LOG.debug("Use " + authMethod + " authentication for protocol "
- + protocol.getSimpleName());
+ + (protocol == null ? "null" : protocol.getSimpleName()));
}
reloginMaxBackoff = conf.getInt("hbase.security.relogin.maxbackoff", 5000);
this.remoteId = remoteId;
@@ -811,7 +811,7 @@ public class HBaseClient {
ticket = ticket.getRealUser();
}
}
- boolean continueSasl = false;
+ boolean continueSasl;
try {
if (ticket == null) {
throw new NullPointerException("ticket is null");
@@ -855,7 +855,7 @@ public class HBaseClient {
}
} catch (Throwable t) {
failedServers.addToFailedServers(remoteId.address);
- IOException e = null;
+ IOException e;
if (t instanceof IOException) {
e = (IOException)t;
markClosed(e);
@@ -1007,14 +1007,16 @@ public class HBaseClient {
if (call != null) call.setException(re);
}
} else {
- Message rpcResponseType;
- try {
- // TODO: Why pb engine pollution in here in this class? FIX.
- rpcResponseType =
- ProtobufRpcClientEngine.Invoker.getReturnProtoType(
- reflectionCache.getMethod(remoteId.getProtocol(), call.method.getName()));
- } catch (Exception e) {
- throw new RuntimeException(e); //local exception
+ Message rpcResponseType = null;
+ if (call != null){
+ try {
+ // TODO: Why pb engine pollution in here in this class? FIX.
+ rpcResponseType =
+ ProtobufRpcClientEngine.Invoker.getReturnProtoType(
+ reflectionCache.getMethod(remoteId.getProtocol(), call.method.getName()));
+ } catch (Exception e) {
+ throw new RuntimeException(e); //local exception
+ }
}
Message value = null;
if (rpcResponseType != null) {
@@ -1474,4 +1476,4 @@ public class HBaseClient {
return hashcode;
}
}
-}
\ No newline at end of file
+}