[ 
https://issues.apache.org/jira/browse/GOBBLIN-2022?focusedWorklogId=911700&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-911700
 ]

ASF GitHub Bot logged work on GOBBLIN-2022:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/24 21:46
            Start Date: 26/Mar/24 21:46
    Worklog Time Spent: 10m 
      Work Description: 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.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 911700)
    Time Spent: 8h  (was: 7h 50m)

> create dag proc for taking actions on job completion
> ----------------------------------------------------
>
>                 Key: GOBBLIN-2022
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2022
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 8h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to