public class StandaloneResourceManager extends ResourceManager<ResourceID>
This ResourceManager doesn't acquire new resources.
RpcEndpoint.MainThreadExecutor
RESOURCE_MANAGER_NAME
log, rpcServer
Constructor and Description |
---|
StandaloneResourceManager(RpcService rpcService,
String resourceManagerEndpointId,
ResourceID resourceId,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
SlotManager slotManager,
MetricRegistry metricRegistry,
JobLeaderIdService jobLeaderIdService,
ClusterInformation clusterInformation,
FatalErrorHandler fatalErrorHandler,
JobManagerMetricGroup jobManagerMetricGroup) |
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.
|
Collection<ResourceProfile> |
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.
|
cancelSlotRequest, clearStateAsync, closeJobManagerConnection, closeTaskManagerConnection, createSlotsPerWorker, deregisterApplication, disconnectJobManager, disconnectTaskManager, getNumberOfRegisteredTaskManagers, getNumberRequiredTaskManagerSlots, grantLeadership, handleError, heartbeatFromJobManager, heartbeatFromTaskManager, jobLeaderLostLeadership, notifySlotAvailable, onFatalError, onStart, onStop, prepareLeadershipAsync, registerInfoMessageListener, registerJobManager, registerTaskExecutor, releaseResource, removeJob, requestResourceOverview, requestSlot, requestTaskManagerFileUpload, requestTaskManagerInfo, requestTaskManagerInfo, requestTaskManagerMetricQueryServicePaths, revokeLeadership, sendInfoMessage, sendSlotReport, unRegisterInfoMessageListener
callAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencing, setFencingToken
callAsync, closeAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFencingToken
getAddress, getHostname
getAddress
close
public StandaloneResourceManager(RpcService rpcService, String resourceManagerEndpointId, ResourceID resourceId, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, SlotManager slotManager, MetricRegistry metricRegistry, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, JobManagerMetricGroup jobManagerMetricGroup)
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 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 Collection<ResourceProfile> startNewWorker(ResourceProfile resourceProfile)
ResourceManager
startNewWorker
in class ResourceManager<ResourceID>
resourceProfile
- The resource descriptionResourceProfile
describing the launched slotspublic 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 idCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.