Search in sources :

Example 6 with PendingClusterTask

use of org.elasticsearch.cluster.service.PendingClusterTask in project elasticsearch by elastic.

the class PendingClusterTasksResponse method readFrom.

@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    int size = in.readVInt();
    pendingTasks = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        PendingClusterTask task = new PendingClusterTask();
        task.readFrom(in);
        pendingTasks.add(task);
    }
}
Also used : PendingClusterTask(org.elasticsearch.cluster.service.PendingClusterTask)

Example 7 with PendingClusterTask

use of org.elasticsearch.cluster.service.PendingClusterTask in project elasticsearch by elastic.

the class RestPendingClusterTasksAction method buildTable.

private Table buildTable(RestRequest request, PendingClusterTasksResponse tasks) {
    Table t = getTableWithHeader(request);
    for (PendingClusterTask task : tasks) {
        t.startRow();
        t.addCell(task.getInsertOrder());
        t.addCell(task.getTimeInQueue());
        t.addCell(task.getPriority());
        t.addCell(task.getSource());
        t.endRow();
    }
    return t;
}
Also used : PendingClusterTask(org.elasticsearch.cluster.service.PendingClusterTask) Table(org.elasticsearch.common.Table)

Example 8 with PendingClusterTask

use of org.elasticsearch.cluster.service.PendingClusterTask in project crate by crate.

the class PendingClusterTasksResponse method toString.

@Override
public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("tasks: (").append(pendingTasks.size()).append("):\n");
    for (PendingClusterTask pendingClusterTask : this) {
        sb.append(pendingClusterTask.getInsertOrder()).append("/").append(pendingClusterTask.getPriority()).append("/").append(pendingClusterTask.getSource()).append("/").append(pendingClusterTask.getTimeInQueue()).append("\n");
    }
    return sb.toString();
}
Also used : PendingClusterTask(org.elasticsearch.cluster.service.PendingClusterTask)

Aggregations

PendingClusterTask (org.elasticsearch.cluster.service.PendingClusterTask)8 ClusterHealthRequest (org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest)1 ClusterHealthResponse (org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse)1 ClusterStatsNodes (org.elasticsearch.action.admin.cluster.stats.ClusterStatsNodes)1 ClusterStatsRequest (org.elasticsearch.action.admin.cluster.stats.ClusterStatsRequest)1 ClusterStatsResponse (org.elasticsearch.action.admin.cluster.stats.ClusterStatsResponse)1 PendingClusterTasksRequest (org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksRequest)1 PendingClusterTasksResponse (org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksResponse)1 ClusterAdminClient (org.elasticsearch.client.ClusterAdminClient)1 Table (org.elasticsearch.common.Table)1