public class StandaloneResourceManager extends FlinkResourceManager<ResourceID>
config, EXIT_CODE_FATAL_ERROR, RESOURCE_MANAGER_NAME
LOG
Constructor and Description |
---|
StandaloneResourceManager(Configuration flinkConfig,
LeaderRetrievalService leaderRetriever) |
Modifier and Type | Method and Description |
---|---|
protected void |
fatalError(String message,
Throwable error)
Notifies the resource master of a fatal error.
|
protected int |
getNumWorkerRequestsPending()
Gets the number of requested workers that have not yet been granted.
|
protected int |
getNumWorkersPendingRegistration()
Gets the number of containers that have been started, but where the TaskManager
has not yet registered at the job manager.
|
protected void |
handleMessage(Object message)
This method receives the actor messages after they have been filtered for
a match with the leader session.
|
protected void |
initialize()
Initializes the framework specific components.
|
protected Collection<ResourceID> |
reacceptRegisteredWorkers(Collection<ResourceID> toConsolidate)
This method is called when the resource manager starts after a failure and reconnects to
the leader JobManager, who still has some workers registered.
|
protected void |
releasePendingWorker(ResourceID resourceID)
Trigger a release of a pending worker.
|
protected void |
releaseStartedWorker(ResourceID resourceID)
Trigger a release of a started worker.
|
protected void |
requestNewWorkers(int numWorkers)
Requests to allocate a certain number of new workers.
|
protected void |
shutdownApplication(ApplicationStatus finalStatus,
String optionalDiagnostics)
The framework specific code for shutting down the application.
|
protected void |
triggerConnectingToJobManager(String leaderAddress)
Causes the resource manager to announce itself at the new leader JobManager and
obtains its connection information and currently known TaskManagers.
|
protected ResourceID |
workerStarted(ResourceID resourceID)
Callback when a worker was started.
|
allStartedWorkers, getDesignatedWorkerPoolSize, getLeaderSessionID, getNumberOfStartedTaskManagers, getResourceManagerProps, getStartedTaskManagers, isStarted, notifyWorkerFailed, postStop, preStart, sendInfoMessage, startResourceManagerActors, startResourceManagerActors, triggerCheckWorkers
decorateMessage, onReceive
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, getContext, getSelf, getSender, postRestart, preRestart, receive, self, sender, supervisorStrategy, unhandled
public StandaloneResourceManager(Configuration flinkConfig, LeaderRetrievalService leaderRetriever)
protected void triggerConnectingToJobManager(String leaderAddress)
FlinkResourceManager
triggerConnectingToJobManager
in class FlinkResourceManager<ResourceID>
leaderAddress
- The akka actor URL of the new leader JobManager.protected void initialize() throws Exception
FlinkResourceManager
initialize
in class FlinkResourceManager<ResourceID>
Exception
- Exceptions during initialization cause the resource manager to fail.
If the framework is able to recover this resource manager, it will be
restarted.protected void shutdownApplication(ApplicationStatus finalStatus, String optionalDiagnostics)
FlinkResourceManager
shutdownApplication
in class FlinkResourceManager<ResourceID>
finalStatus
- The application status to report.optionalDiagnostics
- An optional diagnostics message.protected void fatalError(String message, Throwable error)
FlinkResourceManager
IMPORTANT: This should not cleanly shut down this master, but exit it in such a way that a high-availability setting would restart this or fail over to another master.
fatalError
in class FlinkResourceManager<ResourceID>
protected Collection<ResourceID> reacceptRegisteredWorkers(Collection<ResourceID> toConsolidate)
FlinkResourceManager
FlinkResourceManager.notifyWorkerFailed(ResourceID, String)
.reacceptRegisteredWorkers
in class FlinkResourceManager<ResourceID>
toConsolidate
- The list of TaskManagers that the JobManager knows.protected void requestNewWorkers(int numWorkers)
FlinkResourceManager
requestNewWorkers
in class FlinkResourceManager<ResourceID>
numWorkers
- The number of workers to allocate.protected ResourceID workerStarted(ResourceID resourceID)
FlinkResourceManager
workerStarted
in class FlinkResourceManager<ResourceID>
resourceID
- The worker resource idprotected void releaseStartedWorker(ResourceID resourceID)
FlinkResourceManager
releaseStartedWorker
in class FlinkResourceManager<ResourceID>
resourceID
- The worker resource idprotected void releasePendingWorker(ResourceID resourceID)
FlinkResourceManager
releasePendingWorker
in class FlinkResourceManager<ResourceID>
resourceID
- The worker resource idprotected int getNumWorkerRequestsPending()
FlinkResourceManager
getNumWorkerRequestsPending
in class FlinkResourceManager<ResourceID>
protected int getNumWorkersPendingRegistration()
FlinkResourceManager
getNumWorkersPendingRegistration
in class FlinkResourceManager<ResourceID>
protected void handleMessage(Object message)
FlinkResourceManager
handleMessage
in class FlinkResourceManager<ResourceID>
message
- The incoming actor message.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.