public class YarnResourceManager extends org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode> implements org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler
| Constructor and Description |
|---|
YarnResourceManager(org.apache.flink.runtime.rpc.RpcService rpcService,
String resourceManagerEndpointId,
org.apache.flink.runtime.clusterframework.types.ResourceID resourceId,
org.apache.flink.configuration.Configuration flinkConfig,
Map<String,String> env,
org.apache.flink.runtime.highavailability.HighAvailabilityServices highAvailabilityServices,
org.apache.flink.runtime.heartbeat.HeartbeatServices heartbeatServices,
org.apache.flink.runtime.resourcemanager.slotmanager.SlotManager slotManager,
org.apache.flink.runtime.metrics.MetricRegistry metricRegistry,
org.apache.flink.runtime.resourcemanager.JobLeaderIdService jobLeaderIdService,
org.apache.flink.runtime.entrypoint.ClusterInformation clusterInformation,
org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler,
String webInterfaceUrl,
org.apache.flink.runtime.metrics.groups.JobManagerMetricGroup jobManagerMetricGroup) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.yarn.client.api.NMClient |
createAndStartNodeManagerClient(org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration) |
protected org.apache.hadoop.yarn.client.api.async.AMRMClientAsync<org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest> |
createAndStartResourceManagerClient(org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration,
int yarnHeartbeatIntervalMillis,
String webInterfaceUrl) |
float |
getProgress() |
protected void |
initialize() |
protected void |
internalDeregisterApplication(org.apache.flink.runtime.clusterframework.ApplicationStatus finalStatus,
String diagnostics) |
void |
onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers) |
void |
onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses) |
void |
onError(Throwable error) |
void |
onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> list) |
void |
onShutdownRequest() |
CompletableFuture<Void> |
postStop() |
Collection<org.apache.flink.runtime.clusterframework.types.ResourceProfile> |
startNewWorker(org.apache.flink.runtime.clusterframework.types.ResourceProfile resourceProfile) |
boolean |
stopWorker(YarnWorkerNode workerNode) |
protected YarnWorkerNode |
workerStarted(org.apache.flink.runtime.clusterframework.types.ResourceID resourceID) |
cancelSlotRequest, clearStateAsync, closeJobManagerConnection, closeTaskManagerConnection, createSlotsPerWorker, deregisterApplication, disconnectJobManager, disconnectTaskManager, getNumberOfRegisteredTaskManagers, getNumberRequiredTaskManagerSlots, grantLeadership, handleError, heartbeatFromJobManager, heartbeatFromTaskManager, jobLeaderLostLeadership, notifySlotAvailable, onFatalError, prepareLeadershipAsync, registerInfoMessageListener, registerJobManager, registerTaskExecutor, releaseResource, removeJob, requestResourceOverview, requestSlot, requestTaskManagerFileUpload, requestTaskManagerInfo, requestTaskManagerInfo, requestTaskManagerMetricQueryServicePaths, revokeLeadership, sendInfoMessage, sendSlotReport, start, unRegisterInfoMessageListenercallAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencing, setFencingTokencallAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, runAsync, scheduleRunAsync, scheduleRunAsync, shutDown, stop, validateRunsInMainThreadpublic YarnResourceManager(org.apache.flink.runtime.rpc.RpcService rpcService,
String resourceManagerEndpointId,
org.apache.flink.runtime.clusterframework.types.ResourceID resourceId,
org.apache.flink.configuration.Configuration flinkConfig,
Map<String,String> env,
org.apache.flink.runtime.highavailability.HighAvailabilityServices highAvailabilityServices,
org.apache.flink.runtime.heartbeat.HeartbeatServices heartbeatServices,
org.apache.flink.runtime.resourcemanager.slotmanager.SlotManager slotManager,
org.apache.flink.runtime.metrics.MetricRegistry metricRegistry,
org.apache.flink.runtime.resourcemanager.JobLeaderIdService jobLeaderIdService,
org.apache.flink.runtime.entrypoint.ClusterInformation clusterInformation,
org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler,
@Nullable
String webInterfaceUrl,
org.apache.flink.runtime.metrics.groups.JobManagerMetricGroup jobManagerMetricGroup)
protected org.apache.hadoop.yarn.client.api.async.AMRMClientAsync<org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest> createAndStartResourceManagerClient(org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration,
int yarnHeartbeatIntervalMillis,
@Nullable
String webInterfaceUrl)
throws Exception
Exceptionprotected org.apache.hadoop.yarn.client.api.NMClient createAndStartNodeManagerClient(org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration)
protected void initialize()
throws org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException
initialize in class org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode>org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerExceptionpublic CompletableFuture<Void> postStop()
postStop in class org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode>protected void internalDeregisterApplication(org.apache.flink.runtime.clusterframework.ApplicationStatus finalStatus,
@Nullable
String diagnostics)
internalDeregisterApplication in class org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode>public Collection<org.apache.flink.runtime.clusterframework.types.ResourceProfile> startNewWorker(org.apache.flink.runtime.clusterframework.types.ResourceProfile resourceProfile)
startNewWorker in class org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode>public boolean stopWorker(YarnWorkerNode workerNode)
stopWorker in class org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode>protected YarnWorkerNode workerStarted(org.apache.flink.runtime.clusterframework.types.ResourceID resourceID)
workerStarted in class org.apache.flink.runtime.resourcemanager.ResourceManager<YarnWorkerNode>public float getProgress()
getProgress in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
onContainersCompleted in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers)
onContainersAllocated in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onShutdownRequest()
onShutdownRequest in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> list)
onNodesUpdated in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onError(Throwable error)
onError in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.