phet commented on a change in pull request #3357:
URL: https://github.com/apache/gobblin/pull/3357#discussion_r685762840
##########
File path:
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java
##########
@@ -288,13 +287,28 @@ public void orchestrate(Spec spec) throws Exception {
flowMetadata.putIfAbsent(TimingEvent.FlowEventConstants.FLOW_EXECUTION_ID_FIELD,
jobExecutionPlanDag.getNodes().get(0).getValue().getJobSpec().getConfigAsProperties().getProperty(ConfigurationKeys.FLOW_EXECUTION_ID_KEY));
- if (flowCompilationTimer != null) {
- flowCompilationTimer.stop(flowMetadata);
+ if (flowCompilationTimer.isPresent()) {
+ flowCompilationTimer.get().stop(flowMetadata);
}
if (this.dagManager.isPresent()) {
- //Send the dag to the DagManager.
- this.dagManager.get().addDag(jobExecutionPlanDag, true, true);
+ try {
+ //Send the dag to the DagManager.
+ this.dagManager.get().addDag(jobExecutionPlanDag, true, true);
+ } catch (Exception ex) {
Review comment:
`GoblinServiceJobScheduler.runJob` is the only caller, and it both
catches and logs `Exception`. I sought to avoid a duplicate stack trace (since
we continue to unwinding). I dropped the log line in, to report the flow
execution ID.
would you suggest not to log here at all? as an example, the two log
entries look like:
```
2021/08/10 00:08:45.902 WARN [GobblinServiceManager] [JobScheduler-1]
[shared-gobblin-service-war] [] [flow: {flowGroup=testKip, flowName=test001};
exec: 1628579325837] Failed to add
Job Execution Plan due to: No, I won't add the DAG, dawg!
2021/08/10 00:08:45.903 ERROR [GobblinServiceManager] [JobScheduler-1]
[shared-gobblin-service-war] [] Failed to run job gobblin-flow:/testKip/test001
org.apache.gobblin.runtime.JobException: Failed to run Spec:
gobblin-flow:/testKip/test001
at
org.apache.gobblin.service.modules.scheduler.GobblinServiceJobScheduler.runJob(GobblinServiceJobScheduler.java:279)
~[gobblin-service-fat-1.0.46-all.jar:?]
at
org.apache.gobblin.service.modules.scheduler.GobblinServiceJobScheduler$NonScheduledJobRunner.run(GobblinServiceJobScheduler.java:476)
[gobblin-service-fat-1.0.46-all.jar:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_172]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_172]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]
Caused by: java.io.IOException: No, I won't add the DAG, dawg!
at
org.apache.gobblin.service.modules.orchestration.DagManager.addDag(DagManager.java:266)
~[gobblin-service-fat-1.0.46-all.jar:?]
at
org.apache.gobblin.service.modules.orchestration.Orchestrator.orchestrate(Orchestrator.java:297)
~[gobblin-service-fat-1.0.46-all.jar:?]
at
org.apache.gobblin.service.modules.scheduler.GobblinServiceJobScheduler.runJob(GobblinServiceJobScheduler.java:277)
~[gobblin-service-fat-1.0.46-all.jar:?]
... 4 more
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]