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/07/29 02:53:17 UTC
svn commit: r1507878 -
/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Author: jxiang
Date: Mon Jul 29 00:53:17 2013
New Revision: 1507878
URL: http://svn.apache.org/r1507878
Log:
HBASE-9050 HBaseClient#call could hang
Modified:
hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java?rev=1507878&r1=1507877&r2=1507878&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Mon Jul 29 00:53:17 2013
@@ -977,8 +977,11 @@ public class HBaseClient {
//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;