alirezazamani commented on a change in pull request #1439:
URL: https://github.com/apache/helix/pull/1439#discussion_r502677255
##########
File path: helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
##########
@@ -526,6 +530,163 @@ public void enqueueJobs(final String queue, final
List<String> jobs,
}
}
+ /**
+ * Add task to a running (IN-PROGRESS) job or the job which is not started
yet. Timeout for this
+ * operation is default timeout
+ * Note1: Task cannot be added if the job is in an illegal state. The states
that job can accept
+ * new task is if the job is in progress or the job 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
and exception.
+ * Note4: In case of timeout exception, it is user's responsibility to check
whether the task has
+ * been successfully added ot 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 the job which is not started
yet
+ * Note1: Task may cannot be added if the job is in an illegal state. The
states that job can
+ * accept new task is if the job is in progress or the job 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
and exception.
+ * Note4: In case of timeout exception, it is user's responsibility to check
whether the task has
+ * been successfully added ot 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 timeout
Review comment:
Done.
##########
File path: helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
##########
@@ -28,6 +28,7 @@
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.TimeoutException;
Review comment:
Done.
----------------------------------------------------------------
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]