[jira] [Updated] (HBASE-23231) ReplicationSource do not update metrics after refresh

2020-01-03 Thread Guanghao Zhang (Jira)


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

Guanghao Zhang updated HBASE-23231:
---
Fix Version/s: (was: 2.2.2)
   2.2.3

> ReplicationSource do not update metrics after refresh
> -
>
> Key: HBASE-23231
> URL: https://issues.apache.org/jira/browse/HBASE-23231
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.2.2
>Reporter: Lijin Bin
>Assignee: Lijin Bin
>Priority: Major
> Fix For: 3.0.0, 2.3.0, 2.1.8, 2.2.3
>
>
> When replication refresh to new state, it will create a new source and 
> terminate the old source and replace the old source with new source.
> {code}
>   public void refreshSources(String peerId) throws IOException {
> String terminateMessage = "Peer " + peerId +
>   " state or config changed. Will close the previous replication source 
> and open a new one";
> ReplicationPeer peer = replicationPeers.getPeer(peerId);
> ReplicationSourceInterface src = createSource(peerId, peer);
> // synchronized on latestPaths to avoid missing the new log
> synchronized (this.latestPaths) {
>   ReplicationSourceInterface toRemove = this.sources.put(peerId, src);
>   if (toRemove != null) {
> LOG.info("Terminate replication source for " + toRemove.getPeerId());
> toRemove.terminate(terminateMessage);
>   }
>   for (NavigableSet walsByGroup : walsById.get(peerId).values()) {
> walsByGroup.forEach(wal -> src.enqueueLog(new Path(this.logDir, 
> wal)));
>   }
> }
> LOG.info("Startup replication source for " + src.getPeerId());
> src.startup();
> {code}
> terminate replication source will remove all metrics, current terminate 
> replication source be called after create new source which do init metrics, 
> so the result is there is no corresponding metrics after refresh replication 
> source.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HBASE-23231) ReplicationSource do not update metrics after refresh

2019-10-31 Thread Duo Zhang (Jira)


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

Duo Zhang updated HBASE-23231:
--
Fix Version/s: 2.2.2
   2.1.8
   2.3.0
   3.0.0

> ReplicationSource do not update metrics after refresh
> -
>
> Key: HBASE-23231
> URL: https://issues.apache.org/jira/browse/HBASE-23231
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.2.2
>Reporter: Lijin Bin
>Assignee: Lijin Bin
>Priority: Major
> Fix For: 3.0.0, 2.3.0, 2.2.2, 2.1.8
>
>
> When replication refresh to new state, it will create a new source and 
> terminate the old source and replace the old source with new source.
> {code}
>   public void refreshSources(String peerId) throws IOException {
> String terminateMessage = "Peer " + peerId +
>   " state or config changed. Will close the previous replication source 
> and open a new one";
> ReplicationPeer peer = replicationPeers.getPeer(peerId);
> ReplicationSourceInterface src = createSource(peerId, peer);
> // synchronized on latestPaths to avoid missing the new log
> synchronized (this.latestPaths) {
>   ReplicationSourceInterface toRemove = this.sources.put(peerId, src);
>   if (toRemove != null) {
> LOG.info("Terminate replication source for " + toRemove.getPeerId());
> toRemove.terminate(terminateMessage);
>   }
>   for (NavigableSet walsByGroup : walsById.get(peerId).values()) {
> walsByGroup.forEach(wal -> src.enqueueLog(new Path(this.logDir, 
> wal)));
>   }
> }
> LOG.info("Startup replication source for " + src.getPeerId());
> src.startup();
> {code}
> terminate replication source will remove all metrics, current terminate 
> replication source be called after create new source which do init metrics, 
> so the result is there is no corresponding metrics after refresh replication 
> source.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HBASE-23231) ReplicationSource do not update metrics after refresh

2019-10-31 Thread Duo Zhang (Jira)


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

Duo Zhang updated HBASE-23231:
--
Component/s: wal

> ReplicationSource do not update metrics after refresh
> -
>
> Key: HBASE-23231
> URL: https://issues.apache.org/jira/browse/HBASE-23231
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.2.2
>Reporter: Lijin Bin
>Assignee: Lijin Bin
>Priority: Major
>
> When replication refresh to new state, it will create a new source and 
> terminate the old source and replace the old source with new source.
> {code}
>   public void refreshSources(String peerId) throws IOException {
> String terminateMessage = "Peer " + peerId +
>   " state or config changed. Will close the previous replication source 
> and open a new one";
> ReplicationPeer peer = replicationPeers.getPeer(peerId);
> ReplicationSourceInterface src = createSource(peerId, peer);
> // synchronized on latestPaths to avoid missing the new log
> synchronized (this.latestPaths) {
>   ReplicationSourceInterface toRemove = this.sources.put(peerId, src);
>   if (toRemove != null) {
> LOG.info("Terminate replication source for " + toRemove.getPeerId());
> toRemove.terminate(terminateMessage);
>   }
>   for (NavigableSet walsByGroup : walsById.get(peerId).values()) {
> walsByGroup.forEach(wal -> src.enqueueLog(new Path(this.logDir, 
> wal)));
>   }
> }
> LOG.info("Startup replication source for " + src.getPeerId());
> src.startup();
> {code}
> terminate replication source will remove all metrics, current terminate 
> replication source be called after create new source which do init metrics, 
> so the result is there is no corresponding metrics after refresh replication 
> source.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HBASE-23231) ReplicationSource do not update metrics after refresh

2019-10-30 Thread Lijin Bin (Jira)


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

Lijin Bin updated HBASE-23231:
--
Summary: ReplicationSource do not update metrics after refresh  (was: 
ReplicationSource do not update metrics when refresh)

> ReplicationSource do not update metrics after refresh
> -
>
> Key: HBASE-23231
> URL: https://issues.apache.org/jira/browse/HBASE-23231
> Project: HBase
>  Issue Type: Bug
>Affects Versions: 2.2.2
>Reporter: Lijin Bin
>Assignee: Lijin Bin
>Priority: Major
>
> When replication refresh to new state, it will create a new source and 
> terminate the old source and replace the old source with new source.
> {code}
>   public void refreshSources(String peerId) throws IOException {
> String terminateMessage = "Peer " + peerId +
>   " state or config changed. Will close the previous replication source 
> and open a new one";
> ReplicationPeer peer = replicationPeers.getPeer(peerId);
> ReplicationSourceInterface src = createSource(peerId, peer);
> // synchronized on latestPaths to avoid missing the new log
> synchronized (this.latestPaths) {
>   ReplicationSourceInterface toRemove = this.sources.put(peerId, src);
>   if (toRemove != null) {
> LOG.info("Terminate replication source for " + toRemove.getPeerId());
> toRemove.terminate(terminateMessage);
>   }
>   for (NavigableSet walsByGroup : walsById.get(peerId).values()) {
> walsByGroup.forEach(wal -> src.enqueueLog(new Path(this.logDir, 
> wal)));
>   }
> }
> LOG.info("Startup replication source for " + src.getPeerId());
> src.startup();
> {code}
> terminate replication source will remove all metrics, current terminate 
> replication source be called after create new source which do init metrics, 
> so the result is there is no corresponding metrics after refresh replication 
> source.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)