[ server ] [ status ]- update some code - 1
This commit is contained in:
@@ -8,8 +8,6 @@ import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static io.wdd.rpc.scheduler.service.status.MonitorAllAgentStatus.ALL_AGENT_TOPIC_NAME_SET;
|
||||
|
||||
@SpringBootTest
|
||||
class ServerApplicationTests {
|
||||
|
||||
@@ -57,8 +55,6 @@ class ServerApplicationTests {
|
||||
completeScript.add(command4);
|
||||
|
||||
|
||||
ALL_AGENT_TOPIC_NAME_SET.add("Chengdu-amd64-98-98066f");
|
||||
|
||||
ArrayList<String> targetMachineList = new ArrayList<>(
|
||||
List.of(
|
||||
"Chengdu-amd64-98-98066f"
|
||||
|
||||
@@ -1,12 +1,48 @@
|
||||
package io.wdd.server;
|
||||
|
||||
import io.wdd.common.beans.status.AgentHealthyStatusEnum;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
|
||||
public class SimpleTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
HashMap<String, List<String>> hashMap = new HashMap<>();
|
||||
|
||||
hashMap.put(
|
||||
"HEALTHY",
|
||||
new ArrayList<>(
|
||||
List.of(
|
||||
"Tokyo-amd64-07-f66a41",
|
||||
"Tokyo-amd64-03-dc543f"
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
hashMap
|
||||
.get(AgentHealthyStatusEnum.FAILED.getStatus())
|
||||
.stream()
|
||||
.forEach(
|
||||
agentTopicName -> {
|
||||
map.put(
|
||||
agentTopicName,
|
||||
"0"
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void CompletableFutureTest() {
|
||||
//任务1:洗水壶->烧开水
|
||||
CompletableFuture<String> f1 = CompletableFuture.supplyAsync(() -> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user