You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "meethngala (via GitHub)" <gi...@apache.org> on 2023/07/18 23:56:06 UTC
[GitHub] [gobblin] meethngala opened a new pull request, #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
meethngala opened a new pull request, #3717:
URL: https://github.com/apache/gobblin/pull/3717
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
### JIRA
- [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-1856
### Description
- [ ] Here are some details about my PR, including screenshots (if applicable):
### Tests
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
### Commits
- [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] meethngala commented on a diff in pull request #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
Posted by "meethngala (via GitHub)" <gi...@apache.org>.
meethngala commented on code in PR #3717:
URL: https://github.com/apache/gobblin/pull/3717#discussion_r1268776061
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -94,10 +95,12 @@ public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction flo
throws IOException {
if (multiActiveLeaseArbiter.isPresent()) {
MultiActiveLeaseArbiter.LeaseAttemptStatus leaseAttemptStatus = multiActiveLeaseArbiter.get().tryAcquireLease(flowAction, eventTimeMillis);
- // TODO: add a log event or metric for each of these cases
if (leaseAttemptStatus instanceof MultiActiveLeaseArbiter.LeaseObtainedStatus) {
MultiActiveLeaseArbiter.LeaseObtainedStatus leaseObtainedStatus = (MultiActiveLeaseArbiter.LeaseObtainedStatus) leaseAttemptStatus;
+ this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_LEASE_OBTAINED_COUNT);
Review Comment:
I had a different idea in mind since I only wanted to check if the `FlowTriggerHandler` gets different types of statuses or not. But I guess initializing at class level and `inc()` the counter will help gauge if the traffic distribution is happening uniformly between the hosts or not!
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] umustafi commented on a diff in pull request #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #3717:
URL: https://github.com/apache/gobblin/pull/3717#discussion_r1268640139
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -107,10 +110,12 @@ public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction flo
eventTimeMillis);
return;
} else if (leaseAttemptStatus instanceof MultiActiveLeaseArbiter.LeasedToAnotherStatus) {
+ this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_LEASED_TO_ANOTHER_COUNT);
Review Comment:
do you want to add logs here for now for the other cases as well? Maybe they can be debug level logs
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -94,10 +95,12 @@ public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction flo
throws IOException {
if (multiActiveLeaseArbiter.isPresent()) {
MultiActiveLeaseArbiter.LeaseAttemptStatus leaseAttemptStatus = multiActiveLeaseArbiter.get().tryAcquireLease(flowAction, eventTimeMillis);
- // TODO: add a log event or metric for each of these cases
if (leaseAttemptStatus instanceof MultiActiveLeaseArbiter.LeaseObtainedStatus) {
MultiActiveLeaseArbiter.LeaseObtainedStatus leaseObtainedStatus = (MultiActiveLeaseArbiter.LeaseObtainedStatus) leaseAttemptStatus;
+ this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_LEASE_OBTAINED_COUNT);
Review Comment:
Overall flow of creating and using these metrics should be
1. create counter at class level
2. register the metric with metric context
3. call counter.count/mark() every time you want it to increase
Here you are creating a new one every time you mean to actually increment it. For ex: https://github.com/apache/gobblin/blob/4a9dd53b885f0166dccac5026e4e2c632c98a419/gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagActionStoreChangeMonitor.java#L113
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] codecov-commenter commented on pull request #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3717:
URL: https://github.com/apache/gobblin/pull/3717#issuecomment-1642727451
## [Codecov](https://app.codecov.io/gh/apache/gobblin/pull/3717?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#3717](https://app.codecov.io/gh/apache/gobblin/pull/3717?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (852e001) into [master](https://app.codecov.io/gh/apache/gobblin/commit/c4a466b414c43a59ddead75de25ae87e6732b716?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (c4a466b) will **decrease** coverage by `2.03%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #3717 +/- ##
============================================
- Coverage 46.96% 44.94% -2.03%
+ Complexity 10818 2117 -8701
============================================
Files 2143 412 -1731
Lines 84600 17821 -66779
Branches 9404 2171 -7233
============================================
- Hits 39733 8009 -31724
+ Misses 41241 8951 -32290
+ Partials 3626 861 -2765
```
[see 1734 files with indirect coverage changes](https://app.codecov.io/gh/apache/gobblin/pull/3717/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] umustafi commented on a diff in pull request #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on code in PR #3717:
URL: https://github.com/apache/gobblin/pull/3717#discussion_r1268778877
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -94,10 +95,12 @@ public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction flo
throws IOException {
if (multiActiveLeaseArbiter.isPresent()) {
MultiActiveLeaseArbiter.LeaseAttemptStatus leaseAttemptStatus = multiActiveLeaseArbiter.get().tryAcquireLease(flowAction, eventTimeMillis);
- // TODO: add a log event or metric for each of these cases
if (leaseAttemptStatus instanceof MultiActiveLeaseArbiter.LeaseObtainedStatus) {
MultiActiveLeaseArbiter.LeaseObtainedStatus leaseObtainedStatus = (MultiActiveLeaseArbiter.LeaseObtainedStatus) leaseAttemptStatus;
+ this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_LEASE_OBTAINED_COUNT);
Review Comment:
Discussed offline and agreed the counter will provide more information about load balancing and relative amount of occurrence of each case
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] meethngala commented on a diff in pull request #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
Posted by "meethngala (via GitHub)" <gi...@apache.org>.
meethngala commented on code in PR #3717:
URL: https://github.com/apache/gobblin/pull/3717#discussion_r1268777193
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -107,10 +110,12 @@ public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction flo
eventTimeMillis);
return;
} else if (leaseAttemptStatus instanceof MultiActiveLeaseArbiter.LeasedToAnotherStatus) {
+ this.metricContext.contextAwareCounter(ServiceMetricNames.FLOW_TRIGGER_HANDLER_LEASED_TO_ANOTHER_COUNT);
Review Comment:
I wanted to but then realized that we do spit out some logs as part of this method `scheduleReminderForEvent` and didn't want to make it noisy for emitting similar logs. However, I have added a debug level log when we no longer attempt for a lease... since I found that to be missing :)
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [gobblin] Will-Lo merged pull request #3717: [GOBBLIN- 1856] Add flow trigger handler leasing metrics
Posted by "Will-Lo (via GitHub)" <gi...@apache.org>.
Will-Lo merged PR #3717:
URL: https://github.com/apache/gobblin/pull/3717
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org