Search in sources :

Example 1 with CreateTaskRequest

use of org.apache.kafka.trogdor.rest.CreateTaskRequest in project apache-kafka-on-k8s by banzaicloud.

the class CoordinatorTest method testCreateTask.

@Test
public void testCreateTask() throws Exception {
    MockTime time = new MockTime(0, 0, 0);
    Scheduler scheduler = new MockScheduler(time);
    try (MiniTrogdorCluster cluster = new MiniTrogdorCluster.Builder().addCoordinator("node01").addAgent("node02").scheduler(scheduler).build()) {
        new ExpectedTasks().waitFor(cluster.coordinatorClient());
        NoOpTaskSpec fooSpec = new NoOpTaskSpec(1, 2);
        cluster.coordinatorClient().createTask(new CreateTaskRequest("foo", fooSpec));
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskPending(fooSpec)).build()).waitFor(cluster.coordinatorClient());
        time.sleep(2);
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskRunning(fooSpec, 2)).workerState(new WorkerRunning(fooSpec, 2, "")).build()).waitFor(cluster.coordinatorClient()).waitFor(cluster.agentClient("node02"));
        time.sleep(3);
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskDone(fooSpec, 2, 5, "", false)).build()).waitFor(cluster.coordinatorClient());
    }
}
Also used : MockScheduler(org.apache.kafka.common.utils.MockScheduler) WorkerRunning(org.apache.kafka.trogdor.rest.WorkerRunning) MockScheduler(org.apache.kafka.common.utils.MockScheduler) Scheduler(org.apache.kafka.common.utils.Scheduler) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) TaskDone(org.apache.kafka.trogdor.rest.TaskDone) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) NoOpTaskSpec(org.apache.kafka.trogdor.task.NoOpTaskSpec) TaskPending(org.apache.kafka.trogdor.rest.TaskPending) ExpectedTasks(org.apache.kafka.trogdor.common.ExpectedTasks) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) MiniTrogdorCluster(org.apache.kafka.trogdor.common.MiniTrogdorCluster) TaskRunning(org.apache.kafka.trogdor.rest.TaskRunning) MockTime(org.apache.kafka.common.utils.MockTime) Test(org.junit.Test)

Example 2 with CreateTaskRequest

use of org.apache.kafka.trogdor.rest.CreateTaskRequest in project kafka by apache.

the class CoordinatorTest method testTasksRequest.

@Test
public void testTasksRequest() throws Exception {
    MockTime time = new MockTime(0, 0, 0);
    Scheduler scheduler = new MockScheduler(time);
    try (MiniTrogdorCluster cluster = new MiniTrogdorCluster.Builder().addCoordinator("node01").addAgent("node02").scheduler(scheduler).build()) {
        CoordinatorClient coordinatorClient = cluster.coordinatorClient();
        new ExpectedTasks().waitFor(coordinatorClient);
        NoOpTaskSpec fooSpec = new NoOpTaskSpec(1, 10);
        NoOpTaskSpec barSpec = new NoOpTaskSpec(3, 1);
        coordinatorClient.createTask(new CreateTaskRequest("foo", fooSpec));
        coordinatorClient.createTask(new CreateTaskRequest("bar", barSpec));
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskPending(fooSpec)).build()).addTask(new ExpectedTaskBuilder("bar").taskState(new TaskPending(barSpec)).build()).waitFor(coordinatorClient);
        assertEquals(0, coordinatorClient.tasks(new TasksRequest(null, 10, 0, 10, 0, Optional.empty())).tasks().size());
        TasksResponse resp1 = coordinatorClient.tasks(new TasksRequest(Arrays.asList("foo", "baz"), 0, 0, 0, 0, Optional.empty()));
        assertTrue(resp1.tasks().containsKey("foo"));
        assertFalse(resp1.tasks().containsKey("bar"));
        assertEquals(1, resp1.tasks().size());
        time.sleep(2);
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskRunning(fooSpec, 2, new TextNode("active"))).workerState(new WorkerRunning("foo", fooSpec, 2, new TextNode("active"))).build()).addTask(new ExpectedTaskBuilder("bar").taskState(new TaskPending(barSpec)).build()).waitFor(coordinatorClient).waitFor(cluster.agentClient("node02"));
        TasksResponse resp2 = coordinatorClient.tasks(new TasksRequest(null, 1, 0, 0, 0, Optional.empty()));
        assertTrue(resp2.tasks().containsKey("foo"));
        assertFalse(resp2.tasks().containsKey("bar"));
        assertEquals(1, resp2.tasks().size());
        assertEquals(0, coordinatorClient.tasks(new TasksRequest(null, 3, 0, 0, 0, Optional.empty())).tasks().size());
    }
}
Also used : MockScheduler(org.apache.kafka.common.utils.MockScheduler) TasksResponse(org.apache.kafka.trogdor.rest.TasksResponse) WorkerRunning(org.apache.kafka.trogdor.rest.WorkerRunning) MockScheduler(org.apache.kafka.common.utils.MockScheduler) Scheduler(org.apache.kafka.common.utils.Scheduler) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) TextNode(com.fasterxml.jackson.databind.node.TextNode) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) NoOpTaskSpec(org.apache.kafka.trogdor.task.NoOpTaskSpec) TaskPending(org.apache.kafka.trogdor.rest.TaskPending) ExpectedTasks(org.apache.kafka.trogdor.common.ExpectedTasks) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) MiniTrogdorCluster(org.apache.kafka.trogdor.common.MiniTrogdorCluster) TasksRequest(org.apache.kafka.trogdor.rest.TasksRequest) TaskRunning(org.apache.kafka.trogdor.rest.TaskRunning) MockTime(org.apache.kafka.common.utils.MockTime) Test(org.junit.jupiter.api.Test)

Example 3 with CreateTaskRequest

use of org.apache.kafka.trogdor.rest.CreateTaskRequest in project kafka by apache.

the class CoordinatorTest method testTaskRequestWithOldStartMsGetsUpdated.

@Test
public void testTaskRequestWithOldStartMsGetsUpdated() throws Exception {
    MockTime time = new MockTime(0, 0, 0);
    Scheduler scheduler = new MockScheduler(time);
    try (MiniTrogdorCluster cluster = new MiniTrogdorCluster.Builder().addCoordinator("node01").addAgent("node02").scheduler(scheduler).build()) {
        NoOpTaskSpec fooSpec = new NoOpTaskSpec(1, 500);
        time.sleep(552);
        CoordinatorClient coordinatorClient = cluster.coordinatorClient();
        NoOpTaskSpec updatedSpec = new NoOpTaskSpec(552, 500);
        coordinatorClient.createTask(new CreateTaskRequest("fooSpec", fooSpec));
        TaskState expectedState = new ExpectedTaskBuilder("fooSpec").taskState(new TaskRunning(updatedSpec, 552, new TextNode("receiving"))).build().taskState();
        TaskState resp = coordinatorClient.task(new TaskRequest("fooSpec"));
        assertEquals(expectedState, resp);
    }
}
Also used : MockScheduler(org.apache.kafka.common.utils.MockScheduler) MockScheduler(org.apache.kafka.common.utils.MockScheduler) Scheduler(org.apache.kafka.common.utils.Scheduler) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) TextNode(com.fasterxml.jackson.databind.node.TextNode) DestroyTaskRequest(org.apache.kafka.trogdor.rest.DestroyTaskRequest) StopTaskRequest(org.apache.kafka.trogdor.rest.StopTaskRequest) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) TaskRequest(org.apache.kafka.trogdor.rest.TaskRequest) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) NoOpTaskSpec(org.apache.kafka.trogdor.task.NoOpTaskSpec) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) MiniTrogdorCluster(org.apache.kafka.trogdor.common.MiniTrogdorCluster) TaskRunning(org.apache.kafka.trogdor.rest.TaskRunning) TaskState(org.apache.kafka.trogdor.rest.TaskState) MockTime(org.apache.kafka.common.utils.MockTime) Test(org.junit.jupiter.api.Test)

Example 4 with CreateTaskRequest

use of org.apache.kafka.trogdor.rest.CreateTaskRequest in project kafka by apache.

the class CoordinatorClient method main.

public static void main(String[] args) throws Exception {
    ArgumentParser rootParser = ArgumentParsers.newArgumentParser("trogdor-coordinator-client").description("The Trogdor coordinator client.");
    Subparsers subParsers = rootParser.addSubparsers().dest("command");
    Subparser uptimeParser = subParsers.addParser("uptime").help("Get the coordinator uptime.");
    addTargetArgument(uptimeParser);
    addJsonArgument(uptimeParser);
    Subparser statusParser = subParsers.addParser("status").help("Get the coordinator status.");
    addTargetArgument(statusParser);
    addJsonArgument(statusParser);
    Subparser showTaskParser = subParsers.addParser("showTask").help("Show a coordinator task.");
    addTargetArgument(showTaskParser);
    addJsonArgument(showTaskParser);
    showTaskParser.addArgument("--id", "-i").action(store()).required(true).type(String.class).dest("taskId").metavar("TASK_ID").help("The task ID to show.");
    showTaskParser.addArgument("--verbose", "-v").action(storeTrue()).dest("verbose").metavar("VERBOSE").help("Print out everything.");
    showTaskParser.addArgument("--show-status", "-S").action(storeTrue()).dest("showStatus").metavar("SHOW_STATUS").help("Show the task status.");
    Subparser showTasksParser = subParsers.addParser("showTasks").help("Show many coordinator tasks.  By default, all tasks are shown, but " + "command-line options can be specified as filters.");
    addTargetArgument(showTasksParser);
    addJsonArgument(showTasksParser);
    MutuallyExclusiveGroup idGroup = showTasksParser.addMutuallyExclusiveGroup();
    idGroup.addArgument("--id", "-i").action(append()).type(String.class).dest("taskIds").metavar("TASK_IDS").help("Show only this task ID.  This option may be specified multiple times.");
    idGroup.addArgument("--id-pattern").action(store()).type(String.class).dest("taskIdPattern").metavar("TASK_ID_PATTERN").help("Only display tasks which match the given ID pattern.");
    showTasksParser.addArgument("--state", "-s").type(TaskStateType.class).dest("taskStateType").metavar("TASK_STATE_TYPE").help("Show only tasks in this state.");
    Subparser createTaskParser = subParsers.addParser("createTask").help("Create a new task.");
    addTargetArgument(createTaskParser);
    createTaskParser.addArgument("--id", "-i").action(store()).required(true).type(String.class).dest("taskId").metavar("TASK_ID").help("The task ID to create.");
    createTaskParser.addArgument("--spec", "-s").action(store()).required(true).type(String.class).dest("taskSpec").metavar("TASK_SPEC").help("The task spec to create, or a path to a file containing the task spec.");
    Subparser stopTaskParser = subParsers.addParser("stopTask").help("Stop a task.");
    addTargetArgument(stopTaskParser);
    stopTaskParser.addArgument("--id", "-i").action(store()).required(true).type(String.class).dest("taskId").metavar("TASK_ID").help("The task ID to create.");
    Subparser destroyTaskParser = subParsers.addParser("destroyTask").help("Destroy a task.");
    addTargetArgument(destroyTaskParser);
    destroyTaskParser.addArgument("--id", "-i").action(store()).required(true).type(String.class).dest("taskId").metavar("TASK_ID").help("The task ID to destroy.");
    Subparser shutdownParser = subParsers.addParser("shutdown").help("Shut down the coordinator.");
    addTargetArgument(shutdownParser);
    Namespace res = rootParser.parseArgsOrFail(args);
    String target = res.getString("target");
    CoordinatorClient client = new Builder().maxTries(3).target(target).build();
    ZoneOffset localOffset = OffsetDateTime.now().getOffset();
    switch(res.getString("command")) {
        case "uptime":
            {
                UptimeResponse uptime = client.uptime();
                if (res.getBoolean("json")) {
                    System.out.println(JsonUtil.toJsonString(uptime));
                } else {
                    System.out.printf("Coordinator is running at %s.%n", target);
                    System.out.printf("\tStart time: %s%n", dateString(uptime.serverStartMs(), localOffset));
                    System.out.printf("\tCurrent server time: %s%n", dateString(uptime.nowMs(), localOffset));
                    System.out.printf("\tUptime: %s%n", durationString(uptime.nowMs() - uptime.serverStartMs()));
                }
                break;
            }
        case "status":
            {
                CoordinatorStatusResponse response = client.status();
                if (res.getBoolean("json")) {
                    System.out.println(JsonUtil.toJsonString(response));
                } else {
                    System.out.printf("Coordinator is running at %s.%n", target);
                    System.out.printf("\tStart time: %s%n", dateString(response.serverStartMs(), localOffset));
                }
                break;
            }
        case "showTask":
            {
                String taskId = res.getString("taskId");
                TaskRequest req = new TaskRequest(taskId);
                TaskState taskState = null;
                try {
                    taskState = client.task(req);
                } catch (NotFoundException e) {
                    System.out.printf("Task %s was not found.%n", taskId);
                    Exit.exit(1);
                }
                if (res.getBoolean("json")) {
                    System.out.println(JsonUtil.toJsonString(taskState));
                } else {
                    System.out.printf("Task %s of type %s is %s. %s%n", taskId, taskState.spec().getClass().getCanonicalName(), taskState.stateType(), prettyPrintTaskInfo(taskState, localOffset));
                    if (taskState instanceof TaskDone) {
                        TaskDone taskDone = (TaskDone) taskState;
                        if ((taskDone.error() != null) && (!taskDone.error().isEmpty())) {
                            System.out.printf("Error: %s%n", taskDone.error());
                        }
                    }
                    if (res.getBoolean("verbose")) {
                        System.out.printf("Spec: %s%n%n", JsonUtil.toPrettyJsonString(taskState.spec()));
                    }
                    if (res.getBoolean("verbose") || res.getBoolean("showStatus")) {
                        System.out.printf("Status: %s%n%n", JsonUtil.toPrettyJsonString(taskState.status()));
                    }
                }
                break;
            }
        case "showTasks":
            {
                TaskStateType taskStateType = res.<TaskStateType>get("taskStateType");
                List<String> taskIds = new ArrayList<>();
                Pattern taskIdPattern = null;
                if (res.getList("taskIds") != null) {
                    for (Object taskId : res.getList("taskIds")) {
                        taskIds.add((String) taskId);
                    }
                } else if (res.getString("taskIdPattern") != null) {
                    try {
                        taskIdPattern = Pattern.compile(res.getString("taskIdPattern"));
                    } catch (PatternSyntaxException e) {
                        System.out.println("Invalid task ID regular expression " + res.getString("taskIdPattern"));
                        e.printStackTrace();
                        Exit.exit(1);
                    }
                }
                TasksRequest req = new TasksRequest(taskIds, 0, 0, 0, 0, Optional.ofNullable(taskStateType));
                TasksResponse response = client.tasks(req);
                if (taskIdPattern != null) {
                    TreeMap<String, TaskState> filteredTasks = new TreeMap<>();
                    for (Map.Entry<String, TaskState> entry : response.tasks().entrySet()) {
                        if (taskIdPattern.matcher(entry.getKey()).matches()) {
                            filteredTasks.put(entry.getKey(), entry.getValue());
                        }
                    }
                    response = new TasksResponse(filteredTasks);
                }
                if (res.getBoolean("json")) {
                    System.out.println(JsonUtil.toJsonString(response));
                } else {
                    System.out.println(prettyPrintTasksResponse(response, localOffset));
                }
                if (response.tasks().isEmpty()) {
                    Exit.exit(1);
                }
                break;
            }
        case "createTask":
            {
                String taskId = res.getString("taskId");
                TaskSpec taskSpec = JsonUtil.objectFromCommandLineArgument(res.getString("taskSpec"), TaskSpec.class);
                CreateTaskRequest req = new CreateTaskRequest(taskId, taskSpec);
                try {
                    client.createTask(req);
                    System.out.printf("Sent CreateTaskRequest for task %s.%n", req.id());
                } catch (RequestConflictException rce) {
                    System.out.printf("CreateTaskRequest for task %s got a 409 status code - " + "a task with the same ID but a different specification already exists.%nException: %s%n", req.id(), rce.getMessage());
                    Exit.exit(1);
                }
                break;
            }
        case "stopTask":
            {
                String taskId = res.getString("taskId");
                StopTaskRequest req = new StopTaskRequest(taskId);
                client.stopTask(req);
                System.out.printf("Sent StopTaskRequest for task %s.%n", taskId);
                break;
            }
        case "destroyTask":
            {
                String taskId = res.getString("taskId");
                DestroyTaskRequest req = new DestroyTaskRequest(taskId);
                client.destroyTask(req);
                System.out.printf("Sent DestroyTaskRequest for task %s.%n", taskId);
                break;
            }
        case "shutdown":
            {
                client.shutdown();
                System.out.println("Sent ShutdownRequest.");
                break;
            }
        default:
            {
                System.out.println("You must choose an action. Type --help for help.");
                Exit.exit(1);
            }
    }
}
Also used : CoordinatorStatusResponse(org.apache.kafka.trogdor.rest.CoordinatorStatusResponse) TasksResponse(org.apache.kafka.trogdor.rest.TasksResponse) MutuallyExclusiveGroup(net.sourceforge.argparse4j.inf.MutuallyExclusiveGroup) UriBuilder(javax.ws.rs.core.UriBuilder) NotFoundException(javax.ws.rs.NotFoundException) StringFormatter.durationString(org.apache.kafka.trogdor.common.StringFormatter.durationString) StringFormatter.dateString(org.apache.kafka.trogdor.common.StringFormatter.dateString) ArgumentParser(net.sourceforge.argparse4j.inf.ArgumentParser) ZoneOffset(java.time.ZoneOffset) Subparsers(net.sourceforge.argparse4j.inf.Subparsers) DestroyTaskRequest(org.apache.kafka.trogdor.rest.DestroyTaskRequest) Subparser(net.sourceforge.argparse4j.inf.Subparser) RequestConflictException(org.apache.kafka.trogdor.rest.RequestConflictException) ArrayList(java.util.ArrayList) List(java.util.List) TaskStateType(org.apache.kafka.trogdor.rest.TaskStateType) PatternSyntaxException(java.util.regex.PatternSyntaxException) Pattern(java.util.regex.Pattern) StopTaskRequest(org.apache.kafka.trogdor.rest.StopTaskRequest) TaskDone(org.apache.kafka.trogdor.rest.TaskDone) TaskSpec(org.apache.kafka.trogdor.task.TaskSpec) DestroyTaskRequest(org.apache.kafka.trogdor.rest.DestroyTaskRequest) TaskRequest(org.apache.kafka.trogdor.rest.TaskRequest) StopTaskRequest(org.apache.kafka.trogdor.rest.StopTaskRequest) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) TreeMap(java.util.TreeMap) Namespace(net.sourceforge.argparse4j.inf.Namespace) UptimeResponse(org.apache.kafka.trogdor.rest.UptimeResponse) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) TasksRequest(org.apache.kafka.trogdor.rest.TasksRequest) TaskState(org.apache.kafka.trogdor.rest.TaskState)

Example 5 with CreateTaskRequest

use of org.apache.kafka.trogdor.rest.CreateTaskRequest in project kafka by apache.

the class CoordinatorTest method testTaskDestruction.

@Test
public void testTaskDestruction() throws Exception {
    MockTime time = new MockTime(0, 0, 0);
    Scheduler scheduler = new MockScheduler(time);
    try (MiniTrogdorCluster cluster = new MiniTrogdorCluster.Builder().addCoordinator("node01").addAgent("node01").addAgent("node02").scheduler(scheduler).build()) {
        CoordinatorClient coordinatorClient = cluster.coordinatorClient();
        AgentClient agentClient1 = cluster.agentClient("node01");
        AgentClient agentClient2 = cluster.agentClient("node02");
        new ExpectedTasks().waitFor(coordinatorClient).waitFor(agentClient1).waitFor(agentClient2);
        NoOpTaskSpec fooSpec = new NoOpTaskSpec(2, 12);
        coordinatorClient.destroyTask(new DestroyTaskRequest("foo"));
        coordinatorClient.createTask(new CreateTaskRequest("foo", fooSpec));
        NoOpTaskSpec barSpec = new NoOpTaskSpec(20, 20);
        coordinatorClient.createTask(new CreateTaskRequest("bar", barSpec));
        coordinatorClient.destroyTask(new DestroyTaskRequest("bar"));
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskPending(fooSpec)).build()).waitFor(coordinatorClient).waitFor(agentClient1).waitFor(agentClient2);
        time.sleep(10);
        ObjectNode status1 = new ObjectNode(JsonNodeFactory.instance);
        status1.set("node01", new TextNode("active"));
        status1.set("node02", new TextNode("active"));
        new ExpectedTasks().addTask(new ExpectedTaskBuilder("foo").taskState(new TaskRunning(fooSpec, 10, status1)).build()).waitFor(coordinatorClient).waitFor(agentClient1).waitFor(agentClient2);
        coordinatorClient.destroyTask(new DestroyTaskRequest("foo"));
        new ExpectedTasks().waitFor(coordinatorClient).waitFor(agentClient1).waitFor(agentClient2);
    }
}
Also used : MockScheduler(org.apache.kafka.common.utils.MockScheduler) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) MockScheduler(org.apache.kafka.common.utils.MockScheduler) Scheduler(org.apache.kafka.common.utils.Scheduler) TextNode(com.fasterxml.jackson.databind.node.TextNode) ExpectedTaskBuilder(org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder) NoOpTaskSpec(org.apache.kafka.trogdor.task.NoOpTaskSpec) TaskPending(org.apache.kafka.trogdor.rest.TaskPending) ExpectedTasks(org.apache.kafka.trogdor.common.ExpectedTasks) DestroyTaskRequest(org.apache.kafka.trogdor.rest.DestroyTaskRequest) CreateTaskRequest(org.apache.kafka.trogdor.rest.CreateTaskRequest) MiniTrogdorCluster(org.apache.kafka.trogdor.common.MiniTrogdorCluster) AgentClient(org.apache.kafka.trogdor.agent.AgentClient) TaskRunning(org.apache.kafka.trogdor.rest.TaskRunning) MockTime(org.apache.kafka.common.utils.MockTime) Test(org.junit.jupiter.api.Test)

Aggregations

CreateTaskRequest (org.apache.kafka.trogdor.rest.CreateTaskRequest)16 ExpectedTaskBuilder (org.apache.kafka.trogdor.common.ExpectedTasks.ExpectedTaskBuilder)15 MiniTrogdorCluster (org.apache.kafka.trogdor.common.MiniTrogdorCluster)15 MockScheduler (org.apache.kafka.common.utils.MockScheduler)14 MockTime (org.apache.kafka.common.utils.MockTime)14 Scheduler (org.apache.kafka.common.utils.Scheduler)14 ExpectedTasks (org.apache.kafka.trogdor.common.ExpectedTasks)13 TaskPending (org.apache.kafka.trogdor.rest.TaskPending)12 TaskRunning (org.apache.kafka.trogdor.rest.TaskRunning)12 NoOpTaskSpec (org.apache.kafka.trogdor.task.NoOpTaskSpec)12 Test (org.junit.jupiter.api.Test)11 WorkerRunning (org.apache.kafka.trogdor.rest.WorkerRunning)10 TextNode (com.fasterxml.jackson.databind.node.TextNode)9 TaskDone (org.apache.kafka.trogdor.rest.TaskDone)9 DestroyTaskRequest (org.apache.kafka.trogdor.rest.DestroyTaskRequest)7 StopTaskRequest (org.apache.kafka.trogdor.rest.StopTaskRequest)7 WorkerDone (org.apache.kafka.trogdor.rest.WorkerDone)6 AgentClient (org.apache.kafka.trogdor.agent.AgentClient)5 TaskRequest (org.apache.kafka.trogdor.rest.TaskRequest)5 TaskState (org.apache.kafka.trogdor.rest.TaskState)5