|
@@ -32,6 +32,7 @@ import javax.annotation.Resource;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
import java.util.concurrent.FutureTask;
|
|
import java.util.concurrent.FutureTask;
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@Component
|
|
@Component
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -429,7 +430,7 @@ public class ProjectConsumer {
|
|
log.info("项目 " + projectId + " 运行在:" + nodeListToCount);
|
|
log.info("项目 " + projectId + " 运行在:" + nodeListToCount);
|
|
int messageNumber = 0;
|
|
int messageNumber = 0;
|
|
ApacheKafkaUtil.createTopic(kafkaAdminClient, projectId, realCurrentParallelism, (short) 1); // 创建主题
|
|
ApacheKafkaUtil.createTopic(kafkaAdminClient, projectId, realCurrentParallelism, (short) 1); // 创建主题
|
|
-// Thread.sleep(5000);
|
|
|
|
|
|
+ TimeUnit.SECONDS.sleep(6);
|
|
// 需要即时启动的任务(并行度的大小)
|
|
// 需要即时启动的任务(并行度的大小)
|
|
CopyOnWriteArrayList<String> yamlListToRun = new CopyOnWriteArrayList<>();
|
|
CopyOnWriteArrayList<String> yamlListToRun = new CopyOnWriteArrayList<>();
|
|
for (String taskJsonPath : taskJsonList) {
|
|
for (String taskJsonPath : taskJsonList) {
|
|
@@ -472,7 +473,7 @@ public class ProjectConsumer {
|
|
}
|
|
}
|
|
messageNumber++;
|
|
messageNumber++;
|
|
}
|
|
}
|
|
- Thread.sleep(5);
|
|
|
|
|
|
+ TimeUnit.SECONDS.sleep(6);
|
|
log.info("项目 " + projectId + " 共发送了 " + messageNumber + " 条消息。");
|
|
log.info("项目 " + projectId + " 共发送了 " + messageNumber + " 条消息。");
|
|
log.info("项目 " + projectId + " 准备首先启动 " + yamlListToRun);
|
|
log.info("项目 " + projectId + " 准备首先启动 " + yamlListToRun);
|
|
for (String yaml : yamlListToRun) {
|
|
for (String yaml : yamlListToRun) {
|