Search in sources :

Example 1 with TaskPayloadResponse

use of org.apache.druid.indexing.overlord.http.TaskPayloadResponse in project druid by druid-io.

the class OverlordResourceTestClient method getTaskPayload.

public TaskPayloadResponse getTaskPayload(String taskId) {
    try {
        StatusResponseHolder response = makeRequest(HttpMethod.GET, StringUtils.format("%stask/%s", getIndexerURL(), taskId));
        LOG.debug("Task %s response %s", taskId, response.getContent());
        return jsonMapper.readValue(response.getContent(), new TypeReference<TaskPayloadResponse>() {
        });
    } catch (ISE e) {
        throw e;
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : TaskPayloadResponse(org.apache.druid.indexing.overlord.http.TaskPayloadResponse) StatusResponseHolder(org.apache.druid.java.util.http.client.response.StatusResponseHolder) ISE(org.apache.druid.java.util.common.ISE)

Aggregations

TaskPayloadResponse (org.apache.druid.indexing.overlord.http.TaskPayloadResponse)1 ISE (org.apache.druid.java.util.common.ISE)1 StatusResponseHolder (org.apache.druid.java.util.http.client.response.StatusResponseHolder)1