HBASE-8229 Replication code logs like crazy if a target table cannot be found.

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1464278 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2013-04-04 03:50:57 +00:00
parent 91ded8af10
commit 05defbdce3
1 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,7 @@ import org.apache.hadoop.hbase.Stoppable;
import org.apache.hadoop.hbase.client.AdminProtocol; import org.apache.hadoop.hbase.client.AdminProtocol;
import org.apache.hadoop.hbase.client.HConnection; import org.apache.hadoop.hbase.client.HConnection;
import org.apache.hadoop.hbase.client.HConnectionManager; import org.apache.hadoop.hbase.client.HConnectionManager;
import org.apache.hadoop.hbase.exceptions.TableNotFoundException;
import org.apache.hadoop.hbase.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.protobuf.ReplicationProtbufUtil; import org.apache.hadoop.hbase.protobuf.ReplicationProtbufUtil;
import org.apache.hadoop.hbase.regionserver.wal.HLog; import org.apache.hadoop.hbase.regionserver.wal.HLog;
@ -722,6 +723,12 @@ public class ReplicationSource extends Thread
if (ioe instanceof RemoteException) { if (ioe instanceof RemoteException) {
ioe = ((RemoteException) ioe).unwrapRemoteException(); ioe = ((RemoteException) ioe).unwrapRemoteException();
LOG.warn("Can't replicate because of an error on the remote cluster: ", ioe); LOG.warn("Can't replicate because of an error on the remote cluster: ", ioe);
if (ioe instanceof TableNotFoundException) {
if (sleepForRetries("A table is missing in the peer cluster. "
+ "Replication cannot proceed without losing data.", sleepMultiplier)) {
sleepMultiplier++;
}
}
} else { } else {
if (ioe instanceof SocketTimeoutException) { if (ioe instanceof SocketTimeoutException) {
// This exception means we waited for more than 60s and nothing // This exception means we waited for more than 60s and nothing