code: public String fireTask(CrudStatementMeta meta, Map<String, String> reqHeaders, boolean wait) {
          CloseableHttpResponse resp = null;
          String url = format(overlordUrl, overlordHost, overlordPort);
          try {
              resp = postJson(url, meta.toString(), reqHeaders);
              if (resp.getStatusLine().getStatusCode() == 500) {
                  return "Task failed with server error, " + IOUtils.toString(resp.getEntity().getContent());
              }
              //TODO: Check for nulls in the following.
              String strResp = IOUtils.toString(resp.getEntity().getContent());
              JSONObject respJson = new JSONObject(strResp);
              if (wait) {
                  if (waitForTask(respJson.getString("task"), reqHeaders, TWO_HOURS_IN_MILLIS)) {
                      return "Task completed successfully , task Id " + respJson;
                  }
                  return "Task failed/still running, task Id " + respJson;
              } else {
                  String taskId = respJson.optString("task");
                  if (StringUtils.isBlank(taskId)) {
                      log.error("Response has no taskId, Response body : {}", respJson);
                      return null;
                  }
                  return respJson.getString("task");
              }
          } catch (IOException | IllegalStateException | JSONException ex) {            
              log.error("Error when firing task to overlord {}", ExceptionUtils.getStackTrace(ex));
              return format("Http %s \n", ex);
          } finally {
              returnClient(resp);
          }
      }
docs: Task means an indexer task(goes straight to overlord).
  @param meta
  @param reqHeaders
  @param wait
  @return