HBASE-7293 [replication] Remove dead sinks from ReplicationSource.currentPeers and pick new ones

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1437240 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
larsh 2013-01-22 23:57:19 +00:00
parent f60b8246e7
commit e488304992
1 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.replication.regionserver;
import java.io.EOFException; import java.io.EOFException;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.net.ConnectException;
import java.net.SocketTimeoutException; import java.net.SocketTimeoutException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -52,7 +53,6 @@ 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.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.regionserver.wal.HLog; import org.apache.hadoop.hbase.regionserver.wal.HLog;
import org.apache.hadoop.hbase.regionserver.wal.HLogFactory;
import org.apache.hadoop.hbase.regionserver.wal.HLogKey; import org.apache.hadoop.hbase.regionserver.wal.HLogKey;
import org.apache.hadoop.hbase.regionserver.wal.WALEdit; import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
import org.apache.hadoop.hbase.replication.ReplicationZookeeper; import org.apache.hadoop.hbase.replication.ReplicationZookeeper;
@ -664,6 +664,9 @@ public class ReplicationSource extends Thread
"call to the remote cluster timed out, which is usually " + "call to the remote cluster timed out, which is usually " +
"caused by a machine failure or a massive slowdown", "caused by a machine failure or a massive slowdown",
this.socketTimeoutMultiplier); this.socketTimeoutMultiplier);
} else if (ioe instanceof ConnectException) {
LOG.warn("Peer is unavailable, rechecking all sinks: ", ioe);
chooseSinks();
} else { } else {
LOG.warn("Can't replicate because of a local or network error: ", ioe); LOG.warn("Can't replicate because of a local or network error: ", ioe);
} }