hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1145766 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
Date Tue, 12 Jul 2011 20:53:06 GMT
Author: tedyu
Date: Tue Jul 12 20:53:06 2011
New Revision: 1145766

URL: http://svn.apache.org/viewvc?rev=1145766&view=rev
Log:
HBASE-4003  Cleanup Calls Conservatively On Timeout - revert

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1145766&r1=1145765&r2=1145766&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Jul 12 20:53:06 2011
@@ -304,7 +304,6 @@ Release 0.91.0 - Unreleased
    HBASE-4010  HMaster.createTable could be heavily optimized
    HBASE-3506  Ability to disable, drop and enable tables using regex expression
                (Joey Echeverria via Ted Yu)
-   HBASE-4003  Cleanup Calls Conservatively On Timeout (Karthick Sankarachary)
    HBASE-3516  Coprocessors: add test cases for loading coprocessor jars
                (Mingjie Lai via garyh)
    HBASE-4036  Implementing a MultipleColumnPrefixFilter (Anirudh Todi)

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java?rev=1145766&r1=1145765&r2=1145766&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java Tue Jul 12 20:53:06
2011
@@ -167,11 +167,9 @@ public class HBaseClient {
     Writable value;                               // value, null if error
     IOException error;                            // exception, null if value
     boolean done;                                 // true when call is done
-    long startTime;
 
     protected Call(Writable param) {
       this.param = param;
-      this.startTime = System.currentTimeMillis();
       synchronized (HBaseClient.this) {
         this.id = counter++;
       }
@@ -203,10 +201,6 @@ public class HBaseClient {
       this.value = value;
       callComplete();
     }
-
-    public long getStartTime() {
-      return this.startTime;
-    }
   }
 
   /** Thread that reads responses and notifies callers.  Each connection owns a
@@ -580,7 +574,7 @@ public class HBaseClient {
           // since we expect certain responses to not make it by the specified
           // {@link ConnectionId#rpcTimeout}.
           closeException = ste;
-          cleanupCalls(remoteId.rpcTimeout);
+          cleanupCalls();
         } else {
           // Since the server did not respond within the default ping interval
           // time, treat this as a fatal condition and close this connection
@@ -641,21 +635,15 @@ public class HBaseClient {
 
     /* Cleanup all calls and mark them as done */
     private void cleanupCalls() {
-      cleanupCalls(0);
-    }
-
-    private synchronized void cleanupCalls(long rpcTimeout) {
       Iterator<Entry<Integer, Call>> itor = calls.entrySet().iterator() ;
       while (itor.hasNext()) {
         Call c = itor.next().getValue();
-        if (System.currentTimeMillis() - c.getStartTime() > rpcTimeout) {
-          c.setException(closeException); // local exception
-          // Notify the open calls, so they are aware of what just happened
-          synchronized (c) {
-            c.notifyAll();
-          }
-          itor.remove();
+        c.setException(closeException); // local exception
+        // Notify the open calls, so they are aware of what just happened
+        synchronized (c) {
+          c.notifyAll();
         }
+        itor.remove();
       }
     }
   }



Mime
View raw message