ruanwenjun commented on code in PR #9919:
URL: https://github.com/apache/dolphinscheduler/pull/9919#discussion_r878972338
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/dispatch/ExecutorDispatcher.java:
##########
@@ -71,30 +77,24 @@ public ExecutorDispatcher() {
* @throws ExecuteException if error throws ExecuteException
*/
public Boolean dispatch(final ExecutionContext context) throws
ExecuteException {
- /**
- * get executor manager
- */
+ // get executor manager
ExecutorManager<Boolean> executorManager =
this.executorManagers.get(context.getExecutorType());
if (executorManager == null) {
throw new ExecuteException("no ExecutorManager for type : " +
context.getExecutorType());
}
- /**
- * host select
- */
-
+ // host select
Host host = hostManager.select(context);
if (StringUtils.isEmpty(host.getAddress())) {
- throw new ExecuteException(String.format("fail to execute : %s due
to no suitable worker, "
- + "current task needs worker group %s to execute",
- context.getCommand(),context.getWorkerGroup()));
+ ThreadUtils.sleep(Constants.SLEEP_TIME_MILLIS);
Review Comment:
It's better to add a comment or todo in the code, why we sleep. If we find a
better way to replace the sleep in the future, we can optimize this.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]