use of org.apache.flink.runtime.taskexecutor.SlotStatus in project flink by apache.
the class TaskSlotTable method createSlotReport.
// ---------------------------------------------------------------------
// Slot report methods
// ---------------------------------------------------------------------
public SlotReport createSlotReport(ResourceID resourceId) {
final int numberSlots = taskSlots.size();
List<SlotStatus> slotStatuses = Arrays.asList(new SlotStatus[numberSlots]);
for (int i = 0; i < numberSlots; i++) {
TaskSlot taskSlot = taskSlots.get(i);
SlotID slotId = new SlotID(resourceId, taskSlot.getIndex());
SlotStatus slotStatus = new SlotStatus(slotId, taskSlot.getResourceProfile(), taskSlot.getJobId(), taskSlot.getAllocationId());
slotStatuses.set(i, slotStatus);
}
final SlotReport slotReport = new SlotReport(slotStatuses);
return slotReport;
}
Aggregations