This is an automated email from the ASF dual-hosted git repository.

suvasude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new f869a40  [GOBBLIN-922] fix start sla time unit conversion issue
f869a40 is described below

commit f869a402380a4692c6b980ec1c523e33ba43c1cc
Author: Arjun <[email protected]>
AuthorDate: Tue Oct 22 15:20:47 2019 -0700

    [GOBBLIN-922] fix start sla time unit conversion issue
    
    Closes #2776 from arjun4084346/startSlaTimeUnit
---
 .../service/modules/orchestration/DagManagerUtils.java       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerUtils.java
 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerUtils.java
index d489bed..08c6c8f 100644
--- 
a/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerUtils.java
+++ 
b/gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManagerUtils.java
@@ -239,19 +239,19 @@ public class DagManagerUtils {
   }
 
   /**
-   * get the sla from the dag node config.
+   * get the flow start sla from the dag node config.
    * if time unit is not provided, it assumes time unit is minute.
-   * @param dagNode dag node for which sla is to be retrieved
-   * @return sla if it is provided, {@value NO_SLA} otherwise
+   * @param dagNode dag node for which flow start sla is to be retrieved
+   * @return flow start sla in ms
    */
   static long getFlowStartSLA(DagNode<JobExecutionPlan> dagNode) {
     Config jobConfig = dagNode.getValue().getJobSpec().getConfig();
     TimeUnit slaTimeUnit = TimeUnit.valueOf(ConfigUtils.getString(
         jobConfig, ConfigurationKeys.GOBBLIN_FLOW_START_SLA_TIME_UNIT, 
ConfigurationKeys.DEFAULT_GOBBLIN_FLOW_START_SLA_TIME_UNIT));
 
-    return jobConfig.hasPath(ConfigurationKeys.GOBBLIN_FLOW_START_SLA_TIME)
-        ? 
slaTimeUnit.toMillis(jobConfig.getLong(ConfigurationKeys.GOBBLIN_FLOW_START_SLA_TIME))
-        : ConfigurationKeys.DEFAULT_GOBBLIN_FLOW_START_SLA;
+    return 
slaTimeUnit.toMillis(jobConfig.hasPath(ConfigurationKeys.GOBBLIN_FLOW_START_SLA_TIME)
+        ? jobConfig.getLong(ConfigurationKeys.GOBBLIN_FLOW_START_SLA_TIME)
+        : ConfigurationKeys.DEFAULT_GOBBLIN_FLOW_START_SLA);
   }
 
   static int getDagQueueId(Dag<JobExecutionPlan> dag, int numThreads) {

Reply via email to