From e48830499231563057fc8ceb5ff41fee1e6503d5 Mon Sep 17 00:00:00 2001 From: larsh Date: Tue, 22 Jan 2013 23:57:19 +0000 Subject: [PATCH] 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 --- .../hbase/replication/regionserver/ReplicationSource.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index b51e5c26397..4407af04e96 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.replication.regionserver; import java.io.EOFException; import java.io.FileNotFoundException; import java.io.IOException; +import java.net.ConnectException; import java.net.SocketTimeoutException; import java.util.ArrayList; 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.protobuf.ProtobufUtil; 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.WALEdit; 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 " + "caused by a machine failure or a massive slowdown", this.socketTimeoutMultiplier); + } else if (ioe instanceof ConnectException) { + LOG.warn("Peer is unavailable, rechecking all sinks: ", ioe); + chooseSinks(); } else { LOG.warn("Can't replicate because of a local or network error: ", ioe); }