public class StandaloneResourceManager extends ResourceManager<ResourceID>
RpcEndpoint.MainThreadExecutor
RESOURCE_MANAGER_NAME
log, rpcServer
Constructor and Description |
---|
StandaloneResourceManager(RpcService rpcService,
String resourceManagerEndpointId,
ResourceID resourceId,
ResourceManagerConfiguration resourceManagerConfiguration,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
SlotManager slotManager,
MetricRegistry metricRegistry,
JobLeaderIdService jobLeaderIdService,
FatalErrorHandler fatalErrorHandler) |
Modifier and Type | Method and Description |
---|---|
protected void |
initialize()
Initializes the framework specific components.
|
protected void |
shutDownApplication(ApplicationStatus finalStatus,
String optionalDiagnostics)
The framework specific code for shutting down the application.
|
void |
startNewWorker(ResourceProfile resourceProfile)
Allocates a resource using the resource profile.
|
boolean |
stopWorker(ResourceID resourceID)
Stops the given worker.
|
protected ResourceID |
workerStarted(ResourceID resourceID)
Callback when a worker was started.
|
closeJobManagerConnection, closeTaskManagerConnection, disconnectJobManager, disconnectTaskManager, getNumberOfRegisteredTaskManagers, grantLeadership, handleError, heartbeatFromJobManager, heartbeatFromTaskManager, jobLeaderLostLeadership, notifySlotAvailable, onFatalError, postStop, registerInfoMessageListener, registerJobManager, registerTaskExecutor, releaseResource, removeJob, requestResourceOverview, requestSlot, requestTaskManagerMetricQueryServicePaths, revokeLeadership, sendInfoMessage, shutDownCluster, start, unRegisterInfoMessageListener
callAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, runAsyncWithoutFencing, setFencingToken
callAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, runAsync, scheduleRunAsync, scheduleRunAsync, shutDown, stop, validateRunsInMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFencingToken
getAddress, getHostname
getAddress
public StandaloneResourceManager(RpcService rpcService, String resourceManagerEndpointId, ResourceID resourceId, ResourceManagerConfiguration resourceManagerConfiguration, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, SlotManager slotManager, MetricRegistry metricRegistry, JobLeaderIdService jobLeaderIdService, FatalErrorHandler fatalErrorHandler)
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 shutDownApplication(ApplicationStatus finalStatus, String optionalDiagnostics)
ResourceManager
This method also needs to make sure all pending containers that are not registered yet are returned.
shutDownApplication
in class ResourceManager<ResourceID>
finalStatus
- The application status to report.optionalDiagnostics
- An optional diagnostics message.public void startNewWorker(ResourceProfile resourceProfile)
ResourceManager
startNewWorker
in class ResourceManager<ResourceID>
resourceProfile
- The resource descriptionpublic boolean stopWorker(ResourceID resourceID)
ResourceManager
stopWorker
in class ResourceManager<ResourceID>
resourceID
- identifying the worker to be stoppedprotected ResourceID workerStarted(ResourceID resourceID)
ResourceManager
workerStarted
in class ResourceManager<ResourceID>
resourceID
- The worker resource idCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.