use of org.apache.rocketmq.connect.cli.utils.RestSender in project rocketmq-externals by apache.
the class GetAllocatedTasks method execute.
@Override
public void execute(CommandLine commandLine, Options options) throws SubCommandException {
try {
String request = "/getAllocatedTasks";
URL url = new URL(CLIConfigDefine.PROTOCOL, config.getHttpAddr(), config.getHttpPort(), request);
String result = new RestSender().sendHttpRequest(url.toString(), "");
showTaskInfo(result);
} catch (Exception e) {
throw new SubCommandException(this.getClass().getSimpleName() + " command failed", e);
}
}
Aggregations