hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1089700 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
Date Thu, 07 Apr 2011 00:59:24 GMT
Author: jdcryans
Date: Thu Apr  7 00:59:24 2011
New Revision: 1089700

URL: http://svn.apache.org/viewvc?rev=1089700&view=rev
Log:
HBASE-3747  ReplicationSource should differanciate remote and local exceptions

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1089700&r1=1089699&r2=1089700&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Thu Apr  7 00:59:24 2011
@@ -11,6 +11,7 @@ Release 0.90.3 - Unreleased
   IMPROVEMENT
    HBASE-3717  deprecate HTable isTableEnabled() methods in favor of HBaseAdmin
                methods (David Butler via Stack)
+   HBASE-3747  ReplicationSource should differanciate remote and local exceptions
 
   TASK
    HBASE-3748  Add rolling of thrift/rest daemons to graceful_stop.sh script

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java?rev=1089700&r1=1089699&r2=1089700&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
Thu Apr  7 00:59:24 2011
@@ -54,6 +54,7 @@ import org.apache.hadoop.hbase.regionser
 import org.apache.hadoop.hbase.replication.ReplicationZookeeper;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Threads;
+import org.apache.hadoop.ipc.RemoteException;
 import org.apache.zookeeper.KeeperException;
 
 /**
@@ -568,16 +569,18 @@ public class ReplicationSource extends T
         break;
 
       } catch (IOException ioe) {
-        LOG.warn("Unable to replicate because ", ioe);
+        if (ioe instanceof RemoteException) {
+          ioe = ((RemoteException) ioe).unwrapRemoteException();
+          LOG.warn("Can't replicate because of an error on the remote cluster: ", ioe);
+        } else {
+          LOG.warn("Can't replicate because of a local or network error: ", ioe);
+        }
         try {
           boolean down;
           do {
             down = isSlaveDown();
             if (down) {
-              LOG.debug("The region server we tried to ping didn't answer, " +
-                  "sleeping " + sleepForRetries + " times " + sleepMultiplier);
-              Thread.sleep(this.sleepForRetries * sleepMultiplier);
-              if (sleepMultiplier < maxRetriesMultiplier) {
+              if (sleepForRetries("Since we are unable to replicate", sleepMultiplier)) {
                 sleepMultiplier++;
               } else {
                 chooseSinks();
@@ -673,6 +676,9 @@ public class ReplicationSource extends T
           rrs.getHServerInfo();
           latch.countDown();
         } catch (IOException ex) {
+          if (ex instanceof RemoteException) {
+            ex = ((RemoteException) ex).unwrapRemoteException();
+          }
           LOG.info("Slave cluster looks down: " + ex.getMessage());
         }
       }



Mime
View raw message