org.apache.flink.runtime.rpc.FatalErrorHandler Java Examples
The following examples show how to use
org.apache.flink.runtime.rpc.FatalErrorHandler.
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: TestingJobManagerRunnerFactory.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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 #2
Source File: MiniCluster.java From flink with Apache License 2.0 | 6 votes |
@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 #3
Source File: ActiveResourceManagerFactory.java From flink with Apache License 2.0 | 6 votes |
@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 #4
Source File: DispatcherServices.java From flink with Apache License 2.0 | 6 votes |
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 #5
Source File: TestingJobManagerRunnerFactory.java From flink with Apache License 2.0 | 6 votes |
@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 #6
Source File: TestingResourceManager.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
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 #7
Source File: JobDispatcherLeaderProcessFactoryFactory.java From flink with Apache License 2.0 | 6 votes |
@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 #8
Source File: DefaultJobMasterServiceFactory.java From flink with Apache License 2.0 | 6 votes |
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 #9
Source File: DispatcherTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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 File: MiniDispatcherRestEndpoint.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
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 #11
Source File: TestingResourceManager.java From flink with Apache License 2.0 | 6 votes |
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 #12
Source File: TestingTaskExecutor.java From flink with Apache License 2.0 | 6 votes |
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 #13
Source File: DispatcherRestEndpoint.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
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 File: SessionDispatcherLeaderProcessFactoryFactory.java From flink with Apache License 2.0 | 6 votes |
@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 #15
Source File: DispatcherRestEndpoint.java From flink with Apache License 2.0 | 6 votes |
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 #16
Source File: DispatcherTest.java From flink with Apache License 2.0 | 6 votes |
@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 #17
Source File: DefaultJobMasterServiceFactory.java From flink with Apache License 2.0 | 6 votes |
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 #18
Source File: MiniCluster.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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 #19
Source File: PartialDispatcherServicesWithJobGraphStore.java From flink with Apache License 2.0 | 6 votes |
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 #20
Source File: MiniCluster.java From flink with Apache License 2.0 | 6 votes |
@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 #21
Source File: ApplicationDispatcherLeaderProcessFactoryFactory.java From flink with Apache License 2.0 | 6 votes |
@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 File: JobManagerRunnerImpl.java From flink with Apache License 2.0 | 5 votes |
/** * Exceptions that occur while creating the JobManager or JobManagerRunnerImpl are directly * thrown and not reported to the given {@code FatalErrorHandler}. * * @throws Exception Thrown if the runner cannot be set up, because either one of the * required services could not be started, or the Job could not be initialized. */ public JobManagerRunnerImpl( final JobGraph jobGraph, final JobMasterServiceFactory jobMasterFactory, final HighAvailabilityServices haServices, final LibraryCacheManager.ClassLoaderLease classLoaderLease, final Executor executor, final FatalErrorHandler fatalErrorHandler) throws Exception { this.resultFuture = new CompletableFuture<>(); this.terminationFuture = new CompletableFuture<>(); this.leadershipOperation = CompletableFuture.completedFuture(null); this.jobGraph = checkNotNull(jobGraph); this.classLoaderLease = checkNotNull(classLoaderLease); this.executor = checkNotNull(executor); this.fatalErrorHandler = checkNotNull(fatalErrorHandler); checkArgument(jobGraph.getNumberOfVertices() > 0, "The given job is empty"); // libraries and class loader first final ClassLoader userCodeLoader; try { userCodeLoader = classLoaderLease.getOrResolveClassLoader( jobGraph.getUserJarBlobKeys(), jobGraph.getClasspaths()); } catch (IOException e) { throw new Exception("Cannot set up the user code libraries: " + e.getMessage(), e); } // high availability services next this.runningJobsRegistry = haServices.getRunningJobsRegistry(); this.leaderElectionService = haServices.getJobManagerLeaderElectionService(jobGraph.getJobID()); this.leaderGatewayFuture = new CompletableFuture<>(); // now start the JobManager this.jobMasterService = jobMasterFactory.createJobMasterService(jobGraph, this, userCodeLoader); }
Example #23
Source File: StandaloneResourceManagerTest.java From flink with Apache License 2.0 | 5 votes |
private TestingStandaloneResourceManager( RpcService rpcService, String resourceManagerEndpointId, ResourceID resourceId, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, SlotManager slotManager, MetricRegistry metricRegistry, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, JobManagerMetricGroup jobManagerMetricGroup, Time startupPeriodTime, MockResourceManagerRuntimeServices rmServices) { super( rpcService, resourceManagerEndpointId, resourceId, highAvailabilityServices, heartbeatServices, slotManager, metricRegistry, jobLeaderIdService, clusterInformation, fatalErrorHandler, jobManagerMetricGroup, startupPeriodTime); this.rmServices = rmServices; }
Example #24
Source File: DispatcherFactory.java From flink with Apache License 2.0 | 5 votes |
/** * Create a {@link Dispatcher} of the given type {@link T}. */ T createDispatcher( Configuration configuration, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, BlobServer blobServer, HeartbeatServices heartbeatServices, JobManagerMetricGroup jobManagerMetricGroup, @Nullable String metricQueryServiceAddress, ArchivedExecutionGraphStore archivedExecutionGraphStore, FatalErrorHandler fatalErrorHandler, HistoryServerArchivist historyServerArchivist) throws Exception;
Example #25
Source File: StandaloneResourceManager.java From flink with Apache License 2.0 | 5 votes |
public StandaloneResourceManager( RpcService rpcService, ResourceID resourceId, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, SlotManager slotManager, ResourceManagerPartitionTrackerFactory clusterPartitionTrackerFactory, JobLeaderIdService jobLeaderIdService, ClusterInformation clusterInformation, FatalErrorHandler fatalErrorHandler, ResourceManagerMetricGroup resourceManagerMetricGroup, Time startupPeriodTime, Time rpcTimeout) { super( rpcService, resourceId, highAvailabilityServices, heartbeatServices, slotManager, clusterPartitionTrackerFactory, jobLeaderIdService, clusterInformation, fatalErrorHandler, resourceManagerMetricGroup, rpcTimeout); this.startupPeriodTime = Preconditions.checkNotNull(startupPeriodTime); }
Example #26
Source File: JobManagerRunnerFactory.java From flink with Apache License 2.0 | 5 votes |
JobManagerRunner createJobManagerRunner( JobGraph jobGraph, Configuration configuration, RpcService rpcService, HighAvailabilityServices highAvailabilityServices, HeartbeatServices heartbeatServices, JobManagerSharedServices jobManagerServices, JobManagerJobMetricGroupFactory jobManagerJobMetricGroupFactory, FatalErrorHandler fatalErrorHandler) throws Exception;
Example #27
Source File: RestEndpointFactory.java From flink with Apache License 2.0 | 5 votes |
WebMonitorEndpoint<T> createRestEndpoint( Configuration configuration, LeaderGatewayRetriever<DispatcherGateway> dispatcherGatewayRetriever, LeaderGatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, TransientBlobService transientBlobService, ScheduledExecutorService executor, MetricFetcher metricFetcher, LeaderElectionService leaderElectionService, FatalErrorHandler fatalErrorHandler) throws Exception;
Example #28
Source File: WebMonitorEndpoint.java From flink with Apache License 2.0 | 5 votes |
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); }
Example #29
Source File: BlobLibraryCacheManager.java From flink with Apache License 2.0 | 5 votes |
private static Consumer<Throwable> createClassLoadingExceptionHandler( @Nullable FatalErrorHandler fatalErrorHandlerJvmMetaspaceOomError) { return fatalErrorHandlerJvmMetaspaceOomError != null ? classLoadingException -> { if (ExceptionUtils.isMetaspaceOutOfMemoryError(classLoadingException)) { fatalErrorHandlerJvmMetaspaceOomError.onFatalError(classLoadingException); } } : FlinkUserCodeClassLoader.NOOP_EXCEPTION_HANDLER; }
Example #30
Source File: MesosResourceManagerFactory.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@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); }