public class StandaloneResourceManager extends FlinkResourceManager<ResourceID>
config, EXIT_CODE_FATAL_ERROR, RESOURCE_MANAGER_NAMELOG| Constructor and Description |
|---|
StandaloneResourceManager(org.apache.flink.configuration.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, getStartedTaskManagers, isStarted, notifyWorkerFailed, postStop, preStart, sendInfoMessage, startResourceManagerActors, startResourceManagerActors, triggerCheckWorkersdecorateMessage, onReceiveakka$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, unhandledpublic StandaloneResourceManager(org.apache.flink.configuration.Configuration flinkConfig,
LeaderRetrievalService leaderRetriever)
protected void triggerConnectingToJobManager(String leaderAddress)
FlinkResourceManagertriggerConnectingToJobManager in class FlinkResourceManager<ResourceID>leaderAddress - The akka actor URL of the new leader JobManager.protected void initialize()
throws Exception
FlinkResourceManagerinitialize 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)
FlinkResourceManagershutdownApplication in class FlinkResourceManager<ResourceID>finalStatus - The application status to report.optionalDiagnostics - An optional diagnostics message.protected void fatalError(String message, Throwable error)
FlinkResourceManagerIMPORTANT: 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)
FlinkResourceManagerFlinkResourceManager.notifyWorkerFailed(ResourceID, String).reacceptRegisteredWorkers in class FlinkResourceManager<ResourceID>toConsolidate - The list of TaskManagers that the JobManager knows.protected void requestNewWorkers(int numWorkers)
FlinkResourceManagerrequestNewWorkers in class FlinkResourceManager<ResourceID>numWorkers - The number of workers to allocate.protected ResourceID workerStarted(ResourceID resourceID)
FlinkResourceManagerworkerStarted in class FlinkResourceManager<ResourceID>resourceID - The worker resource idprotected void releaseStartedWorker(ResourceID resourceID)
FlinkResourceManagerreleaseStartedWorker in class FlinkResourceManager<ResourceID>resourceID - The worker resource idprotected void releasePendingWorker(ResourceID resourceID)
FlinkResourceManagerreleasePendingWorker in class FlinkResourceManager<ResourceID>resourceID - The worker resource idprotected int getNumWorkerRequestsPending()
FlinkResourceManagergetNumWorkerRequestsPending in class FlinkResourceManager<ResourceID>protected int getNumWorkersPendingRegistration()
FlinkResourceManagergetNumWorkersPendingRegistration in class FlinkResourceManager<ResourceID>protected void handleMessage(Object message)
FlinkResourceManagerhandleMessage in class FlinkResourceManager<ResourceID>message - The incoming actor message.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.