Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21312

ReplicationSource should log the incorrect peerClusterId at Error level instead of Info

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 2.0.2, 1.4.7
    • None
    • Replication

    Description

      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.

      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

      Here is the related code snippet which does this in the ReplicationSource class

      // 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;
       }

      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

      Attachments

        1. HBASE-21312-master-001.patch
          6 kB
          Lingeshwaran Radhakrishnan
        2. HBASE-21312-master-002.patch
          8 kB
          Lingeshwaran Radhakrishnan

        Activity

          People

            lingesh Lingeshwaran Radhakrishnan
            lingesh Lingeshwaran Radhakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: