public abstract class ActiveResourceManager<WorkerType extends ResourceIDRetrievable> extends ResourceManager<WorkerType>
ResourceManager
implementations which contains some common variables and methods.Modifier and Type | Class and Description |
---|---|
protected static class |
ActiveResourceManager.PendingWorkerNums
Number of workers pending for allocation/registration.
|
RpcEndpoint.MainThreadExecutor
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
env
The process environment variables.
|
protected org.apache.flink.configuration.Configuration |
flinkClientConfig
Flink configuration uploaded by client.
|
protected org.apache.flink.configuration.Configuration |
flinkConfig
The updated Flink configuration.
|
RESOURCE_MANAGER_NAME
log, rpcServer
Constructor and Description |
---|
ActiveResourceManager(org.apache.flink.configuration.Configuration flinkConfig,
Map<String,String> env,
RpcService rpcService,
ResourceID resourceId,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
SlotManager slotManager,
ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory,
JobLeaderIdService jobLeaderIdService,
ClusterInformation clusterInformation,
FatalErrorHandler fatalErrorHandler,
ResourceManagerMetricGroup resourceManagerMetricGroup) |
Modifier and Type | Method and Description |
---|---|
protected int |
getNumRequestedNotAllocatedWorkers() |
protected int |
getNumRequestedNotAllocatedWorkersFor(WorkerResourceSpec workerResourceSpec) |
protected int |
getNumRequestedNotRegisteredWorkers() |
protected int |
getNumRequestedNotRegisteredWorkersFor(WorkerResourceSpec workerResourceSpec) |
protected CompletableFuture<Void> |
getStopTerminationFutureOrCompletedExceptionally(Throwable exception) |
protected abstract org.apache.flink.configuration.Configuration |
loadClientConfiguration() |
protected void |
notifyAllocatedWorkerStopped(ResourceID resourceID)
Notify that a worker with the given resource spec has been stopped.
|
protected ActiveResourceManager.PendingWorkerNums |
notifyNewWorkerAllocated(WorkerResourceSpec workerResourceSpec,
ResourceID resourceID)
Notify that a worker with the given resource spec has been allocated.
|
protected ActiveResourceManager.PendingWorkerNums |
notifyNewWorkerAllocationFailed(WorkerResourceSpec workerResourceSpec)
Notify that allocation of a worker with the given resource spec has failed.
|
protected ActiveResourceManager.PendingWorkerNums |
notifyNewWorkerRequested(WorkerResourceSpec workerResourceSpec)
Notify that a worker with the given resource spec has been requested.
|
protected void |
onTaskManagerRegistration(WorkerRegistration<WorkerType> workerTypeWorkerRegistration) |
cancelSlotRequest, clearStateAsync, closeJobManagerConnection, closeTaskManagerConnection, deregisterApplication, disconnectJobManager, disconnectTaskManager, getNumberOfRegisteredTaskManagers, getNumberRequiredTaskManagers, getRequiredResources, grantLeadership, handleError, heartbeatFromJobManager, heartbeatFromTaskManager, initialize, internalDeregisterApplication, jobLeaderLostLeadership, listDataSets, notifySlotAvailable, onFatalError, onStart, onStop, prepareLeadershipAsync, registerJobManager, registerTaskExecutor, releaseClusterPartitions, releaseResource, removeJob, requestResourceOverview, requestSlot, requestTaskManagerFileUploadByName, requestTaskManagerFileUploadByType, requestTaskManagerInfo, requestTaskManagerInfo, requestTaskManagerLogList, requestTaskManagerMetricQueryServiceAddresses, requestThreadDump, revokeLeadership, sendSlotReport, setFailUnfulfillableRequest, startNewWorker, startServicesOnLeadership, stopWorker, workerStarted
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
protected final org.apache.flink.configuration.Configuration flinkConfig
ResourceManager
. For example, TaskManagerOptions.MANAGED_MEMORY_SIZE
.protected final org.apache.flink.configuration.Configuration flinkClientConfig
public ActiveResourceManager(org.apache.flink.configuration.Configuration flinkConfig, Map<String,String> env, RpcService rpcService, ResourceID resourceId, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, SlotManager slotManager, ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, ResourceManagerMetricGroup resourceManagerMetricGroup)
protected CompletableFuture<Void> getStopTerminationFutureOrCompletedExceptionally(@Nullable Throwable exception)
protected abstract org.apache.flink.configuration.Configuration loadClientConfiguration()
protected void onTaskManagerRegistration(WorkerRegistration<WorkerType> workerTypeWorkerRegistration)
onTaskManagerRegistration
in class ResourceManager<WorkerType extends ResourceIDRetrievable>
protected int getNumRequestedNotAllocatedWorkers()
protected int getNumRequestedNotAllocatedWorkersFor(WorkerResourceSpec workerResourceSpec)
protected int getNumRequestedNotRegisteredWorkers()
protected int getNumRequestedNotRegisteredWorkersFor(WorkerResourceSpec workerResourceSpec)
protected ActiveResourceManager.PendingWorkerNums notifyNewWorkerRequested(WorkerResourceSpec workerResourceSpec)
workerResourceSpec
- resource spec of the requested workerprotected ActiveResourceManager.PendingWorkerNums notifyNewWorkerAllocated(WorkerResourceSpec workerResourceSpec, ResourceID resourceID)
workerResourceSpec
- resource spec of the requested workerresourceID
- id of the allocated resourceprotected ActiveResourceManager.PendingWorkerNums notifyNewWorkerAllocationFailed(WorkerResourceSpec workerResourceSpec)
workerResourceSpec
- resource spec of the requested workerprotected void notifyAllocatedWorkerStopped(ResourceID resourceID)
resourceID
- id of the stopped worker resourceCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.