public class DefaultFreeSlotInfoTracker extends Object implements FreeSlotInfoTracker
FreeSlotInfoTracker.| 构造器和说明 |
|---|
DefaultFreeSlotInfoTracker(Set<AllocationID> freeSlots,
Function<AllocationID,SlotInfo> slotInfoLookup,
Function<AllocationID,AllocatedSlotPool.FreeSlotInfo> freeSlotInfoLookup,
Function<ResourceID,Double> taskExecutorUtilizationLookup) |
| 限定符和类型 | 方法和说明 |
|---|---|
DefaultFreeSlotInfoTracker |
createNewFreeSlotInfoTrackerWithoutBlockedSlots(Set<AllocationID> blockedSlots)
Create a new free slot tracker without blocked slots.
|
Set<AllocationID> |
getAvailableSlots()
Get allocation id of all available slots.
|
Collection<SlotInfo> |
getFreeSlotsInformation()
Returns a list of
SlotInfo objects about all slots that are currently available in
the slot pool. |
Collection<AllocatedSlotPool.FreeSlotInfo> |
getFreeSlotsWithIdleSinceInformation()
Returns a list of
AllocatedSlotPool.FreeSlotInfo objects about all slots with slot
idle since that are currently available in the slot pool. |
SlotInfo |
getSlotInfo(AllocationID allocationId)
Get slot info by allocation id, this slot must exist.
|
double |
getTaskExecutorUtilization(SlotInfo slotInfo)
Get task executor utilization of this slot.
|
void |
reserveSlot(AllocationID allocationId)
Reserve free slot when it is used.
|
public DefaultFreeSlotInfoTracker(Set<AllocationID> freeSlots, Function<AllocationID,SlotInfo> slotInfoLookup, Function<AllocationID,AllocatedSlotPool.FreeSlotInfo> freeSlotInfoLookup, Function<ResourceID,Double> taskExecutorUtilizationLookup)
public Set<AllocationID> getAvailableSlots()
FreeSlotInfoTrackergetAvailableSlots 在接口中 FreeSlotInfoTrackerpublic SlotInfo getSlotInfo(AllocationID allocationId)
FreeSlotInfoTrackergetSlotInfo 在接口中 FreeSlotInfoTrackerallocationId - to get SlotInfopublic Collection<AllocatedSlotPool.FreeSlotInfo> getFreeSlotsWithIdleSinceInformation()
FreeSlotInfoTrackerAllocatedSlotPool.FreeSlotInfo objects about all slots with slot
idle since that are currently available in the slot pool.getFreeSlotsWithIdleSinceInformation 在接口中 FreeSlotInfoTrackerAllocatedSlotPool.FreeSlotInfo objects about all slots with slot
idle since that are currently available in the slot pool.public Collection<SlotInfo> getFreeSlotsInformation()
FreeSlotInfoTrackerSlotInfo objects about all slots that are currently available in
the slot pool.getFreeSlotsInformation 在接口中 FreeSlotInfoTrackerSlotInfo objects about all slots that are currently available in
the slot pool.public double getTaskExecutorUtilization(SlotInfo slotInfo)
FreeSlotInfoTrackergetTaskExecutorUtilization 在接口中 FreeSlotInfoTrackerslotInfo - to get task executor utilizationpublic void reserveSlot(AllocationID allocationId)
FreeSlotInfoTrackerreserveSlot 在接口中 FreeSlotInfoTrackerallocationId - to reservepublic DefaultFreeSlotInfoTracker createNewFreeSlotInfoTrackerWithoutBlockedSlots(Set<AllocationID> blockedSlots)
FreeSlotInfoTrackercreateNewFreeSlotInfoTrackerWithoutBlockedSlots 在接口中 FreeSlotInfoTrackerblockedSlots - slots that should not be usedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.