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);
}
}
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;
}
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();
}
Aggregations