Class StandaloneResourceManager
- java.lang.Object
-
- org.apache.flink.runtime.rpc.RpcEndpoint
-
- org.apache.flink.runtime.rpc.FencedRpcEndpoint<ResourceManagerId>
-
- org.apache.flink.runtime.resourcemanager.ResourceManager<ResourceID>
-
- org.apache.flink.runtime.resourcemanager.StandaloneResourceManager
-
- All Implemented Interfaces:
AutoCloseable
,BlocklistListener
,ClusterPartitionManager
,ResourceManagerGateway
,FencedRpcGateway<ResourceManagerId>
,RpcGateway
,DelegationTokenManager.Listener
,AutoCloseableAsync
public class StandaloneResourceManager extends ResourceManager<ResourceID>
A standalone implementation of the resource manager. Used when the system is started in standalone mode (via scripts), rather than via a resource framework like YARN.This ResourceManager doesn't acquire new resources.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.rpc.RpcEndpoint
RpcEndpoint.MainThreadExecutor
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.resourcemanager.ResourceManager
blocklistHandler, ioExecutor, RESOURCE_MANAGER_NAME, resourceManagerMetricGroup
-
Fields inherited from class org.apache.flink.runtime.rpc.RpcEndpoint
log, rpcServer
-
-
Constructor Summary
Constructors Constructor Description StandaloneResourceManager(RpcService rpcService, UUID leaderSessionId, ResourceID resourceId, HeartbeatServices heartbeatServices, DelegationTokenManager delegationTokenManager, SlotManager slotManager, ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory, BlocklistHandler.Factory blocklistHandlerFactory, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, ResourceManagerMetricGroup resourceManagerMetricGroup, Duration startupPeriodTime, Duration rpcTimeout, Executor ioExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>
getReadyToServeFuture()
Get the ready to serve future of the resource manager.protected ResourceAllocator
getResourceAllocator()
protected Optional<ResourceID>
getWorkerNodeIfAcceptRegistration(ResourceID resourceID)
Get worker node if the worker resource is accepted.protected void
initialize()
Initializes the framework specific components.protected void
internalDeregisterApplication(ApplicationStatus finalStatus, String diagnostics)
The framework specific code to deregister the application.protected void
terminate()
Terminates the framework specific components.-
Methods inherited from class org.apache.flink.runtime.resourcemanager.ResourceManager
closeJobManagerConnection, closeTaskManagerConnection, declareRequiredResources, deregisterApplication, disconnectJobManager, disconnectTaskManager, getClusterPartitionsShuffleDescriptors, getInstanceIdByResourceId, getNumberOfRegisteredTaskManagers, getStartedFuture, getWorkerByInstanceId, heartbeatFromJobManager, heartbeatFromTaskManager, jobLeaderLostLeadership, listDataSets, notifyNewBlockedNodes, notifySlotAvailable, onFatalError, onNewTokensObtained, onStart, onStop, onWorkerRegistered, registerJobMaster, registerMetrics, registerTaskExecutor, releaseClusterPartitions, removeJob, reportClusterPartitions, requestProfiling, requestResourceOverview, requestTaskExecutorThreadInfoGateway, requestTaskManagerDetailsInfo, requestTaskManagerFileUploadByNameAndType, requestTaskManagerFileUploadByType, requestTaskManagerInfo, requestTaskManagerLogList, requestTaskManagerMetricQueryServiceAddresses, requestTaskManagerProfilingList, requestThreadDump, sendSlotReport, setFailUnfulfillableRequest, stopWorkerIfSupported
-
Methods inherited from class org.apache.flink.runtime.rpc.FencedRpcEndpoint
getFencingToken
-
Methods inherited from class org.apache.flink.runtime.rpc.RpcEndpoint
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getMainThreadExecutor, getMainThreadExecutor, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, registerResource, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, unregisterResource, validateRunsInMainThread
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.util.AutoCloseableAsync
close
-
Methods inherited from interface org.apache.flink.runtime.rpc.FencedRpcGateway
getFencingToken
-
Methods inherited from interface org.apache.flink.runtime.rpc.RpcGateway
getAddress, getHostname
-
-
-
-
Constructor Detail
-
StandaloneResourceManager
public StandaloneResourceManager(RpcService rpcService, UUID leaderSessionId, ResourceID resourceId, HeartbeatServices heartbeatServices, DelegationTokenManager delegationTokenManager, SlotManager slotManager, ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory, BlocklistHandler.Factory blocklistHandlerFactory, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, ResourceManagerMetricGroup resourceManagerMetricGroup, Duration startupPeriodTime, Duration rpcTimeout, Executor ioExecutor)
-
-
Method Detail
-
initialize
protected void initialize() throws ResourceManagerException
Description copied from class:ResourceManager
Initializes the framework specific components.- Specified by:
initialize
in classResourceManager<ResourceID>
- Throws:
ResourceManagerException
- which occurs during initialization and causes the resource manager to fail.
-
terminate
protected void terminate()
Description copied from class:ResourceManager
Terminates the framework specific components.- Specified by:
terminate
in classResourceManager<ResourceID>
-
internalDeregisterApplication
protected void internalDeregisterApplication(ApplicationStatus finalStatus, @Nullable String diagnostics)
Description copied from class:ResourceManager
The framework specific code to deregister the application. This should report the application's final status and shut down the resource manager cleanly.This method also needs to make sure all pending containers that are not registered yet are returned.
- Specified by:
internalDeregisterApplication
in classResourceManager<ResourceID>
- Parameters:
finalStatus
- The application status to report.diagnostics
- A diagnostics message ornull
.
-
getWorkerNodeIfAcceptRegistration
protected Optional<ResourceID> getWorkerNodeIfAcceptRegistration(ResourceID resourceID)
Description copied from class:ResourceManager
Get worker node if the worker resource is accepted.- Specified by:
getWorkerNodeIfAcceptRegistration
in classResourceManager<ResourceID>
- Parameters:
resourceID
- The worker resource id
-
getReadyToServeFuture
public CompletableFuture<Void> getReadyToServeFuture()
Description copied from class:ResourceManager
Get the ready to serve future of the resource manager.- Specified by:
getReadyToServeFuture
in classResourceManager<ResourceID>
- Returns:
- The ready to serve future of the resource manager, which indicated whether it is ready to serve.
-
getResourceAllocator
protected ResourceAllocator getResourceAllocator()
- Specified by:
getResourceAllocator
in classResourceManager<ResourceID>
-
-