HBASE-17675 ReplicationEndpoint should choose new sinks if a SaslException occurs
Signed-off-by: Andrew Purtell <apurt...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/27a8aa99 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/27a8aa99 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/27a8aa99 Branch: refs/heads/branch-1 Commit: 27a8aa99d913899752cbbf48bb4b639d299fca83 Parents: cdb3883 Author: rgidwani <rgidw...@salesforce.com> Authored: Tue Feb 21 15:17:21 2017 -0800 Committer: Andrew Purtell <apurt...@apache.org> Committed: Tue Feb 21 18:45:15 2017 -0800 ---------------------------------------------------------------------- .../regionserver/HBaseInterClusterReplicationEndpoint.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/27a8aa99/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java index 548f716..be4fc7b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java @@ -54,6 +54,7 @@ import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.FSUtils; import org.apache.hadoop.hbase.wal.WAL.Entry; import org.apache.hadoop.ipc.RemoteException; +import javax.security.sasl.SaslException; import com.google.common.annotations.VisibleForTesting; @@ -293,6 +294,9 @@ public class HBaseInterClusterReplicationEndpoint extends HBaseReplicationEndpoi + "Replication cannot proceed without losing data.", sleepMultiplier)) { sleepMultiplier++; } + } else if (ioe instanceof SaslException) { + LOG.warn("Peer encountered SaslException, rechecking all sinks: ", ioe); + replicationSinkMgr.chooseSinks(); } } else { if (ioe instanceof SocketTimeoutException) {