Java Code Examples for org.apache.flink.runtime.rpc.FatalErrorHandler

The following examples show how to use org.apache.flink.runtime.rpc.FatalErrorHandler. These examples are extracted from open source projects. 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 Project: Flink-CEPplus   Source File: MiniCluster.java    License: Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
protected Collection<? extends DispatcherResourceManagerComponent<?>> createDispatcherResourceManagerComponents(
		Configuration configuration,
		RpcServiceFactory rpcServiceFactory,
		HighAvailabilityServices haServices,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		MetricRegistry metricRegistry,
		MetricQueryServiceRetriever metricQueryServiceRetriever,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	SessionDispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory();
	return Collections.singleton(
		dispatcherResourceManagerComponentFactory.create(
			configuration,
			rpcServiceFactory.createRpcService(),
			haServices,
			blobServer,
			heartbeatServices,
			metricRegistry,
			new MemoryArchivedExecutionGraphStore(),
			metricQueryServiceRetriever,
			fatalErrorHandler));
}
 
Example 2
Source Project: flink   Source File: DispatcherTest.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public JobManagerRunner createJobManagerRunner(
		JobGraph jobGraph,
		Configuration configuration,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		JobManagerSharedServices jobManagerSharedServices,
		JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	assertEquals(expectedJobId, jobGraph.getJobID());

	createdJobManagerRunnerLatch.countDown();

	return DefaultJobManagerRunnerFactory.INSTANCE.createJobManagerRunner(
		jobGraph,
		configuration,
		rpcService,
		highAvailabilityServices,
		heartbeatServices,
		jobManagerSharedServices,
		jobManagerJobMetricGroupFactory,
		fatalErrorHandler);
}
 
Example 3
Source Project: Flink-CEPplus   Source File: DispatcherRestEndpoint.java    License: Apache License 2.0 6 votes vote down vote up
public DispatcherRestEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<DispatcherGateway> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		FatalErrorHandler fatalErrorHandler) throws IOException {

	super(
		endpointConfiguration,
		leaderRetriever,
		clusterConfiguration,
		restConfiguration,
		resourceManagerRetriever,
		transientBlobService,
		executor,
		metricFetcher,
		leaderElectionService,
		fatalErrorHandler);

	webSubmissionExtension = WebMonitorExtension.empty();
}
 
Example 4
Source Project: flink   Source File: TestingResourceManager.java    License: Apache License 2.0 6 votes vote down vote up
public TestingResourceManager(
		RpcService rpcService,
		ResourceID resourceId,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		SlotManager slotManager,
		ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory,
		JobLeaderIdService jobLeaderIdService,
		FatalErrorHandler fatalErrorHandler,
		ResourceManagerMetricGroup resourceManagerMetricGroup) {
	super(
		rpcService,
		resourceId,
		highAvailabilityServices,
		heartbeatServices,
		slotManager,
		clusterPartitionTrackerFactory,
		jobLeaderIdService,
		new ClusterInformation("localhost", 1234),
		fatalErrorHandler,
		resourceManagerMetricGroup,
		RpcUtils.INF_TIMEOUT);
}
 
Example 5
Source Project: Flink-CEPplus   Source File: MiniDispatcherRestEndpoint.java    License: Apache License 2.0 6 votes vote down vote up
public MiniDispatcherRestEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<? extends RestfulGateway> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		FatalErrorHandler fatalErrorHandler) throws IOException {
	super(
		endpointConfiguration,
		leaderRetriever,
		clusterConfiguration,
		restConfiguration,
		resourceManagerRetriever,
		transientBlobService,
		executor,
		metricFetcher,
		leaderElectionService,
		fatalErrorHandler);
}
 
Example 6
@Override
public DispatcherLeaderProcessFactory createFactory(
		JobGraphStoreFactory jobGraphStoreFactory,
		Executor ioExecutor,
		RpcService rpcService,
		PartialDispatcherServices partialDispatcherServices,
		FatalErrorHandler fatalErrorHandler) {

	final JobGraph jobGraph;

	try {
		jobGraph = jobGraphRetriever.retrieveJobGraph(partialDispatcherServices.getConfiguration());
	} catch (FlinkException e) {
		throw new FlinkRuntimeException("Could not retrieve the JobGraph.", e);
	}

	final DefaultDispatcherGatewayServiceFactory defaultDispatcherServiceFactory = new DefaultDispatcherGatewayServiceFactory(
		JobDispatcherFactory.INSTANCE,
		rpcService,
		partialDispatcherServices);

	return new JobDispatcherLeaderProcessFactory(
		defaultDispatcherServiceFactory,
		jobGraph,
		fatalErrorHandler);
}
 
Example 7
@Override
public JobManagerRunner createJobManagerRunner(
		JobGraph jobGraph,
		Configuration configuration,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		JobManagerSharedServices jobManagerSharedServices,
		JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	final Supplier<Exception> exceptionSupplier = failJobMasterCreationWith.get();

	if (exceptionSupplier != null) {
		throw exceptionSupplier.get();
	} else {
		jobGraphFuture.complete(jobGraph);

		final JobManagerRunner mock = mock(JobManagerRunner.class);
		when(mock.getResultFuture()).thenReturn(resultFuture);
		when(mock.closeAsync()).thenReturn(terminationFuture);
		when(mock.getJobGraph()).thenReturn(jobGraph);

		return mock;
	}
}
 
Example 8
@Override
public DispatcherLeaderProcessFactory createFactory(
		JobGraphStoreFactory jobGraphStoreFactory,
		Executor ioExecutor,
		RpcService rpcService,
		PartialDispatcherServices partialDispatcherServices,
		FatalErrorHandler fatalErrorHandler) {
	final AbstractDispatcherLeaderProcess.DispatcherGatewayServiceFactory dispatcherGatewayServiceFactory = new DefaultDispatcherGatewayServiceFactory(
		dispatcherFactory,
		rpcService,
		partialDispatcherServices);

	return new SessionDispatcherLeaderProcessFactory(
		dispatcherGatewayServiceFactory,
		jobGraphStoreFactory,
		ioExecutor,
		fatalErrorHandler);
}
 
Example 9
Source Project: Flink-CEPplus   Source File: DispatcherTest.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public JobManagerRunner createJobManagerRunner(
		JobGraph jobGraph,
		Configuration configuration,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		JobManagerSharedServices jobManagerSharedServices,
		JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	assertEquals(expectedJobId, jobGraph.getJobID());

	createdJobManagerRunnerLatch.countDown();

	return DefaultJobManagerRunnerFactory.INSTANCE.createJobManagerRunner(
		jobGraph,
		configuration,
		rpcService,
		highAvailabilityServices,
		heartbeatServices,
		jobManagerSharedServices,
		jobManagerJobMetricGroupFactory,
		fatalErrorHandler);
}
 
Example 10
Source Project: flink   Source File: MiniCluster.java    License: Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
protected Collection<? extends DispatcherResourceManagerComponent> createDispatcherResourceManagerComponents(
		Configuration configuration,
		RpcServiceFactory rpcServiceFactory,
		HighAvailabilityServices haServices,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		MetricRegistry metricRegistry,
		MetricQueryServiceRetriever metricQueryServiceRetriever,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	DispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory();
	return Collections.singleton(
		dispatcherResourceManagerComponentFactory.create(
			configuration,
			ioExecutor,
			rpcServiceFactory.createRpcService(),
			haServices,
			blobServer,
			heartbeatServices,
			metricRegistry,
			new MemoryArchivedExecutionGraphStore(),
			metricQueryServiceRetriever,
			fatalErrorHandler));
}
 
Example 11
Source Project: Flink-CEPplus   Source File: TestingResourceManager.java    License: Apache License 2.0 6 votes vote down vote up
public TestingResourceManager(
		RpcService rpcService,
		String resourceManagerEndpointId,
		ResourceID resourceId,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		SlotManager slotManager,
		MetricRegistry metricRegistry,
		JobLeaderIdService jobLeaderIdService,
		FatalErrorHandler fatalErrorHandler,
		JobManagerMetricGroup jobManagerMetricGroup) {
	super(
		rpcService,
		resourceManagerEndpointId,
		resourceId,
		highAvailabilityServices,
		heartbeatServices,
		slotManager,
		metricRegistry,
		jobLeaderIdService,
		new ClusterInformation("localhost", 1234),
		fatalErrorHandler,
		jobManagerMetricGroup);
}
 
Example 12
Source Project: flink   Source File: MiniCluster.java    License: Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
protected Collection<? extends DispatcherResourceManagerComponent<?>> createDispatcherResourceManagerComponents(
		Configuration configuration,
		RpcServiceFactory rpcServiceFactory,
		HighAvailabilityServices haServices,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		MetricRegistry metricRegistry,
		MetricQueryServiceRetriever metricQueryServiceRetriever,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	SessionDispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory();
	return Collections.singleton(
		dispatcherResourceManagerComponentFactory.create(
			configuration,
			rpcServiceFactory.createRpcService(),
			haServices,
			blobServer,
			heartbeatServices,
			metricRegistry,
			new MemoryArchivedExecutionGraphStore(),
			metricQueryServiceRetriever,
			fatalErrorHandler));
}
 
Example 13
Source Project: flink   Source File: DispatcherRestEndpoint.java    License: Apache License 2.0 6 votes vote down vote up
public DispatcherRestEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<DispatcherGateway> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		FatalErrorHandler fatalErrorHandler) throws IOException {

	super(
		endpointConfiguration,
		leaderRetriever,
		clusterConfiguration,
		restConfiguration,
		resourceManagerRetriever,
		transientBlobService,
		executor,
		metricFetcher,
		leaderElectionService,
		fatalErrorHandler);

	webSubmissionExtension = WebMonitorExtension.empty();
}
 
Example 14
Source Project: flink   Source File: DefaultJobMasterServiceFactory.java    License: Apache License 2.0 6 votes vote down vote up
public DefaultJobMasterServiceFactory(
		JobMasterConfiguration jobMasterConfiguration,
		SlotPoolFactory slotPoolFactory,
		SchedulerFactory schedulerFactory,
		RpcService rpcService,
		HighAvailabilityServices haServices,
		JobManagerSharedServices jobManagerSharedServices,
		HeartbeatServices heartbeatServices,
		JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
		FatalErrorHandler fatalErrorHandler,
		SchedulerNGFactory schedulerNGFactory,
		ShuffleMaster<?> shuffleMaster) {
	this.jobMasterConfiguration = jobMasterConfiguration;
	this.slotPoolFactory = slotPoolFactory;
	this.schedulerFactory = schedulerFactory;
	this.rpcService = rpcService;
	this.haServices = haServices;
	this.jobManagerSharedServices = jobManagerSharedServices;
	this.heartbeatServices = heartbeatServices;
	this.jobManagerJobMetricGroupFactory = jobManagerJobMetricGroupFactory;
	this.fatalErrorHandler = fatalErrorHandler;
	this.schedulerNGFactory = schedulerNGFactory;
	this.shuffleMaster = shuffleMaster;
}
 
Example 15
Source Project: flink   Source File: ActiveResourceManagerFactory.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public ResourceManager<T> createResourceManager(
		Configuration configuration,
		ResourceID resourceId,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		FatalErrorHandler fatalErrorHandler,
		ClusterInformation clusterInformation,
		@Nullable String webInterfaceUrl,
		MetricRegistry metricRegistry,
		String hostname) throws Exception {
	return super.createResourceManager(
		createActiveResourceManagerConfiguration(configuration),
		resourceId,
		rpcService,
		highAvailabilityServices,
		heartbeatServices,
		fatalErrorHandler,
		clusterInformation,
		webInterfaceUrl,
		metricRegistry,
		hostname);
}
 
Example 16
Source Project: flink   Source File: DispatcherServices.java    License: Apache License 2.0 6 votes vote down vote up
public DispatcherServices(
		@Nonnull Configuration configuration,
		@Nonnull HighAvailabilityServices highAvailabilityServices,
		@Nonnull GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
		@Nonnull BlobServer blobServer,
		@Nonnull HeartbeatServices heartbeatServices,
		@Nonnull ArchivedExecutionGraphStore archivedExecutionGraphStore,
		@Nonnull FatalErrorHandler fatalErrorHandler,
		@Nonnull HistoryServerArchivist historyServerArchivist,
		@Nullable String metricQueryServiceAddress,
		@Nonnull JobManagerMetricGroup jobManagerMetricGroup,
		@Nonnull JobGraphWriter jobGraphWriter,
		@Nonnull JobManagerRunnerFactory jobManagerRunnerFactory) {
	this.configuration = configuration;
	this.highAvailabilityServices = highAvailabilityServices;
	this.resourceManagerGatewayRetriever = resourceManagerGatewayRetriever;
	this.blobServer = blobServer;
	this.heartbeatServices = heartbeatServices;
	this.archivedExecutionGraphStore = archivedExecutionGraphStore;
	this.fatalErrorHandler = fatalErrorHandler;
	this.historyServerArchivist = historyServerArchivist;
	this.metricQueryServiceAddress = metricQueryServiceAddress;
	this.jobManagerMetricGroup = jobManagerMetricGroup;
	this.jobGraphWriter = jobGraphWriter;
	this.jobManagerRunnerFactory = jobManagerRunnerFactory;
}
 
Example 17
Source Project: flink   Source File: TestingJobManagerRunnerFactory.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public JobManagerRunner createJobManagerRunner(
		JobGraph jobGraph,
		Configuration configuration,
		RpcService rpcService,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		JobManagerSharedServices jobManagerSharedServices,
		JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	final Supplier<Exception> exceptionSupplier = failJobMasterCreationWith.get();

	if (exceptionSupplier != null) {
		throw exceptionSupplier.get();
	} else {
		jobGraphFuture.complete(jobGraph);

		final JobManagerRunner mock = mock(JobManagerRunner.class);
		when(mock.getResultFuture()).thenReturn(resultFuture);
		when(mock.closeAsync()).thenReturn(terminationFuture);
		when(mock.getJobGraph()).thenReturn(jobGraph);

		return mock;
	}
}
 
Example 18
Source Project: flink   Source File: TestingTaskExecutor.java    License: Apache License 2.0 6 votes vote down vote up
public TestingTaskExecutor(
		RpcService rpcService,
		TaskManagerConfiguration taskManagerConfiguration,
		HighAvailabilityServices haServices,
		TaskManagerServices taskExecutorServices,
		HeartbeatServices heartbeatServices,
		TaskManagerMetricGroup taskManagerMetricGroup,
		@Nullable String metricQueryServiceAddress,
		BlobCacheService blobCacheService,
		FatalErrorHandler fatalErrorHandler,
		PartitionTable<JobID> partitionTable) {
	super(
		rpcService,
		taskManagerConfiguration,
		haServices,
		taskExecutorServices,
		heartbeatServices,
		taskManagerMetricGroup,
		metricQueryServiceAddress,
		blobCacheService,
		fatalErrorHandler,
		partitionTable);
}
 
Example 19
Source Project: flink   Source File: DefaultJobMasterServiceFactory.java    License: Apache License 2.0 6 votes vote down vote up
public DefaultJobMasterServiceFactory(
		JobMasterConfiguration jobMasterConfiguration,
		SlotPoolFactory slotPoolFactory,
		SchedulerFactory schedulerFactory,
		RpcService rpcService,
		HighAvailabilityServices haServices,
		JobManagerSharedServices jobManagerSharedServices,
		HeartbeatServices heartbeatServices,
		JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
		FatalErrorHandler fatalErrorHandler,
		SchedulerNGFactory schedulerNGFactory,
		ShuffleMaster<?> shuffleMaster) {
	this.jobMasterConfiguration = jobMasterConfiguration;
	this.slotPoolFactory = slotPoolFactory;
	this.schedulerFactory = schedulerFactory;
	this.rpcService = rpcService;
	this.haServices = haServices;
	this.jobManagerSharedServices = jobManagerSharedServices;
	this.heartbeatServices = heartbeatServices;
	this.jobManagerJobMetricGroupFactory = jobManagerJobMetricGroupFactory;
	this.fatalErrorHandler = fatalErrorHandler;
	this.schedulerNGFactory = schedulerNGFactory;
	this.shuffleMaster = shuffleMaster;
}
 
Example 20
public PartialDispatcherServicesWithJobGraphStore(
		@Nonnull Configuration configuration,
		@Nonnull HighAvailabilityServices highAvailabilityServices,
		@Nonnull GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
		@Nonnull BlobServer blobServer,
		@Nonnull HeartbeatServices heartbeatServices,
		@Nonnull JobManagerMetricGroupFactory jobManagerMetricGroupFactory,
		@Nonnull ArchivedExecutionGraphStore archivedExecutionGraphStore,
		@Nonnull FatalErrorHandler fatalErrorHandler,
		@Nonnull HistoryServerArchivist historyServerArchivist,
		@Nullable String metricQueryServiceAddress,
		@Nonnull JobGraphWriter jobGraphWriter) {
	super(
		configuration,
		highAvailabilityServices,
		resourceManagerGatewayRetriever,
		blobServer,
		heartbeatServices,
		jobManagerMetricGroupFactory,
		archivedExecutionGraphStore,
		fatalErrorHandler,
		historyServerArchivist,
		metricQueryServiceAddress);
	this.jobGraphWriter = jobGraphWriter;
}
 
Example 21
@Override
public DispatcherLeaderProcessFactory createFactory(
		JobGraphStoreFactory jobGraphStoreFactory,
		Executor ioExecutor,
		RpcService rpcService,
		PartialDispatcherServices partialDispatcherServices,
		FatalErrorHandler fatalErrorHandler) {

	final ApplicationDispatcherGatewayServiceFactory dispatcherServiceFactory = new ApplicationDispatcherGatewayServiceFactory(
			configuration,
			dispatcherFactory,
			program,
			rpcService,
			partialDispatcherServices);

	return new SessionDispatcherLeaderProcessFactory(
			dispatcherServiceFactory,
			jobGraphStoreFactory,
			ioExecutor,
			fatalErrorHandler);
}
 
Example 22
Source Project: Flink-CEPplus   Source File: MesosResourceManagerFactory.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public ResourceManager<RegisteredMesosWorkerNode> createResourceManager(
		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 MesosResourceManager(
		rpcService,
		getEndpointId(),
		resourceId,
		highAvailabilityServices,
		heartbeatServices,
		rmRuntimeServices.getSlotManager(),
		metricRegistry,
		rmRuntimeServices.getJobLeaderIdService(),
		clusterInformation,
		fatalErrorHandler,
		configuration,
		mesosServices,
		schedulerConfiguration,
		taskManagerParameters,
		taskManagerContainerSpec,
		webInterfaceUrl,
		jobManagerMetricGroup);
}
 
Example 23
Source Project: flink   Source File: TestingMiniCluster.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Collection<? extends DispatcherResourceManagerComponent> createDispatcherResourceManagerComponents(
		Configuration configuration,
		RpcServiceFactory rpcServiceFactory,
		HighAvailabilityServices haServices,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		MetricRegistry metricRegistry,
		MetricQueryServiceRetriever metricQueryServiceRetriever,
		FatalErrorHandler fatalErrorHandler) throws Exception {
	DispatcherResourceManagerComponentFactory dispatcherResourceManagerComponentFactory = createDispatcherResourceManagerComponentFactory();

	final List<DispatcherResourceManagerComponent> result = new ArrayList<>(numberDispatcherResourceManagerComponents);

	for (int i = 0; i < numberDispatcherResourceManagerComponents; i++) {
		result.add(
			dispatcherResourceManagerComponentFactory.create(
				configuration,
				getIOExecutor(),
				rpcServiceFactory.createRpcService(),
				haServices,
				blobServer,
				heartbeatServices,
				metricRegistry,
				new MemoryArchivedExecutionGraphStore(),
				metricQueryServiceRetriever,
				fatalErrorHandler));
	}

	return result;
}
 
Example 24
Source Project: flink   Source File: WebMonitorEndpoint.java    License: Apache License 2.0 5 votes vote down vote up
public WebMonitorEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<? extends T> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ScheduledExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		ExecutionGraphCache executionGraphCache,
		FatalErrorHandler fatalErrorHandler) throws IOException {
	super(endpointConfiguration);
	this.leaderRetriever = Preconditions.checkNotNull(leaderRetriever);
	this.clusterConfiguration = Preconditions.checkNotNull(clusterConfiguration);
	this.restConfiguration = Preconditions.checkNotNull(restConfiguration);
	this.resourceManagerRetriever = Preconditions.checkNotNull(resourceManagerRetriever);
	this.transientBlobService = Preconditions.checkNotNull(transientBlobService);
	this.executor = Preconditions.checkNotNull(executor);

	this.executionGraphCache = executionGraphCache;

	this.checkpointStatsCache = new CheckpointStatsCache(
		restConfiguration.getMaxCheckpointStatisticCacheEntries());

	this.metricFetcher = metricFetcher;

	this.leaderElectionService = Preconditions.checkNotNull(leaderElectionService);
	this.fatalErrorHandler = Preconditions.checkNotNull(fatalErrorHandler);
}
 
Example 25
Source Project: Flink-CEPplus   Source File: YarnResourceManagerTest.java    License: Apache License 2.0 5 votes vote down vote up
TestingYarnResourceManager(
		RpcService rpcService,
		String resourceManagerEndpointId,
		ResourceID resourceId,
		Configuration flinkConfig,
		Map<String, String> env,
		HighAvailabilityServices highAvailabilityServices,
		HeartbeatServices heartbeatServices,
		SlotManager slotManager,
		MetricRegistry metricRegistry,
		JobLeaderIdService jobLeaderIdService,
		ClusterInformation clusterInformation,
		FatalErrorHandler fatalErrorHandler,
		@Nullable String webInterfaceUrl,
		AMRMClientAsync<AMRMClient.ContainerRequest> mockResourceManagerClient,
		NMClient mockNMClient,
		JobManagerMetricGroup jobManagerMetricGroup) {
	super(
		rpcService,
		resourceManagerEndpointId,
		resourceId,
		flinkConfig,
		env,
		highAvailabilityServices,
		heartbeatServices,
		slotManager,
		metricRegistry,
		jobLeaderIdService,
		clusterInformation,
		fatalErrorHandler,
		webInterfaceUrl,
		jobManagerMetricGroup);
	this.mockNMClient = mockNMClient;
	this.mockResourceManagerClient = mockResourceManagerClient;
}
 
Example 26
Source Project: flink   Source File: SessionDispatcherLeaderProcess.java    License: Apache License 2.0 5 votes vote down vote up
private SessionDispatcherLeaderProcess(
		UUID leaderSessionId,
		DispatcherGatewayServiceFactory dispatcherGatewayServiceFactory,
		JobGraphStore jobGraphStore,
		Executor ioExecutor,
		FatalErrorHandler fatalErrorHandler) {
	super(leaderSessionId, fatalErrorHandler);

	this.dispatcherGatewayServiceFactory = dispatcherGatewayServiceFactory;
	this.jobGraphStore = jobGraphStore;
	this.ioExecutor = ioExecutor;
}
 
Example 27
Source Project: Flink-CEPplus   Source File: JobManagerRunnerFactory.java    License: Apache License 2.0 5 votes vote down vote up
JobManagerRunner createJobManagerRunner(
JobGraph jobGraph,
Configuration configuration,
RpcService rpcService,
HighAvailabilityServices highAvailabilityServices,
HeartbeatServices heartbeatServices,
JobManagerSharedServices jobManagerServices,
JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory,
FatalErrorHandler fatalErrorHandler) throws Exception;
 
Example 28
Source Project: Flink-CEPplus   Source File: MiniDispatcher.java    License: Apache License 2.0 5 votes vote down vote up
public MiniDispatcher(
		RpcService rpcService,
		String endpointId,
		Configuration configuration,
		HighAvailabilityServices highAvailabilityServices,
		GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		JobManagerMetricGroup jobManagerMetricGroup,
		@Nullable String metricQueryServicePath,
		ArchivedExecutionGraphStore archivedExecutionGraphStore,
		JobManagerRunnerFactory jobManagerRunnerFactory,
		FatalErrorHandler fatalErrorHandler,
		HistoryServerArchivist historyServerArchivist,
		JobGraph jobGraph,
		JobClusterEntrypoint.ExecutionMode executionMode) throws Exception {
	super(
		rpcService,
		endpointId,
		configuration,
		highAvailabilityServices,
		new SingleJobSubmittedJobGraphStore(jobGraph),
		resourceManagerGatewayRetriever,
		blobServer,
		heartbeatServices,
		jobManagerMetricGroup,
		metricQueryServicePath,
		archivedExecutionGraphStore,
		jobManagerRunnerFactory,
		fatalErrorHandler,
		historyServerArchivist);

	this.executionMode = checkNotNull(executionMode);
	this.jobTerminationFuture = new CompletableFuture<>();
}
 
Example 29
Source Project: Flink-CEPplus   Source File: StandaloneDispatcher.java    License: Apache License 2.0 5 votes vote down vote up
public StandaloneDispatcher(
		RpcService rpcService,
		String endpointId,
		Configuration configuration,
		HighAvailabilityServices highAvailabilityServices,
		GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever,
		BlobServer blobServer,
		HeartbeatServices heartbeatServices,
		JobManagerMetricGroup jobManagerMetricGroup,
		@Nullable String metricQueryServicePath,
		ArchivedExecutionGraphStore archivedExecutionGraphStore,
		JobManagerRunnerFactory jobManagerRunnerFactory,
		FatalErrorHandler fatalErrorHandler,
		HistoryServerArchivist historyServerArchivist) throws Exception {
	super(
		rpcService,
		endpointId,
		configuration,
		highAvailabilityServices,
		highAvailabilityServices.getSubmittedJobGraphStore(),
		resourceManagerGatewayRetriever,
		blobServer,
		heartbeatServices,
		jobManagerMetricGroup,
		metricQueryServicePath,
		archivedExecutionGraphStore,
		jobManagerRunnerFactory,
		fatalErrorHandler,
		historyServerArchivist);
}
 
Example 30
Source Project: Flink-CEPplus   Source File: WebMonitorEndpoint.java    License: Apache License 2.0 5 votes vote down vote up
public WebMonitorEndpoint(
		RestServerEndpointConfiguration endpointConfiguration,
		GatewayRetriever<? extends T> leaderRetriever,
		Configuration clusterConfiguration,
		RestHandlerConfiguration restConfiguration,
		GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever,
		TransientBlobService transientBlobService,
		ExecutorService executor,
		MetricFetcher metricFetcher,
		LeaderElectionService leaderElectionService,
		FatalErrorHandler fatalErrorHandler) throws IOException {
	super(endpointConfiguration);
	this.leaderRetriever = Preconditions.checkNotNull(leaderRetriever);
	this.clusterConfiguration = Preconditions.checkNotNull(clusterConfiguration);
	this.restConfiguration = Preconditions.checkNotNull(restConfiguration);
	this.resourceManagerRetriever = Preconditions.checkNotNull(resourceManagerRetriever);
	this.transientBlobService = Preconditions.checkNotNull(transientBlobService);
	this.executor = Preconditions.checkNotNull(executor);

	this.executionGraphCache = new ExecutionGraphCache(
		restConfiguration.getTimeout(),
		Time.milliseconds(restConfiguration.getRefreshInterval()));

	this.checkpointStatsCache = new CheckpointStatsCache(
		restConfiguration.getMaxCheckpointStatisticCacheEntries());

	this.metricFetcher = metricFetcher;

	this.leaderElectionService = Preconditions.checkNotNull(leaderElectionService);
	this.fatalErrorHandler = Preconditions.checkNotNull(fatalErrorHandler);
}