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

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

                Author: ASF GitHub Bot
            Created on: 12/Apr/23 23:43
            Start Date: 12/Apr/23 23:43
    Worklog Time Spent: 10m 
      Work Description: homatthew commented on code in PR #3677:
URL: https://github.com/apache/gobblin/pull/3677#discussion_r1164767309


##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/HelixUtils.java:
##########
@@ -112,22 +117,11 @@ public static String getHelixInstanceName(
     return namePrefix + "_" + instanceId;
   }
 
-  // We have switched from Helix JobQueue to WorkFlow based job execution.
-  @Deprecated
-  public static void submitJobToQueue(
-      JobConfig.Builder jobConfigBuilder,
-      String queueName,
-      String jobName,
-      TaskDriver helixTaskDriver,
-      HelixManager helixManager,
-      long jobQueueDeleteTimeoutSeconds) throws Exception {
-    submitJobToWorkFlow(jobConfigBuilder, queueName, jobName, helixTaskDriver, 
helixManager, jobQueueDeleteTimeoutSeconds);
-  }
-
   static void waitJobInitialization(
       HelixManager helixManager,
       String workFlowName,
-      String jobName) throws Exception {
+      String jobName,
+      Duration timeout) throws Exception {

Review Comment:
   There's nothing inherently wrong with representing as a long. The downside 
is there's no safeguards for passing in the wrong value when going from one 
form of time (e.g. `Second` to `Millisecond`).
   
   The resulting boiler plate becomes readable and "slightly" less error prone. 
I will admit It's all nits at the end of the day
   
   Let's consider this example
   ```
   long timeoutSecond = ConfigUtil.getLong(...)
   
   // option 1: multiply by magic number where the conversion isn't enforced by 
the compiler
   foobar(timeoutSecond * 1000) 
   
   // option 2: use native Duration java library which wouldn't let you forget 
to do the conversion. And the conversion is implicit
   foobarUsingDuration(Duration.ofSecond(timeoutSecond))
   
   ```





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

    Worklog Id:     (was: 856599)
    Time Spent: 1h  (was: 50m)

> Helix workflow submissions from Gobblin should have a configurable timeout
> --------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1813
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1813
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Matthew Ho
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>




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

Reply via email to