You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2010/04/08 10:50:12 UTC

svn commit: r931834 - in /hadoop/hbase/branches/0.20_pre_durability: CHANGES.txt src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java

Author: stack
Date: Thu Apr  8 08:50:12 2010
New Revision: 931834

URL: http://svn.apache.org/viewvc?rev=931834&view=rev
Log:
HBASE-2360 Make sure we have all the hadoop fixes in our our copy of its rpc

Modified:
    hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt
    hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java

Modified: hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt?rev=931834&r1=931833&r2=931834&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20_pre_durability/CHANGES.txt Thu Apr  8 08:50:12 2010
@@ -57,6 +57,8 @@ Release 0.20.4 - Unreleased
    HBASE-2277  Update branch to hadoop 0.20.2
    HBASE-2419  Remove from RS logs the fat NotServingRegionException stack
    HBASE-2415  Disable META splitting in 0.20 (Todd Lipcon via Stack)
+   HBASE-2360  Make sure we have all the hadoop fixes in our our copy of its rpc
+               (Todd Lipcon via Stack)
 
   NEW FEATURES
    HBASE-2257  [stargate] multiuser mode

Modified: hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java?rev=931834&r1=931833&r2=931834&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (original)
+++ hadoop/hbase/branches/0.20_pre_durability/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Thu Apr  8 08:50:12 2010
@@ -506,7 +506,7 @@ public class HBaseClient {
         if (LOG.isDebugEnabled())
           LOG.debug(getName() + " got value #" + id);
 
-        Call call = calls.remove(id);
+        Call call = calls.get(id);
 
         boolean isError = in.readBoolean();     // read if error
         if (isError) {
@@ -516,6 +516,7 @@ public class HBaseClient {
           Writable value = ReflectionUtils.newInstance(valueClass, conf);
           value.readFields(in);                 // read value
           call.setValue(value);
+          calls.remove(id);
         }
       } catch (IOException e) {
         markClosed(e);
@@ -711,11 +712,20 @@ public class HBaseClient {
     Call call = new Call(param);
     Connection connection = getConnection(addr, ticket, call);
     connection.sendParam(call);                 // send the parameter
+    boolean interrupted = false;
     synchronized (call) {
       while (!call.done) {
         try {
           call.wait();                           // wait for the result
-        } catch (InterruptedException ignored) {}
+        } catch (InterruptedException ie) {
+          // save the fact that we were interrupted
+          interrupted = true;
+        }
+      }
+
+      if (interrupted) {
+        // set the interrupt flag now that we are done waiting
+        Thread.currentThread().interrupt();
       }
 
       if (call.error != null) {