public class YarnResourceManager extends org.apache.flink.runtime.resourcemanager.ActiveResourceManager<YarnWorkerNode> implements org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler, org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandler
defaultMemoryMB, env, flinkClientConfig, flinkConfig, numSlotsPerTaskManager, resourceProfilesPerWorker, taskExecutorProcessSpec| 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.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.ResourceManagerMetricGroup resourceManagerMetricGroup) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.yarn.client.api.async.NMClientAsync |
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) |
protected double |
getCpuCores(org.apache.flink.configuration.Configuration configuration) |
float |
getProgress() |
protected void |
initialize() |
protected void |
internalDeregisterApplication(org.apache.flink.runtime.clusterframework.ApplicationStatus finalStatus,
String diagnostics) |
protected org.apache.flink.configuration.Configuration |
loadClientConfiguration() |
void |
onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers) |
void |
onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses) |
void |
onContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Map<String,ByteBuffer> map) |
void |
onContainerStatusReceived(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) |
void |
onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
void |
onError(Throwable error) |
void |
onGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable throwable) |
void |
onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> list) |
void |
onShutdownRequest() |
void |
onStartContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t) |
CompletableFuture<Void> |
onStop() |
void |
onStopContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable throwable) |
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) |
getStopTerminationFutureOrCompletedExceptionallycancelSlotRequest, clearStateAsync, closeJobManagerConnection, closeTaskManagerConnection, deregisterApplication, disconnectJobManager, disconnectTaskManager, getNumberOfRegisteredTaskManagers, getNumberRequiredTaskManagerSlots, grantLeadership, handleError, heartbeatFromJobManager, heartbeatFromTaskManager, jobLeaderLostLeadership, notifySlotAvailable, onFatalError, onStart, prepareLeadershipAsync, registerJobManager, registerTaskExecutor, releaseResource, removeJob, requestResourceOverview, requestSlot, requestTaskManagerFileUpload, requestTaskManagerInfo, requestTaskManagerInfo, requestTaskManagerMetricQueryServiceAddresses, revokeLeadership, sendSlotReport, setFailUnfulfillableRequest, startServicesOnLeadershipcallAsyncWithoutFencing, getFencingToken, getMainThreadExecutor, getUnfencedMainThreadExecutor, runAsyncWithoutFencing, setFencingTokencallAsync, closeAsync, getAddress, getEndpointId, getHostname, getRpcService, getSelfGateway, getTerminationFuture, internalCallOnStart, internalCallOnStop, isRunning, runAsync, scheduleRunAsync, scheduleRunAsync, start, stop, validateRunsInMainThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic 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.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.ResourceManagerMetricGroup resourceManagerMetricGroup)
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.async.NMClientAsync createAndStartNodeManagerClient(org.apache.hadoop.yarn.conf.YarnConfiguration yarnConfiguration)
protected org.apache.flink.configuration.Configuration loadClientConfiguration()
loadClientConfiguration in class org.apache.flink.runtime.resourcemanager.ActiveResourceManager<YarnWorkerNode>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> onStop()
onStop 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.CallbackHandlerpublic void onContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Map<String,ByteBuffer> map)
onContainerStarted in interface org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandlerpublic void onContainerStatusReceived(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
onContainerStatusReceived in interface org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandlerpublic void onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
onContainerStopped in interface org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandlerpublic void onStartContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
onStartContainerError in interface org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandlerpublic void onGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable throwable)
onGetContainerStatusError in interface org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandlerpublic void onStopContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable throwable)
onStopContainerError in interface org.apache.hadoop.yarn.client.api.async.NMClientAsync.CallbackHandlerprotected double getCpuCores(org.apache.flink.configuration.Configuration configuration)
getCpuCores in class org.apache.flink.runtime.resourcemanager.ActiveResourceManager<YarnWorkerNode>Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.