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/3c7e96a6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3c7e96a6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3c7e96a6 Branch: refs/heads/branch-1.2 Commit: 3c7e96a6fde2fad85483631032c7526a96e49f22 Parents: fdb7655 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:26 2017 -0800 ---------------------------------------------------------------------- .../regionserver/HBaseInterClusterReplicationEndpoint.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/3c7e96a6/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 9300d4b..8176384 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 @@ -52,6 +52,7 @@ import org.apache.hadoop.hbase.replication.HBaseReplicationEndpoint; import org.apache.hadoop.hbase.replication.ReplicationPeer.PeerState; import org.apache.hadoop.hbase.replication.regionserver.ReplicationSinkManager.SinkPeer; import org.apache.hadoop.ipc.RemoteException; +import javax.security.sasl.SaslException; /** * A {@link org.apache.hadoop.hbase.replication.ReplicationEndpoint} @@ -263,6 +264,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) {