code: @Override
    public void onHttpRequest(final ParsedHttpRequest request, final HttpServletResponse response)
        throws IOException, ServletException {
      final String target = request.getTargetEntity().toLowerCase();
      final Map<String, List<String>> queryMap = request.getQueryMap();
  
      final SchedulerResponse result;
      switch (target) {
      case "list":
        result = onList();
        break;
      case "clear":
        result = onClear();
        break;
      case "status":
        result = onStatus(queryMap);
        break;
      case "submit":
        result = onSubmit(queryMap);
        break;
      case "cancel":
        result = onCancel(queryMap);
        break;
      case "max-eval":
        result = onMaxEval(queryMap);
        break;
      default:
        result = SchedulerResponse.notFound("Unsupported operation");
      }
  
      // Send response to the http client
      final int status = result.getStatus();
      final String message= result.getMessage();
  
      if (result.isOK()) {
        response.getOutputStream().println(message);
      } else {
        response.sendError(status, message);
      }
    }
docs: HttpRequest handler. You must specify UriSpecification and API version.
  The request url is http://{address}:{port}/scheduler/v1
  
  APIs
  /list                to get the status list for all tasks
  /status?id={id}      to query the status of such a task, given id
  /submit?cmd={cmd}    to submit a Task, which returns its id
  /cancel?id={id}      to cancel the task's execution
  /max-eval?num={num}  to set the maximum number of evaluators
  /clear               to clear the waiting queue