hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject svn commit: r1513583 - /hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
Date Tue, 13 Aug 2013 16:28:03 GMT
Author: jxiang
Date: Tue Aug 13 16:28:02 2013
New Revision: 1513583

URL: http://svn.apache.org/r1513583
Log:
HBASE-9198 RpcClient#call could hang

Modified:
    hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java

Modified: hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java?rev=1513583&r1=1513582&r2=1513583&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
(original)
+++ hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
Tue Aug 13 16:28:02 2013
@@ -1366,8 +1366,11 @@ public class RpcClient {
     //noinspection SynchronizationOnLocalVariableOrMethodParameter
     synchronized (call) {
       while (!call.done) {
+        if (connection.shouldCloseConnection.get()) {
+          throw new IOException("Unexpected closed connection");
+        }
         try {
-          call.wait();                           // wait for the result
+          call.wait(1000);                       // wait for the result
         } catch (InterruptedException ignored) {
           // save the fact that we were interrupted
           interrupted = true;



Mime
View raw message