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

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

                Author: ASF GitHub Bot
            Created on: 09/May/24 21:39
            Start Date: 09/May/24 21:39
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3938:
URL: https://github.com/apache/gobblin/pull/3938#discussion_r1596012740


##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/ResumeDagProcTest.java:
##########
@@ -84,16 +84,19 @@ public void tearDown() throws Exception {
   @Test
   public void resumeDag() throws IOException, URISyntaxException {
     long flowExecutionId = System.currentTimeMillis();

Review Comment:
   is there any reason NOT to just use a constant here?



##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/ResumeDagProc.java:
##########
@@ -82,12 +82,14 @@ protected void act(DagManagementStateStore 
dagManagementStateStore, Optional<Dag
         Map<String, String> jobMetadata = 
TimingEventUtils.getJobMetadata(Maps.newHashMap(), node.getValue());
         
eventSubmitter.getTimingEvent(TimingEvent.LauncherTimings.JOB_PENDING_RESUME).stop(jobMetadata);
       }
-      // Set flowStartTime so that flow SLA will be based on current time 
instead of original flow
+      // Set flowStartTime so that flow start deadline and flow completion 
deadline will be based on current time instead of original flow
       node.getValue().setFlowStartTime(flowResumeTime);
     }
 
+    // these two statements effectively move the dag from failed dag store to 
(running) dag store

Review Comment:
   maybe add - "to prevent loss in the unlikely event of failure between the 
two, we add first"
   
   that said, should we check for this state around L68/69?



##########
gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/proc/ResumeDagProcTest.java:
##########
@@ -114,10 +117,8 @@ public void resumeDag() throws IOException, 
URISyntaxException {
             .filter(a -> a.getMethod().getName().equals("addSpec"))
             .count())
         .sum();
-    long addedDagNodeStates = 
Mockito.mockingDetails(this.dagManagementStateStore).getInvocations().stream()
-        .filter(a -> 
a.getMethod().getName().equals("addDagNodeState")).count();
 
     Assert.assertEquals(resumedJobCount, expectedNumOfResumedJobs);

Review Comment:
   can't we similarly use `Mockito.verify` and `Mockito.times` here rather than 
`getInvocations()` and the `.filter` + `.count`?





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

    Worklog Id:     (was: 918620)
    Time Spent: 1h 40m  (was: 1.5h)

> create resume dag proc
> ----------------------
>
>                 Key: GOBBLIN-2057
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2057
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to