pkuwm commented on a change in pull request #1439:
URL: https://github.com/apache/helix/pull/1439#discussion_r503786356



##########
File path: helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
##########
@@ -526,6 +533,177 @@ public void enqueueJobs(final String queue, final 
List<String> jobs,
     }
   }
 
+  /**
+   * Add task to a running (IN-PROGRESS) job or a job which has not started 
yet. Timeout for this
+   * operation is default timeout which is 5 minutes. {@link 
TaskDriver#DEFAULT_TIMEOUT}
+   * Note1: Task cannot be added if the job is in an illegal state. A job can 
accept
+   * new task if the job is in-progress or it has not started yet.
+   * Note2: The job can only be added to non-targeted jobs.
+   * Note3: The taskID for new task should be unique. If not, this API throws 
an exception.
+   * Note4: In case of timeout exception, it is user's responsibility to check 
whether the task has
+   * been successfully added or not.
+   * @param workflowName
+   * @param jobName
+   * @param taskConfig
+   * @throws Exception
+   */
+  public void addTask(String workflowName, String jobName, TaskConfig 
taskConfig) throws Exception {
+    addTask(workflowName, jobName, taskConfig, DEFAULT_TIMEOUT);
+  }
+
+  /**
+   * Add task to a running (IN-PROGRESS) job or a job which has not started yet
+   * Note1: Task cannot be added if the job is in an illegal state. A job can 
accept
+   * new task if the job is in-progress or it has not started yet.
+   * Note2: The job can only be added to non-targeted jobs.
+   * Note3: The taskID for new task should be unique. If not, this API throws 
an exception.
+   * Note4: In case of timeout exception, it is user's responsibility to check 
whether the task has
+   * been successfully added or not.
+   * Note5: timeout is the time that this API checks whether the task has been 
successfully added or
+   * not.
+   * @param workflowName
+   * @param jobName
+   * @param taskConfig
+   * @param timeoutMs
+   * @throws Exception

Review comment:
       Since Exception is pretty generic, I don't see a clear clue where it is 
from. Can you clarify in what case this Exception is thrown?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to