You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2022/04/12 01:14:40 UTC
[GitHub] [gobblin] Will-Lo opened a new pull request, #3491: [GOBBLIN-1630] Remove flow level metrics for adhoc flows
Will-Lo opened a new pull request, #3491:
URL: https://github.com/apache/gobblin/pull/3491
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
- [x] 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-1630
### Description
- [x] Here are some details about my PR, including screenshots (if applicable):
Gobblin-as-a-Service emits flow level events for users to keep track of their flow compilation status, job status, number of workunits etc. However, users rarely if ever track adhoc-flows, where they are generally used in a fire-and-forget manner. Furthermore, keeping track of metrics continuously adds strains to the metric libraries which leads to wasted resources.
We should only be emitting flow level events for flows that are scheduled and saved.
This PR adds a flag for adhoc flows such that downstream executions can also differentiate scheduled and adhoc flows, so that downstream workloads can also prevent the emission of metrics for these flows that are not tracked.
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
### Commits
- [x] 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] ZihanLi58 commented on a diff in pull request #3491: [GOBBLIN-1630] Remove flow level metrics for adhoc flows
Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on code in PR #3491:
URL: https://github.com/apache/gobblin/pull/3491#discussion_r851477280
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java:
##########
@@ -402,6 +402,17 @@ private void deleteFromExecutor(Spec spec, Properties headers) {
}
}
+ /**
Review Comment:
Seems like duplicate code as defined in DagManager, will it be possible to move to be one common static method?
--
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] ZihanLi58 commented on a diff in pull request #3491: [GOBBLIN-1630] Remove flow level metrics for adhoc flows
Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on code in PR #3491:
URL: https://github.com/apache/gobblin/pull/3491#discussion_r852484580
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java:
##########
@@ -402,6 +402,17 @@ private void deleteFromExecutor(Spec spec, Properties headers) {
}
}
+ /**
Review Comment:
Synced offline and seems the types of guage are different and make it difficult to merge two methods, no need to address in this PR
--
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 #3491: [GOBBLIN-1630] Remove flow level metrics for adhoc flows
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3491:
URL: https://github.com/apache/gobblin/pull/3491#issuecomment-1096967530
# [Codecov](https://codecov.io/gh/apache/gobblin/pull/3491?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3491](https://codecov.io/gh/apache/gobblin/pull/3491?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (146c367) into [master](https://codecov.io/gh/apache/gobblin/commit/74c4290e0b0cb46be7b5820d85486978c2939b0d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (74c4290) will **decrease** coverage by `3.27%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #3491 +/- ##
============================================
- Coverage 46.68% 43.41% -3.28%
+ Complexity 10389 2033 -8356
============================================
Files 2077 405 -1672
Lines 81138 17428 -63710
Branches 9057 2128 -6929
============================================
- Hits 37883 7567 -30316
+ Misses 39767 9021 -30746
+ Partials 3488 840 -2648
```
| [Impacted Files](https://codecov.io/gh/apache/gobblin/pull/3491?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...lin/util/filesystem/FileSystemInstrumentation.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi11dGlsaXR5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3V0aWwvZmlsZXN5c3RlbS9GaWxlU3lzdGVtSW5zdHJ1bWVudGF0aW9uLmphdmE=) | `85.71% <0.00%> (-7.15%)` | :arrow_down: |
| [.../org/apache/gobblin/cluster/GobblinTaskRunner.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvR29iYmxpblRhc2tSdW5uZXIuamF2YQ==) | `63.46% <0.00%> (-0.33%)` | :arrow_down: |
| [...pache/gobblin/configuration/ConfigurationKeys.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vY29uZmlndXJhdGlvbi9Db25maWd1cmF0aW9uS2V5cy5qYXZh) | | |
| [...blin/service/modules/orchestration/DagManager.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9vcmNoZXN0cmF0aW9uL0RhZ01hbmFnZXIuamF2YQ==) | | |
| [...service/modules/orchestration/DagManagerUtils.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9vcmNoZXN0cmF0aW9uL0RhZ01hbmFnZXJVdGlscy5qYXZh) | | |
| [...in/service/modules/orchestration/Orchestrator.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9vcmNoZXN0cmF0aW9uL09yY2hlc3RyYXRvci5qYXZh) | | |
| [...gobblin/service/modules/spec/JobExecutionPlan.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9zcGVjL0pvYkV4ZWN1dGlvblBsYW4uamF2YQ==) | | |
| [...a/org/apache/gobblin/metrics/ReporterSinkType.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vbWV0cmljcy9SZXBvcnRlclNpbmtUeXBlLmphdmE=) | | |
| [.../gobblin/service/modules/dataset/FormatConfig.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9kYXRhc2V0L0Zvcm1hdENvbmZpZy5qYXZh) | | |
| [...in/java/org/apache/gobblin/runtime/JobContext.java](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvSm9iQ29udGV4dC5qYXZh) | | |
| ... and [1665 more](https://codecov.io/gh/apache/gobblin/pull/3491/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/gobblin/pull/3491?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/gobblin/pull/3491?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [74c4290...146c367](https://codecov.io/gh/apache/gobblin/pull/3491?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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] phet commented on a diff in pull request #3491: [GOBBLIN-1630] Remove flow level metrics for adhoc flows
Posted by GitBox <gi...@apache.org>.
phet commented on code in PR #3491:
URL: https://github.com/apache/gobblin/pull/3491#discussion_r850270819
##########
gobblin-api/src/main/java/org/apache/gobblin/configuration/ConfigurationKeys.java:
##########
@@ -1014,7 +1014,7 @@ public class ConfigurationKeys {
public static final String DATASET_BASE_OUTPUT_PATH_KEY = "gobblin.flow.dataset.baseOutputPath";
public static final String DATASET_COMBINE_KEY = "gobblin.flow.dataset.combine";
public static final String WHITELISTED_EDGE_IDS = "gobblin.flow.whitelistedEdgeIds";
-
+ public static final String GOBBLIN_FLOW_ISADHOC = "gobblin.flow.isAdhoc";
Review Comment:
should we debug a separate namespace for these, which are meant to be internal-only, not to be supplied by a user? e.g. `gobblin.internal.flow.isAdhoc`
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerUtils.java:
##########
@@ -307,6 +307,12 @@ static int getDagQueueId(long flowExecutionId, int numThreads) {
return (int) (flowExecutionId % numThreads);
}
+ static boolean isDagFromAdhocFlow(Dag<JobExecutionPlan> dag) {
+ // Every dag should have at least one node, and every dag will clone the job configurations which include the schedule
+ // defaults to false (so metrics are still tracked) if the dag property is not configured due to old dags
+ return ConfigUtils.getBoolean(dag.getStartNodes().get(0).getValue().getJobSpec().getConfig(), ConfigurationKeys.GOBBLIN_FLOW_ISADHOC,false);
Review Comment:
if `DagMgrUtils` doesn't yet have an abstraction for getting a DAG's job config, we might consider one:
```
.getStartNodes().get(0).getValue().getJobSpec().getConfig()
```
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java:
##########
@@ -237,7 +238,9 @@ public void orchestrate(Spec spec) throws Exception {
if (!canRun(flowName, flowGroup, allowConcurrentExecution)) {
_log.warn("Another instance of flowGroup: {}, flowName: {} running; Skipping flow execution since "
+ "concurrent executions are disabled for this flow.", flowGroup, flowName);
- flowGauges.get(spec.getUri().toString()).setState(CompiledState.SKIPPED);
+ if (flowGauges.containsKey(spec.getUri().toString())) {
+ flowGauges.get(spec.getUri().toString()).setState(CompiledState.SKIPPED);
Review Comment:
consider abstracting, e.g. to:
```
conditionallyUpdateFlowGaugeSpecState(flowGauges, spec, state)
```
OR
```
updateSpecStateIfFlowGauge(spec, state, flowGauges)
```
--
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] ZihanLi58 merged pull request #3491: [GOBBLIN-1630] Remove flow level metrics for adhoc flows
Posted by GitBox <gi...@apache.org>.
ZihanLi58 merged PR #3491:
URL: https://github.com/apache/gobblin/pull/3491
--
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