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

2019-02-19 Thread Lingeshwaran Radhakrishnan (JIRA)


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

Lingeshwaran Radhakrishnan commented on HBASE-21312:


Thank you [~daisuke.kobayashi] 

> 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
>Assignee: Lingeshwaran Radhakrishnan
>Priority: Minor
>  Labels: supportability
> Attachments: HBASE-21312-master-001.patch, 
> HBASE-21312-master-002.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)


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

2019-02-19 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Labels: supportability  (was: )
Attachment: HBASE-21312-master-002.patch
Status: Patch Available  (was: In Progress)

Addressed the patch V1 review comments and also addressed the checkstyle 
warnings.

> 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: 1.4.7, 2.0.2
>Reporter: Lingeshwaran Radhakrishnan
>Assignee: Lingeshwaran Radhakrishnan
>Priority: Minor
>  Labels: supportability
> Attachments: HBASE-21312-master-001.patch, 
> HBASE-21312-master-002.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)


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

2019-02-19 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: (was: HBASE-21312-master-002.patch)

> 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
>Assignee: 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)


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

2019-02-18 Thread Lingeshwaran Radhakrishnan (JIRA)


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

Lingeshwaran Radhakrishnan commented on HBASE-21312:


I am unable to change the status of the Jira to Patch Available, maybe I am not 
the Assignee yet?. Can you assign this Jira to me?

> 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, 
> HBASE-21312-master-002.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)


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

2019-02-18 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: HBASE-21312-master-002.patch

> 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, 
> HBASE-21312-master-002.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)


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

2019-02-18 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: (was: HBASE-21312-master-002.patch)

> 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)


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

2019-02-18 Thread Lingeshwaran Radhakrishnan (JIRA)


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

Lingeshwaran Radhakrishnan commented on HBASE-21312:


[~yuzhih...@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)


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

2019-02-18 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: HBASE-21312-master-002.patch

> 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, 
> HBASE-21312-master-002.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)


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

2018-10-14 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: (was: HBASE-21312-master-001.patch)

> 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)


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

2018-10-14 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: HBASE-21312-master-001.patch
Status: Patch Available  (was: Open)

> 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: 1.4.7, 2.0.2
>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)


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

2018-10-14 Thread Lingeshwaran Radhakrishnan (JIRA)


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

Lingeshwaran Radhakrishnan commented on HBASE-21312:


I am interested to work on this. Attached an initial version of the patch. Let 
me know if there is anything to improve the patch.

> 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)


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

2018-10-14 Thread Lingeshwaran Radhakrishnan (JIRA)


 [ 
https://issues.apache.org/jira/browse/HBASE-21312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lingeshwaran Radhakrishnan updated HBASE-21312:
---
Attachment: HBASE-21312-master-001.patch

> 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)


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

2018-10-14 Thread Lingeshwaran Radhakrishnan (JIRA)
Lingeshwaran Radhakrishnan created HBASE-21312:
--

 Summary: 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: 1.4.7, 2.0.2
Reporter: Lingeshwaran Radhakrishnan


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)