diff --git a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java index 4f4bdf9fd4f..6d9dcc9d6a9 100644 --- a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java +++ b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java @@ -281,7 +281,7 @@ public static JobDataMap updatePropsInJobDataMap(JobDataMap jobDataMap, prevJobProps.setProperty(ConfigurationKeys.SCHEDULER_PRESERVED_CONSENSUS_EVENT_TIME_MILLIS_KEY, String.valueOf(leasedToAnotherStatus.getEventTimeMillis())); // Use this boolean to indicate whether this is a reminder event - prevJobProps.setProperty(ConfigurationKeys.FLOW_IS_REMINDER_EVENT_KEY, String.valueOf(false)); + prevJobProps.setProperty(ConfigurationKeys.FLOW_IS_REMINDER_EVENT_KEY, String.valueOf(true)); // Update job data map and reset it in jobDetail jobDataMap.put(GobblinServiceJobScheduler.PROPERTIES_KEY, prevJobProps); return jobDataMap; diff --git a/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandlerTest.java b/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandlerTest.java index 55a95efcddf..d580704d2c1 100644 --- a/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandlerTest.java +++ b/gobblin-service/src/test/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandlerTest.java @@ -29,7 +29,6 @@ public class FlowTriggerHandlerTest { long eventToRevisit = 123000L; - long eventToTrigger = 456000L; long minimumLingerDurationMillis = 2000L; String cronExpression = FlowTriggerHandler.createCronFromDelayPeriod(minimumLingerDurationMillis); String cronExpressionSuffix = truncateFirstTwoFieldsOfCronExpression(cronExpression); @@ -73,6 +72,7 @@ public void testUpdatePropsInJobDataMap() { newProperties.getProperty(ConfigurationKeys.SCHEDULER_EXPECTED_REMINDER_TIME_MILLIS_KEY)); Assert.assertEquals(String.valueOf(leasedToAnotherStatus.getEventTimeMillis()), newProperties.getProperty(ConfigurationKeys.SCHEDULER_PRESERVED_CONSENSUS_EVENT_TIME_MILLIS_KEY)); + Assert.assertTrue(Boolean.parseBoolean(newProperties.getProperty(ConfigurationKeys.FLOW_IS_REMINDER_EVENT_KEY))); } /** @@ -91,6 +91,7 @@ public void testSetPropsInJobDataMap() { Assert.assertTrue(newProperties.containsKey(ConfigurationKeys.SCHEDULER_EXPECTED_REMINDER_TIME_MILLIS_KEY)); Assert.assertEquals(String.valueOf(leasedToAnotherStatus.getEventTimeMillis()), newProperties.getProperty(ConfigurationKeys.SCHEDULER_PRESERVED_CONSENSUS_EVENT_TIME_MILLIS_KEY)); + Assert.assertTrue(Boolean.parseBoolean(newProperties.getProperty(ConfigurationKeys.FLOW_IS_REMINDER_EVENT_KEY))); } /**