You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jx...@apache.org on 2013/08/13 18:28:03 UTC
svn commit: r1513583 -
/hbase/branches/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
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;