org.apache.flink.yarn.YarnResourceManager Java Examples

The following examples show how to use org.apache.flink.yarn.YarnResourceManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: YarnResourceManagerFactory.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public ResourceManager<YarnWorkerNode> createActiveResourceManager(
		Configuration configuration,
		ResourceID resourceId,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		MetricRegistry metricRegistry,
		FatalErrorHandler fatalErrorHandler,
		ClusterInformation clusterInformation,
		@Nullable String webInterfaceUrl,
		JobManagerMetricGroup jobManagerMetricGroup) throws Exception {
	final ResourceManagerRuntimeServicesConfiguration rmServicesConfiguration = ResourceManagerRuntimeServicesConfiguration.fromConfiguration(configuration);
	final ResourceManagerRuntimeServices rmRuntimeServices = ResourceManagerRuntimeServices.fromConfiguration(
		rmServicesConfiguration,
		highAvailabilityServices,
		rpcService.getScheduledExecutor());

	return new YarnResourceManager(
		rpcService,
		getEndpointId(),
		resourceId,
		configuration,
		System.getenv(),
		highAvailabilityServices,
		heartbeatServices,
		rmRuntimeServices.getSlotManager(),
		metricRegistry,
		rmRuntimeServices.getJobLeaderIdService(),
		clusterInformation,
		fatalErrorHandler,
		webInterfaceUrl,
		jobManagerMetricGroup);
}
 
Example #2
Source File: YarnResourceManagerFactory.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public ResourceManager<YarnWorkerNode> createResourceManager(
		Configuration configuration,
		ResourceID resourceId,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		FatalErrorHandler fatalErrorHandler,
		ClusterInformation clusterInformation,
		@Nullable String webInterfaceUrl,
		ResourceManagerMetricGroup resourceManagerMetricGroup,
		ResourceManagerRuntimeServices resourceManagerRuntimeServices) {

	return new YarnResourceManager(
		rpcService,
		resourceId,
		configuration,
		System.getenv(),
		highAvailabilityServices,
		heartbeatServices,
		resourceManagerRuntimeServices.getSlotManager(),
		ResourceManagerPartitionTrackerImpl::new,
		resourceManagerRuntimeServices.getJobLeaderIdService(),
		clusterInformation,
		fatalErrorHandler,
		webInterfaceUrl,
		resourceManagerMetricGroup);
}