You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2021/12/02 07:22:10 UTC
[GitHub] [incubator-inlong] shink opened a new issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
shink opened a new issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875
### Description
We can abstract an interface so that we can use the same interface with different monitor implementations.
For example.
```java
public abstract class AbstractSourceStatManager {
// metric
protected CounterMetric successCount;
public void incrSuccessCount() {
successCount.incr();
}
}
```
After `SourceJMXStatManager` and `SourcePrometheusStatManager` implement it, we can use the same interface with different implementations in `DatabaseSource`.
```java
public class DatabaseSource {
private final AbstractSourceStatManager statManager;
public MySource() {
statManager = new SourceJMXStatManager();
}
public MySource(AbstractSourceStatManager statManager) {
this.statManager = statManager;
}
public void split() {
// do something
// increment metric
statManager.incrSuccessCount();
}
}
```
```java
// prometheus.enable=false
DatabaseSource source = new DatabaseSource();
// prometheus.enable=true
DatabaseSource source = new DatabaseSource(new SourcePrometheusStatManager(...));
source.split();
```
### InLong Component
Other for not specified component
### Are you willing to submit PR?
- [X] Yes, I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] gosonzhang commented on issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
Posted by GitBox <gi...@apache.org>.
gosonzhang commented on issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875#issuecomment-989658387
@shink, ok, I get it
By the way, does this PR need to be incorporated into version 0.12.0? I see that it is still in an error state but has not been processed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] shink commented on issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
Posted by GitBox <gi...@apache.org>.
shink commented on issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875#issuecomment-989661092
@gosonzhang Yeah. I have found the reason for the error, and I will complete it tonight.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] shink commented on issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
Posted by GitBox <gi...@apache.org>.
shink commented on issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875#issuecomment-989653342
@gosonzhang I will propose a solution in PR #1866. And this PR has followed the above idea.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] shink closed issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
Posted by GitBox <gi...@apache.org>.
shink closed issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] gosonzhang commented on issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
Posted by GitBox <gi...@apache.org>.
gosonzhang commented on issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875#issuecomment-989647818
@shink, the idea should be no problem, why close this issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] gosonzhang commented on issue #1875: [Improve][InLong-Common] Improve JMX and Prometheus monitor interface
Posted by GitBox <gi...@apache.org>.
gosonzhang commented on issue #1875:
URL: https://github.com/apache/incubator-inlong/issues/1875#issuecomment-989729945
Ok,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org