Interface ResourceManagerGateway
-
- All Superinterfaces:
BlocklistListener,ClusterPartitionManager,org.apache.flink.runtime.rpc.FencedRpcGateway<ResourceManagerId>,org.apache.flink.runtime.rpc.RpcGateway
- All Known Implementing Classes:
ActiveResourceManager,ResourceManager,StandaloneResourceManager
public interface ResourceManagerGateway extends org.apache.flink.runtime.rpc.FencedRpcGateway<ResourceManagerId>, ClusterPartitionManager, BlocklistListener
TheResourceManager's RPC gateway interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Acknowledge>declareRequiredResources(JobMasterId jobMasterId, ResourceRequirements resourceRequirements, Duration timeout)Declares the absolute resource requirements for a job.CompletableFuture<Acknowledge>deregisterApplication(ApplicationStatus finalStatus, String diagnostics)Deregister Flink from the underlying resource management system.voiddisconnectJobManager(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.JobStatus jobStatus, Exception cause)Disconnects a JobManager specified by the given resourceID from theResourceManager.voiddisconnectTaskManager(ResourceID resourceID, Exception cause)Disconnects a TaskManager specified by the given resourceID from theResourceManager.CompletableFuture<Integer>getNumberOfRegisteredTaskManagers()Gets the currently registered number of TaskManagers.CompletableFuture<Void>heartbeatFromJobManager(ResourceID heartbeatOrigin)Sends the heartbeat to resource manager from job manager.CompletableFuture<Void>heartbeatFromTaskManager(ResourceID heartbeatOrigin, TaskExecutorHeartbeatPayload heartbeatPayload)Sends the heartbeat to resource manager from task manager.voidnotifySlotAvailable(InstanceID instanceId, SlotID slotID, AllocationID oldAllocationId)Sent by the TaskExecutor to notify the ResourceManager that a slot has become available.CompletableFuture<RegistrationResponse>registerJobMaster(JobMasterId jobMasterId, ResourceID jobMasterResourceId, String jobMasterAddress, org.apache.flink.api.common.JobID jobId, Duration timeout)Register aJobMasterat the resource manager.CompletableFuture<RegistrationResponse>registerTaskExecutor(TaskExecutorRegistration taskExecutorRegistration, Duration timeout)Register aTaskExecutorat the resource manager.CompletableFuture<ProfilingInfo>requestProfiling(ResourceID taskManagerId, int duration, ProfilingInfo.ProfilingMode mode, Duration timeout)Requests the profiling instance from the givenTaskExecutor.CompletableFuture<ResourceOverview>requestResourceOverview(Duration timeout)Requests the resource overview.CompletableFuture<TaskExecutorThreadInfoGateway>requestTaskExecutorThreadInfoGateway(ResourceID taskManagerId, Duration timeout)Requests theTaskExecutorGateway.CompletableFuture<TaskManagerInfoWithSlots>requestTaskManagerDetailsInfo(ResourceID taskManagerId, Duration timeout)Requests detail information about the givenTaskExecutor.CompletableFuture<TransientBlobKey>requestTaskManagerFileUploadByNameAndType(ResourceID taskManagerId, String fileName, FileType fileType, Duration timeout)Request the file upload from the givenTaskExecutorto the cluster'sBlobServer.CompletableFuture<TransientBlobKey>requestTaskManagerFileUploadByType(ResourceID taskManagerId, FileType fileType, Duration timeout)Request the file upload from the givenTaskExecutorto the cluster'sBlobServer.CompletableFuture<Collection<TaskManagerInfo>>requestTaskManagerInfo(Duration timeout)Requests information about the registeredTaskExecutor.CompletableFuture<Collection<LogInfo>>requestTaskManagerLogList(ResourceID taskManagerId, Duration timeout)Request log list from the givenTaskExecutor.CompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>>requestTaskManagerMetricQueryServiceAddresses(Duration timeout)Requests the paths for the TaskManager'sMetricQueryServiceto query.CompletableFuture<Collection<ProfilingInfo>>requestTaskManagerProfilingList(ResourceID taskManagerId, Duration timeout)Request profiling list from the givenTaskExecutor.CompletableFuture<ThreadDumpInfo>requestThreadDump(ResourceID taskManagerId, Duration timeout)Requests the thread dump from the givenTaskExecutor.CompletableFuture<Acknowledge>sendSlotReport(ResourceID taskManagerResourceId, InstanceID taskManagerRegistrationId, SlotReport slotReport, Duration timeout)Sends the givenSlotReportto the ResourceManager.-
Methods inherited from interface org.apache.flink.runtime.blocklist.BlocklistListener
notifyNewBlockedNodes
-
Methods inherited from interface org.apache.flink.runtime.io.network.partition.ClusterPartitionManager
getClusterPartitionsShuffleDescriptors, listDataSets, releaseClusterPartitions, reportClusterPartitions
-
-
-
-
Method Detail
-
registerJobMaster
CompletableFuture<RegistrationResponse> registerJobMaster(JobMasterId jobMasterId, ResourceID jobMasterResourceId, String jobMasterAddress, org.apache.flink.api.common.JobID jobId, Duration timeout)
Register aJobMasterat the resource manager.- Parameters:
jobMasterId- The fencing token for the JobMaster leaderjobMasterResourceId- The resource ID of the JobMaster that registersjobMasterAddress- The address of the JobMaster that registersjobId- The Job ID of the JobMaster that registerstimeout- Timeout for the future to complete- Returns:
- Future registration response
-
declareRequiredResources
CompletableFuture<Acknowledge> declareRequiredResources(JobMasterId jobMasterId, ResourceRequirements resourceRequirements, Duration timeout)
Declares the absolute resource requirements for a job.- Parameters:
jobMasterId- id of the JobMasterresourceRequirements- resource requirements- Returns:
- The confirmation that the requirements have been processed
-
registerTaskExecutor
CompletableFuture<RegistrationResponse> registerTaskExecutor(TaskExecutorRegistration taskExecutorRegistration, Duration timeout)
Register aTaskExecutorat the resource manager.- Parameters:
taskExecutorRegistration- the task executor registration.timeout- The timeout for the response.- Returns:
- The future to the response by the ResourceManager.
-
sendSlotReport
CompletableFuture<Acknowledge> sendSlotReport(ResourceID taskManagerResourceId, InstanceID taskManagerRegistrationId, SlotReport slotReport, Duration timeout)
Sends the givenSlotReportto the ResourceManager.- Parameters:
taskManagerResourceId- The resource ID of the sending TaskManagertaskManagerRegistrationId- id identifying the sending TaskManagerslotReport- which is sent to the ResourceManagertimeout- for the operation- Returns:
- Future which is completed with
Acknowledgeonce the slot report has been received.
-
notifySlotAvailable
void notifySlotAvailable(InstanceID instanceId, SlotID slotID, AllocationID oldAllocationId)
Sent by the TaskExecutor to notify the ResourceManager that a slot has become available.- Parameters:
instanceId- TaskExecutor's instance idslotID- The SlotID of the freed slotoldAllocationId- to which the slot has been allocated
-
deregisterApplication
CompletableFuture<Acknowledge> deregisterApplication(ApplicationStatus finalStatus, @Nullable String diagnostics)
Deregister Flink from the underlying resource management system.- Parameters:
finalStatus- final status with which to deregister the Flink applicationdiagnostics- additional information for the resource management system, can benull
-
getNumberOfRegisteredTaskManagers
CompletableFuture<Integer> getNumberOfRegisteredTaskManagers()
Gets the currently registered number of TaskManagers.- Returns:
- The future to the number of registered TaskManagers.
-
heartbeatFromTaskManager
CompletableFuture<Void> heartbeatFromTaskManager(ResourceID heartbeatOrigin, TaskExecutorHeartbeatPayload heartbeatPayload)
Sends the heartbeat to resource manager from task manager.- Parameters:
heartbeatOrigin- unique id of the task managerheartbeatPayload- payload from the originating TaskManager- Returns:
- future which is completed exceptionally if the operation fails
-
heartbeatFromJobManager
CompletableFuture<Void> heartbeatFromJobManager(ResourceID heartbeatOrigin)
Sends the heartbeat to resource manager from job manager.- Parameters:
heartbeatOrigin- unique id of the job manager- Returns:
- future which is completed exceptionally if the operation fails
-
disconnectTaskManager
void disconnectTaskManager(ResourceID resourceID, Exception cause)
Disconnects a TaskManager specified by the given resourceID from theResourceManager.- Parameters:
resourceID- identifying the TaskManager to disconnectcause- for the disconnection of the TaskManager
-
disconnectJobManager
void disconnectJobManager(org.apache.flink.api.common.JobID jobId, org.apache.flink.api.common.JobStatus jobStatus, Exception cause)Disconnects a JobManager specified by the given resourceID from theResourceManager.- Parameters:
jobId- JobID for which the JobManager was the leaderjobStatus- status of the job at the time of disconnectioncause- for the disconnection of the JobManager
-
requestTaskManagerInfo
CompletableFuture<Collection<TaskManagerInfo>> requestTaskManagerInfo(Duration timeout)
Requests information about the registeredTaskExecutor.- Parameters:
timeout- of the request- Returns:
- Future collection of TaskManager information
-
requestTaskManagerDetailsInfo
CompletableFuture<TaskManagerInfoWithSlots> requestTaskManagerDetailsInfo(ResourceID taskManagerId, Duration timeout)
Requests detail information about the givenTaskExecutor.- Parameters:
taskManagerId- identifying the TaskExecutor for which to return informationtimeout- of the request- Returns:
- Future TaskManager information and its allocated slots
-
requestResourceOverview
CompletableFuture<ResourceOverview> requestResourceOverview(Duration timeout)
Requests the resource overview. The resource overview provides information about the connected TaskManagers, the total number of slots and the number of available slots.- Parameters:
timeout- of the request- Returns:
- Future containing the resource overview
-
requestTaskManagerMetricQueryServiceAddresses
CompletableFuture<Collection<org.apache.flink.api.java.tuple.Tuple2<ResourceID,String>>> requestTaskManagerMetricQueryServiceAddresses(Duration timeout)
Requests the paths for the TaskManager'sMetricQueryServiceto query.- Parameters:
timeout- for the asynchronous operation- Returns:
- Future containing the collection of resource ids and the corresponding metric query service path
-
requestTaskManagerFileUploadByType
CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByType(ResourceID taskManagerId, FileType fileType, Duration timeout)
Request the file upload from the givenTaskExecutorto the cluster'sBlobServer. The correspondingTransientBlobKeyis returned.- Parameters:
taskManagerId- identifying theTaskExecutorto upload the specified filefileType- type of the file to uploadtimeout- for the asynchronous operation- Returns:
- Future which is completed with the
TransientBlobKeyafter uploading the file to theBlobServer.
-
requestTaskManagerFileUploadByNameAndType
CompletableFuture<TransientBlobKey> requestTaskManagerFileUploadByNameAndType(ResourceID taskManagerId, String fileName, FileType fileType, Duration timeout)
Request the file upload from the givenTaskExecutorto the cluster'sBlobServer. The correspondingTransientBlobKeyis returned.- Parameters:
taskManagerId- identifying theTaskExecutorto upload the specified filefileName- name of the file to uploadfileType- type of the file to uploadtimeout- for the asynchronous operation- Returns:
- Future which is completed with the
TransientBlobKeyafter uploading the file to theBlobServer.
-
requestTaskManagerLogList
CompletableFuture<Collection<LogInfo>> requestTaskManagerLogList(ResourceID taskManagerId, Duration timeout)
Request log list from the givenTaskExecutor.- Parameters:
taskManagerId- identifying theTaskExecutorto get log list fromtimeout- for the asynchronous operation- Returns:
- Future which is completed with the historical log list
-
requestThreadDump
CompletableFuture<ThreadDumpInfo> requestThreadDump(ResourceID taskManagerId, Duration timeout)
Requests the thread dump from the givenTaskExecutor.- Parameters:
taskManagerId- taskManagerId identifying theTaskExecutorto get the thread dump fromtimeout- timeout of the asynchronous operation- Returns:
- Future containing the thread dump information
-
requestTaskExecutorThreadInfoGateway
CompletableFuture<TaskExecutorThreadInfoGateway> requestTaskExecutorThreadInfoGateway(ResourceID taskManagerId, Duration timeout)
Requests theTaskExecutorGateway.- Parameters:
taskManagerId- identifying theTaskExecutor.- Returns:
- Future containing the task executor gateway.
-
requestTaskManagerProfilingList
CompletableFuture<Collection<ProfilingInfo>> requestTaskManagerProfilingList(ResourceID taskManagerId, Duration timeout)
Request profiling list from the givenTaskExecutor.- Parameters:
taskManagerId- identifying theTaskExecutorto get profiling list fromtimeout- for the asynchronous operation- Returns:
- Future which is completed with the historical profiling list
-
requestProfiling
CompletableFuture<ProfilingInfo> requestProfiling(ResourceID taskManagerId, int duration, ProfilingInfo.ProfilingMode mode, Duration timeout)
Requests the profiling instance from the givenTaskExecutor.- Parameters:
taskManagerId- taskManagerId identifying theTaskExecutorto get the profiling fromduration- profiling durationmode- profiling modeProfilingInfo.ProfilingModetimeout- timeout of the asynchronous operation- Returns:
- Future containing the created profiling information
-
-