Search in sources :

Example 1 with Subparsers

use of net.sourceforge.argparse4j.inf.Subparsers in project java-docs-samples by GoogleCloudPlatform.

the class PullQueue method main.

// [END cloud_tasks_lease_and_acknowledge_task]
public static void main(String[] args) throws Exception {
    ArgumentParser parser = ArgumentParsers.newFor("PullQueue").build().defaultHelp(true).description("Sample command-line program for interacting with the Cloud Tasks API.\n\n" + "See README.md for instructions on setting up your development environment " + "and running the scripts.");
    Subparsers subparsers = parser.addSubparsers().dest("command");
    // Create the parser for the command 'create-task'
    ArgumentParser createTaskParser = subparsers.addParser("create-task").help("Acknowledge a given task, which removes it from the queue.");
    createTaskParser.addArgument("--project").help("Project of the queue to add the task to.").required(true);
    createTaskParser.addArgument("--location").help("Location of the queue to add the task to.").required(true);
    createTaskParser.addArgument("--queue").help("ID (short name) of the queue to add the task to.").required(true);
    // Create the parser for the command 'pull-and-ack-task'
    ArgumentParser pullAndAckParser = subparsers.addParser("pull-and-ack-task").help("Create a task for a given queue with an arbitrary payload.");
    pullAndAckParser.addArgument("--project").help("Project of the queue to add the task to.").required(true);
    pullAndAckParser.addArgument("--location").help("Location of the queue to add the task to.").required(true);
    pullAndAckParser.addArgument("--queue").help("ID (short name) of the queue to add the task to.").required(true);
    // Parse commands
    Namespace cmd = parser.parseArgs(args);
    String command = cmd.get("command");
    String project = cmd.get("project");
    String queue = cmd.get("queue");
    String location = cmd.get("location");
    // Execute commands
    if (command.equals("create-task")) {
        createTask(project, location, queue);
    }
    if (command.equals("pull-and-ask-task")) {
        Task task = pullTask(project, location, queue);
        acknowledgeTask(task);
    }
}
Also used : Subparsers(net.sourceforge.argparse4j.inf.Subparsers) Task(com.google.api.services.cloudtasks.v2beta2.model.Task) ArgumentParser(net.sourceforge.argparse4j.inf.ArgumentParser) Namespace(net.sourceforge.argparse4j.inf.Namespace)

Example 2 with Subparsers

use of net.sourceforge.argparse4j.inf.Subparsers in project kafka by apache.

the class AgentClient method main.

public static void main(String[] args) throws Exception {
    ArgumentParser rootParser = ArgumentParsers.newArgumentParser("trogdor-agent-client").defaultHelp(true).description("The Trogdor agent client.");
    Subparsers subParsers = rootParser.addSubparsers().dest("command");
    Subparser uptimeParser = subParsers.addParser("uptime").help("Get the agent uptime.");
    addTargetArgument(uptimeParser);
    addJsonArgument(uptimeParser);
    Subparser statusParser = subParsers.addParser("status").help("Get the agent status.");
    addTargetArgument(statusParser);
    addJsonArgument(statusParser);
    Subparser createWorkerParser = subParsers.addParser("createWorker").help("Create a new worker.");
    addTargetArgument(createWorkerParser);
    addWorkerIdArgument(createWorkerParser, "The worker ID to create.");
    createWorkerParser.addArgument("--taskId").action(store()).required(true).type(String.class).dest("taskId").metavar("TASK_ID").help("The task ID to create.");
    createWorkerParser.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 stopWorkerParser = subParsers.addParser("stopWorker").help("Stop a worker.");
    addTargetArgument(stopWorkerParser);
    addWorkerIdArgument(stopWorkerParser, "The worker ID to stop.");
    Subparser destroyWorkerParser = subParsers.addParser("destroyWorker").help("Destroy a worker.");
    addTargetArgument(destroyWorkerParser);
    addWorkerIdArgument(destroyWorkerParser, "The worker ID to destroy.");
    Subparser shutdownParser = subParsers.addParser("shutdown").help("Shut down the agent.");
    addTargetArgument(shutdownParser);
    Namespace res = rootParser.parseArgsOrFail(args);
    String target = res.getString("target");
    AgentClient 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("Agent 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":
            {
                AgentStatusResponse status = client.status();
                if (res.getBoolean("json")) {
                    System.out.println(JsonUtil.toJsonString(status));
                } else {
                    System.out.printf("Agent is running at %s.%n", target);
                    System.out.printf("\tStart time: %s%n", dateString(status.serverStartMs(), localOffset));
                    List<List<String>> lines = new ArrayList<>();
                    List<String> header = new ArrayList<>(Arrays.asList("WORKER_ID", "TASK_ID", "STATE", "TASK_TYPE"));
                    lines.add(header);
                    for (Map.Entry<Long, WorkerState> entry : status.workers().entrySet()) {
                        List<String> cols = new ArrayList<>();
                        cols.add(Long.toString(entry.getKey()));
                        cols.add(entry.getValue().taskId());
                        cols.add(entry.getValue().getClass().getSimpleName());
                        cols.add(entry.getValue().spec().getClass().getCanonicalName());
                        lines.add(cols);
                    }
                    System.out.print(StringFormatter.prettyPrintGrid(lines));
                }
                break;
            }
        case "createWorker":
            {
                long workerId = res.getLong("workerId");
                String taskId = res.getString("taskId");
                TaskSpec taskSpec = JsonUtil.objectFromCommandLineArgument(res.getString("taskSpec"), TaskSpec.class);
                CreateWorkerRequest req = new CreateWorkerRequest(workerId, taskId, taskSpec);
                client.createWorker(req);
                System.out.printf("Sent CreateWorkerRequest for worker %d%n.", req.workerId());
                break;
            }
        case "stopWorker":
            {
                long workerId = res.getLong("workerId");
                client.stopWorker(new StopWorkerRequest(workerId));
                System.out.printf("Sent StopWorkerRequest for worker %d%n.", workerId);
                break;
            }
        case "destroyWorker":
            {
                long workerId = res.getLong("workerId");
                client.destroyWorker(new DestroyWorkerRequest(workerId));
                System.out.printf("Sent DestroyWorkerRequest for worker %d%n.", workerId);
                break;
            }
        case "shutdown":
            {
                client.invokeShutdown();
                System.out.println("Sent ShutdownRequest.");
                break;
            }
        default:
            {
                System.out.println("You must choose an action. Type --help for help.");
                Exit.exit(1);
            }
    }
}
Also used : UriBuilder(javax.ws.rs.core.UriBuilder) TaskSpec(org.apache.kafka.trogdor.task.TaskSpec) StringFormatter.durationString(org.apache.kafka.trogdor.common.StringFormatter.durationString) StringFormatter.dateString(org.apache.kafka.trogdor.common.StringFormatter.dateString) ArgumentParser(net.sourceforge.argparse4j.inf.ArgumentParser) Namespace(net.sourceforge.argparse4j.inf.Namespace) ZoneOffset(java.time.ZoneOffset) UptimeResponse(org.apache.kafka.trogdor.rest.UptimeResponse) DestroyWorkerRequest(org.apache.kafka.trogdor.rest.DestroyWorkerRequest) Subparsers(net.sourceforge.argparse4j.inf.Subparsers) AgentStatusResponse(org.apache.kafka.trogdor.rest.AgentStatusResponse) StopWorkerRequest(org.apache.kafka.trogdor.rest.StopWorkerRequest) Subparser(net.sourceforge.argparse4j.inf.Subparser) ArrayList(java.util.ArrayList) List(java.util.List) CreateWorkerRequest(org.apache.kafka.trogdor.rest.CreateWorkerRequest)

Example 3 with Subparsers

use of net.sourceforge.argparse4j.inf.Subparsers in project kafka by apache.

the class TransactionsCommand method execute.

static void execute(String[] args, Function<Namespace, Admin> adminSupplier, PrintStream out, Time time) throws Exception {
    List<TransactionsCommand> commands = Arrays.asList(new ListTransactionsCommand(time), new DescribeTransactionsCommand(time), new DescribeProducersCommand(time), new AbortTransactionCommand(time), new FindHangingTransactionsCommand(time));
    ArgumentParser parser = buildBaseParser();
    Subparsers subparsers = parser.addSubparsers().dest("command").title("commands").metavar("COMMAND");
    commands.forEach(command -> command.addSubparser(subparsers));
    final Namespace ns;
    try {
        ns = parser.parseArgs(args);
    } catch (ArgumentParserException e) {
        parser.handleError(e);
        Exit.exit(1);
        return;
    }
    Admin admin = adminSupplier.apply(ns);
    String commandName = ns.getString("command");
    Optional<TransactionsCommand> commandOpt = commands.stream().filter(cmd -> cmd.name().equals(commandName)).findFirst();
    if (!commandOpt.isPresent()) {
        printErrorAndExit("Unexpected command " + commandName);
    }
    TransactionsCommand command = commandOpt.get();
    command.execute(admin, ns, out);
    Exit.exit(0);
}
Also used : DescribeProducersOptions(org.apache.kafka.clients.admin.DescribeProducersOptions) Arrays(java.util.Arrays) ProducerState(org.apache.kafka.clients.admin.ProducerState) Exit(org.apache.kafka.common.utils.Exit) LoggerFactory(org.slf4j.LoggerFactory) HashMap(java.util.HashMap) Function(java.util.function.Function) Arguments.store(net.sourceforge.argparse4j.impl.Arguments.store) ArrayList(java.util.ArrayList) Collections.singletonList(java.util.Collections.singletonList) HashSet(java.util.HashSet) OptionalLong(java.util.OptionalLong) Collections.singleton(java.util.Collections.singleton) ArgumentParser(net.sourceforge.argparse4j.inf.ArgumentParser) ArgumentParserException(net.sourceforge.argparse4j.inf.ArgumentParserException) Namespace(net.sourceforge.argparse4j.inf.Namespace) Map(java.util.Map) ListTopicsOptions(org.apache.kafka.clients.admin.ListTopicsOptions) Admin(org.apache.kafka.clients.admin.Admin) TransactionListing(org.apache.kafka.clients.admin.TransactionListing) TopicDescription(org.apache.kafka.clients.admin.TopicDescription) AbortTransactionSpec(org.apache.kafka.clients.admin.AbortTransactionSpec) TransactionDescription(org.apache.kafka.clients.admin.TransactionDescription) DescribeProducersResult(org.apache.kafka.clients.admin.DescribeProducersResult) Utils(org.apache.kafka.common.utils.Utils) PrintStream(java.io.PrintStream) TopicPartition(org.apache.kafka.common.TopicPartition) TopicPartitionInfo(org.apache.kafka.common.TopicPartitionInfo) Subparsers(net.sourceforge.argparse4j.inf.Subparsers) Logger(org.slf4j.Logger) Properties(java.util.Properties) DescribeTransactionsResult(org.apache.kafka.clients.admin.DescribeTransactionsResult) Time(org.apache.kafka.common.utils.Time) ArgumentParsers(net.sourceforge.argparse4j.ArgumentParsers) AdminClientConfig(org.apache.kafka.clients.admin.AdminClientConfig) Collection(java.util.Collection) Subparser(net.sourceforge.argparse4j.inf.Subparser) Set(java.util.Set) IOException(java.io.IOException) Collectors(java.util.stream.Collectors) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) ListTransactionsOptions(org.apache.kafka.clients.admin.ListTransactionsOptions) TransactionalIdNotFoundException(org.apache.kafka.common.errors.TransactionalIdNotFoundException) Optional(java.util.Optional) ArgumentGroup(net.sourceforge.argparse4j.inf.ArgumentGroup) Collections(java.util.Collections) Admin(org.apache.kafka.clients.admin.Admin) ArgumentParser(net.sourceforge.argparse4j.inf.ArgumentParser) Namespace(net.sourceforge.argparse4j.inf.Namespace) Subparsers(net.sourceforge.argparse4j.inf.Subparsers) ArgumentParserException(net.sourceforge.argparse4j.inf.ArgumentParserException)

Example 4 with Subparsers

use of net.sourceforge.argparse4j.inf.Subparsers 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)

Aggregations

ArgumentParser (net.sourceforge.argparse4j.inf.ArgumentParser)4 Namespace (net.sourceforge.argparse4j.inf.Namespace)4 Subparsers (net.sourceforge.argparse4j.inf.Subparsers)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 Subparser (net.sourceforge.argparse4j.inf.Subparser)3 ZoneOffset (java.time.ZoneOffset)2 UriBuilder (javax.ws.rs.core.UriBuilder)2 StringFormatter.dateString (org.apache.kafka.trogdor.common.StringFormatter.dateString)2 StringFormatter.durationString (org.apache.kafka.trogdor.common.StringFormatter.durationString)2 UptimeResponse (org.apache.kafka.trogdor.rest.UptimeResponse)2 TaskSpec (org.apache.kafka.trogdor.task.TaskSpec)2 Task (com.google.api.services.cloudtasks.v2beta2.model.Task)1 IOException (java.io.IOException)1 PrintStream (java.io.PrintStream)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Collections.singleton (java.util.Collections.singleton)1 Collections.singletonList (java.util.Collections.singletonList)1