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 Configuration |
flinkClientConfig
Flink configuration uploaded by client.
|
protected Configuration |
flinkConfig
The updated Flink configuration.
|
RESOURCE_MANAGER_NAME
log, rpcServer
Constructor and Description |
---|
ActiveResourceManager(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) |
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
close
protected final Configuration flinkConfig
ResourceManager
. For example, TaskManagerOptions.MANAGED_MEMORY_SIZE
.protected final Configuration flinkClientConfig
public ActiveResourceManager(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 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–2021 The Apache Software Foundation. All rights reserved.