arjun4084346 commented on code in PR #3896:
URL: https://github.com/apache/gobblin/pull/3896#discussion_r1540148886
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/DagManagementDagActionStoreChangeMonitor.java:
##########
@@ -62,28 +59,18 @@ protected void handleDagAction(DagActionStore.DagAction
dagAction, boolean isSta
LaunchSubmissionMetricProxy launchSubmissionMetricProxy = isStartup ?
ON_STARTUP : POST_STARTUP;
try {
// todo - add actions for other other type of dag actions
- if
(dagAction.getDagActionType().equals(DagActionStore.DagActionType.LAUNCH)) {
- // If multi-active scheduler is NOT turned on we should not receive
these type of events
- if (!this.isMultiActiveSchedulerEnabled) {
- this.unexpectedLaunchEventErrors.mark();
- throw new RuntimeException(String.format("Received LAUNCH dagAction
while not in multi-active scheduler "
- + "mode for flowAction: %s", dagAction));
- }
- dagManagement.addDagAction(dagAction);
- } else {
- log.warn("Received unsupported dagAction {}. Expected to be a KILL,
RESUME, or LAUNCH", dagAction.getDagActionType());
- this.unexpectedErrors.mark();
+ switch (dagAction.getDagActionType()) {
+ case LAUNCH :
+ case REEVALUATE :
+ dagManagement.addDagAction(dagAction);
+ break;
+ default:
+ log.warn("Received unsupported dagAction {}. Expected to be a
REEVALUATE or LAUNCH", dagAction.getDagActionType());
+ this.unexpectedErrors.mark();
}
} catch (IOException e) {
log.warn("Failed to addDagAction for flowId {} due to exception {}",
dagAction.getFlowId(), e.getMessage());
launchSubmissionMetricProxy.markFailure();
}
}
-
Review Comment:
yes. earlier i only needed one extra metric `unexpectedLaunchEventErrors`
which i removed in this pr so there is no need of overriding this method now.
--
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]