You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Lingeshwaran Radhakrishnan (JIRA)" <ji...@apache.org> on 2019/02/18 10:43:01 UTC

[jira] [Commented] (HBASE-21312) ReplicationSource should log the incorrect peerClusterId at Error level instead of Info

    [ https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770982#comment-16770982 ] 

Lingeshwaran Radhakrishnan commented on HBASE-21312:
----------------------------------------------------

[~yuzhihong@gmail.com]  

Thank you for your comment. It was by mistake and I have corrected it in the updated/revised V2 patch posted. I have also addressed the Unit test and Checkstyle failures reported. Please have a look and let me know in case of any further feedback.

> ReplicationSource should log the incorrect peerClusterId at Error level instead of Info
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-21312
>                 URL: https://issues.apache.org/jira/browse/HBASE-21312
>             Project: HBase
>          Issue Type: Improvement
>          Components: Replication
>    Affects Versions: 2.0.2, 1.4.7
>            Reporter: Lingeshwaran Radhakrishnan
>            Priority: Minor
>         Attachments: HBASE-21312-master-001.patch
>
>
> Normally, Replication needs peer cluster ID to be different from the source. However, if target carries the same cluster ID as source, then during the ReplicationSource initialization process, following is reported in the RegionServer logs before terminating the ReplicationSource thread.
> {code:java}
> 2018-10-08 10:19:09,155 INFO org.apache.hadoop.hbase.replication.regionserver.ReplicationSource: Closing source 1 because: ClusterId 67318852-e2b7-47a7-a303-f1722cb61a06 is replicating to itself: peerClusterId 67318852-e2b7-47a7-a303-f1722cb61a06 which is not allowed by ReplicationEndpoint:org.apache.hadoop.hbase.replication.regionserver.HBaseInterClusterReplicationEndpoint{code}
> Here is the related code snippet which does this in the ReplicationSource class
> {code:java}
> // In rare case, zookeeper setting may be messed up. That leads to the incorrect
>  // peerClusterId value, which is the same as the source clusterId
>  if (clusterId.equals(peerClusterId) && !replicationEndpoint.canReplicateToSameCluster()) {
>  this.terminate("ClusterId " + clusterId + " is replicating to itself: peerClusterId "
>  + peerClusterId + " which is not allowed by ReplicationEndpoint:"
>  + replicationEndpoint.getClass().getName(), null, false);
>  this.manager.removeSource(this);
>  return;
>  }{code}
> It would be good to have this logged at ERROR level instead of INFO for the following reasons
> 1. Under normal situation/case, the Peer Cluster ID would be different
> 2. It would help to easily troubleshoot issues that arises due to matching replication Peer cluster ID



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)