接口 ResourceManager
- 所有已知实现类:
AbstractResourceManager,KubernetesResourceManager,StandaloneResourceManager,YarnResourceManager
public interface ResourceManager
-
方法概要
修饰符和类型方法说明org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<SlotProfile>applyResource(long jobId, ResourceProfile resourceProfile, Map<String, String> tagFilter) org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<List<SlotProfile>>applyResources(long jobId, List<ResourceProfile> resourceProfile, Map<String, String> tagFilter) voidclose()getAssignedSlots(Map<String, String> tags) ConcurrentMap<com.hazelcast.cluster.Address,WorkerProfile> getUnassignedSlots(Map<String, String> tags) voidheartbeat(WorkerProfile workerProfile) Every time ResourceManager and Worker communicate, heartbeat method should be called to record the latest Worker statusvoidinit()voidmemberRemoved(com.hazelcast.internal.services.MembershipServiceEvent event) org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<Void>releaseResource(long jobId, SlotProfile profile) org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<Void>releaseResources(long jobId, List<SlotProfile> profiles) booleanslotActiveCheck(SlotProfile profile) CheckSlotProfileis active or not.intworkerCount(Map<String, String> tags)
-
方法详细资料
-
init
void init() -
applyResource
org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<SlotProfile> applyResource(long jobId, ResourceProfile resourceProfile, Map<String, String> tagFilter) throws NoEnoughResourceException -
applyResources
org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<List<SlotProfile>> applyResources(long jobId, List<ResourceProfile> resourceProfile, Map<String, String> tagFilter) throws NoEnoughResourceException -
releaseResources
org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<Void> releaseResources(long jobId, List<SlotProfile> profiles) -
releaseResource
org.apache.seatunnel.engine.common.utils.concurrent.CompletableFuture<Void> releaseResource(long jobId, SlotProfile profile) -
slotActiveCheck
CheckSlotProfileis active or not. Not active meaning can't use this slot to deploy task.- 返回:
- active or not
-
heartbeat
Every time ResourceManager and Worker communicate, heartbeat method should be called to record the latest Worker status- 参数:
workerProfile- the worker current worker's profile
-
memberRemoved
void memberRemoved(com.hazelcast.internal.services.MembershipServiceEvent event) -
close
void close() -
getUnassignedSlots
-
getAssignedSlots
-
workerCount
-
getRegisterWorker
ConcurrentMap<com.hazelcast.cluster.Address,WorkerProfile> getRegisterWorker()
-