public class StandaloneResourceManager extends ResourceManager<ResourceID>
This ResourceManager doesn't acquire new resources.
RpcEndpoint.MainThreadExecutor
ioExecutor, RESOURCE_MANAGER_NAME, resourceManagerMetricGroup
log, rpcServer
Constructor and Description |
---|
StandaloneResourceManager(RpcService rpcService,
ResourceID resourceId,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
SlotManager slotManager,
ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory,
JobLeaderIdService jobLeaderIdService,
ClusterInformation clusterInformation,
FatalErrorHandler fatalErrorHandler,
ResourceManagerMetricGroup resourceManagerMetricGroup,
Time startupPeriodTime,
Time rpcTimeout,
Executor ioExecutor) |
Modifier and Type | Method and Description |
---|---|
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 |
onLeadership() |
boolean |
startNewWorker(WorkerResourceSpec workerResourceSpec)
Allocates a resource using the worker resource specification.
|
boolean |
stopWorker(ResourceID resourceID)
Stops the given worker.
|
protected void |
terminate()
Terminates the framework specific components.
|
protected ResourceID |
workerStarted(ResourceID resourceID)
Callback when a worker was started.
|
cancelSlotRequest, clearStateAsync, closeJobManagerConnection, closeTaskManagerConnection, declareRequiredResources, deregisterApplication, disconnectJobManager, disconnectTaskManager, getNumberOfRegisteredTaskManagers, getNumberRequiredTaskManagers, getRequiredResources, grantLeadership, handleError, hasLeadership, heartbeatFromJobManager, heartbeatFromTaskManager, jobLeaderLostLeadership, listDataSets, notifySlotAvailable, onFatalError, onStart, onStop, onWorkerRegistered, prepareLeadershipAsync, registerJobManager, registerMetrics, registerTaskExecutor, releaseClusterPartitions, releaseResource, removeJob, requestResourceOverview, requestSlot, requestTaskExecutorThreadInfoGateway, requestTaskManagerDetailsInfo, requestTaskManagerFileUploadByName, requestTaskManagerFileUploadByType, requestTaskManagerInfo, requestTaskManagerLogList, requestTaskManagerMetricQueryServiceAddresses, requestThreadDump, revokeLeadership, sendSlotReport, setFailUnfulfillableRequest
callAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencing, setFencingToken
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFencingToken
getAddress, getHostname
getDescription
close
public StandaloneResourceManager(RpcService rpcService, ResourceID resourceId, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, SlotManager slotManager, ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, ResourceManagerMetricGroup resourceManagerMetricGroup, Time startupPeriodTime, Time rpcTimeout, Executor ioExecutor)
protected void initialize() throws ResourceManagerException
ResourceManager
initialize
in class ResourceManager<ResourceID>
ResourceManagerException
- which occurs during initialization and causes the resource
manager to fail.protected void terminate()
ResourceManager
terminate
in class ResourceManager<ResourceID>
protected void internalDeregisterApplication(ApplicationStatus finalStatus, @Nullable String diagnostics)
ResourceManager
This method also needs to make sure all pending containers that are not registered yet are returned.
internalDeregisterApplication
in class ResourceManager<ResourceID>
finalStatus
- The application status to report.diagnostics
- A diagnostics message or null
.public boolean startNewWorker(WorkerResourceSpec workerResourceSpec)
ResourceManager
startNewWorker
in class ResourceManager<ResourceID>
workerResourceSpec
- workerResourceSpec specifies the size of the to be allocated
resourcepublic boolean stopWorker(ResourceID resourceID)
ResourceManager
stopWorker
in class ResourceManager<ResourceID>
resourceID
- The worker.protected ResourceID workerStarted(ResourceID resourceID)
ResourceManager
workerStarted
in class ResourceManager<ResourceID>
resourceID
- The worker resource idprotected void onLeadership()
onLeadership
in class ResourceManager<ResourceID>
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.