org.apache.flink.runtime.resourcemanager.ResourceManagerGateway Java Examples
The following examples show how to use
org.apache.flink.runtime.resourcemanager.ResourceManagerGateway.
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: AbstractTaskManagerFileHandlerTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private AbstractTaskManagerFileHandlerTest.TestTaskManagerFileHandler createTestTaskManagerFileHandler( Time cacheEntryDuration, Queue<CompletableFuture<TransientBlobKey>> requestFileUploads, ResourceID expectedTaskManagerId) { final ResourceManagerGateway resourceManagerGateway = new TestingResourceManagerGateway(); return new TestTaskManagerFileHandler( () -> CompletableFuture.completedFuture(null), TestingUtils.infiniteTime(), Collections.emptyMap(), new TestUntypedMessageHeaders(), () -> CompletableFuture.completedFuture(resourceManagerGateway), blobServer, cacheEntryDuration, requestFileUploads, expectedTaskManagerId); }
Example #2
Source File: ExecutionGraphNotEnoughResourceTest.java From flink with Apache License 2.0 | 6 votes |
private static Scheduler createSchedulerWithSlots( int numSlots, SlotPool slotPool, TaskManagerLocation taskManagerLocation) throws Exception { final TaskManagerGateway taskManagerGateway = new SimpleAckingTaskManagerGateway(); final String jobManagerAddress = "foobar"; final ResourceManagerGateway resourceManagerGateway = new TestingResourceManagerGateway(); slotPool.start(JobMasterId.generate(), jobManagerAddress, mainThreadExecutor); slotPool.connectToResourceManager(resourceManagerGateway); Scheduler scheduler = new SchedulerImpl(LocationPreferenceSlotSelectionStrategy.createDefault(), slotPool); scheduler.start(mainThreadExecutor); CompletableFuture.runAsync(() -> slotPool.registerTaskManager(taskManagerLocation.getResourceID()), mainThreadExecutor).join(); final List<SlotOffer> slotOffers = new ArrayList<>(NUM_TASKS); for (int i = 0; i < numSlots; i++) { final AllocationID allocationId = new AllocationID(); final SlotOffer slotOffer = new SlotOffer(allocationId, 0, ResourceProfile.ANY); slotOffers.add(slotOffer); } CompletableFuture.runAsync(() -> slotPool.offerSlots(taskManagerLocation, taskManagerGateway, slotOffers), mainThreadExecutor).join(); return scheduler; }
Example #3
Source File: AbstractTaskManagerFileHandlerTest.java From flink with Apache License 2.0 | 6 votes |
private AbstractTaskManagerFileHandlerTest.TestTaskManagerFileHandler createTestTaskManagerFileHandler( Time cacheEntryDuration, Queue<CompletableFuture<TransientBlobKey>> requestFileUploads, ResourceID expectedTaskManagerId) { final ResourceManagerGateway resourceManagerGateway = new TestingResourceManagerGateway(); return new TestTaskManagerFileHandler( () -> CompletableFuture.completedFuture(null), TestingUtils.infiniteTime(), Collections.emptyMap(), new TestUntypedMessageHeaders(), () -> CompletableFuture.completedFuture(resourceManagerGateway), blobServer, cacheEntryDuration, requestFileUploads, expectedTaskManagerId); }
Example #4
Source File: PartialDispatcherServices.java From flink with Apache License 2.0 | 6 votes |
public PartialDispatcherServices( @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) { this.configuration = configuration; this.highAvailabilityServices = highAvailabilityServices; this.resourceManagerGatewayRetriever = resourceManagerGatewayRetriever; this.blobServer = blobServer; this.heartbeatServices = heartbeatServices; this.jobManagerMetricGroupFactory = jobManagerMetricGroupFactory; this.archivedExecutionGraphStore = archivedExecutionGraphStore; this.fatalErrorHandler = fatalErrorHandler; this.historyServerArchivist = historyServerArchivist; this.metricQueryServiceAddress = metricQueryServiceAddress; }
Example #5
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 #6
Source File: TaskExecutorToResourceManagerConnection.java From flink with Apache License 2.0 | 6 votes |
ResourceManagerRegistration( Logger log, RpcService rpcService, String targetAddress, ResourceManagerId resourceManagerId, RetryingRegistrationConfiguration retryingRegistrationConfiguration, String taskExecutorAddress, ResourceID resourceID, int dataPort, HardwareDescription hardwareDescription) { super(log, rpcService, "ResourceManager", ResourceManagerGateway.class, targetAddress, resourceManagerId, retryingRegistrationConfiguration); this.taskExecutorAddress = checkNotNull(taskExecutorAddress); this.resourceID = checkNotNull(resourceID); this.dataPort = dataPort; this.hardwareDescription = checkNotNull(hardwareDescription); }
Example #7
Source File: JobMaster.java From flink with Apache License 2.0 | 6 votes |
@Override protected RetryingRegistration<ResourceManagerId, ResourceManagerGateway, JobMasterRegistrationSuccess> generateRegistration() { return new RetryingRegistration<ResourceManagerId, ResourceManagerGateway, JobMasterRegistrationSuccess>( log, getRpcService(), "ResourceManager", ResourceManagerGateway.class, getTargetAddress(), getTargetLeaderId(), jobMasterConfiguration.getRetryingRegistrationConfiguration()) { @Override protected CompletableFuture<RegistrationResponse> invokeRegistration( ResourceManagerGateway gateway, ResourceManagerId fencingToken, long timeoutMillis) { Time timeout = Time.milliseconds(timeoutMillis); return gateway.registerJobManager( jobMasterId, jobManagerResourceID, jobManagerRpcAddress, jobID, timeout); } }; }
Example #8
Source File: AbstractTaskManagerFileHandler.java From flink with Apache License 2.0 | 6 votes |
protected AbstractTaskManagerFileHandler( @Nonnull GatewayRetriever<? extends RestfulGateway> leaderRetriever, @Nonnull Time timeout, @Nonnull Map<String, String> responseHeaders, @Nonnull UntypedResponseMessageHeaders<EmptyRequestBody, M> untypedResponseMessageHeaders, @Nonnull GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, @Nonnull TransientBlobService transientBlobService, @Nonnull Time cacheEntryDuration) { super(leaderRetriever, timeout, responseHeaders, untypedResponseMessageHeaders); this.resourceManagerGatewayRetriever = Preconditions.checkNotNull(resourceManagerGatewayRetriever); this.transientBlobService = Preconditions.checkNotNull(transientBlobService); this.fileBlobKeys = CacheBuilder .newBuilder() .expireAfterWrite(cacheEntryDuration.toMilliseconds(), TimeUnit.MILLISECONDS) .removalListener(this::removeBlob) .build( new CacheLoader<Tuple2<ResourceID, String>, CompletableFuture<TransientBlobKey>>() { @Override public CompletableFuture<TransientBlobKey> load(Tuple2<ResourceID, String> taskManagerIdAndFileName) throws Exception { return loadTaskManagerFile(taskManagerIdAndFileName); } }); }
Example #9
Source File: TaskExecutor.java From flink with Apache License 2.0 | 6 votes |
@Override public void onRegistrationSuccess(TaskExecutorToResourceManagerConnection connection, TaskExecutorRegistrationSuccess success) { final ResourceID resourceManagerId = success.getResourceManagerId(); final InstanceID taskExecutorRegistrationId = success.getRegistrationId(); final ClusterInformation clusterInformation = success.getClusterInformation(); final ResourceManagerGateway resourceManagerGateway = connection.getTargetGateway(); runAsync( () -> { // filter out outdated connections //noinspection ObjectEquality if (resourceManagerConnection == connection) { establishResourceManagerConnection( resourceManagerGateway, resourceManagerId, taskExecutorRegistrationId, clusterInformation); } }); }
Example #10
Source File: AbstractTaskManagerFileHandler.java From flink with Apache License 2.0 | 6 votes |
protected AbstractTaskManagerFileHandler( @Nonnull GatewayRetriever<? extends RestfulGateway> leaderRetriever, @Nonnull Time timeout, @Nonnull Map<String, String> responseHeaders, @Nonnull UntypedResponseMessageHeaders<EmptyRequestBody, M> untypedResponseMessageHeaders, @Nonnull GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, @Nonnull TransientBlobService transientBlobService, @Nonnull Time cacheEntryDuration) { super(leaderRetriever, timeout, responseHeaders, untypedResponseMessageHeaders); this.resourceManagerGatewayRetriever = Preconditions.checkNotNull(resourceManagerGatewayRetriever); this.transientBlobService = Preconditions.checkNotNull(transientBlobService); this.fileBlobKeys = CacheBuilder .newBuilder() .expireAfterWrite(cacheEntryDuration.toMilliseconds(), TimeUnit.MILLISECONDS) .removalListener(this::removeBlob) .build( new CacheLoader<ResourceID, CompletableFuture<TransientBlobKey>>() { @Override public CompletableFuture<TransientBlobKey> load(ResourceID resourceId) throws Exception { return loadTaskManagerFile(resourceId); } }); }
Example #11
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 #12
Source File: JobMaster.java From flink with Apache License 2.0 | 6 votes |
@Override protected RetryingRegistration<ResourceManagerId, ResourceManagerGateway, JobMasterRegistrationSuccess> generateRegistration() { return new RetryingRegistration<ResourceManagerId, ResourceManagerGateway, JobMasterRegistrationSuccess>( log, getRpcService(), "ResourceManager", ResourceManagerGateway.class, getTargetAddress(), getTargetLeaderId(), jobMasterConfiguration.getRetryingRegistrationConfiguration()) { @Override protected CompletableFuture<RegistrationResponse> invokeRegistration( ResourceManagerGateway gateway, ResourceManagerId fencingToken, long timeoutMillis) { Time timeout = Time.milliseconds(timeoutMillis); return gateway.registerJobManager( jobMasterId, jobManagerResourceID, jobManagerRpcAddress, jobID, timeout); } }; }
Example #13
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 #14
Source File: MiniDispatcherRestEndpoint.java From flink with Apache License 2.0 | 6 votes |
public MiniDispatcherRestEndpoint( RestServerEndpointConfiguration endpointConfiguration, GatewayRetriever<? extends RestfulGateway> leaderRetriever, Configuration clusterConfiguration, RestHandlerConfiguration restConfiguration, GatewayRetriever<ResourceManagerGateway> resourceManagerRetriever, TransientBlobService transientBlobService, ScheduledExecutorService executor, MetricFetcher metricFetcher, LeaderElectionService leaderElectionService, ExecutionGraphCache executionGraphCache, FatalErrorHandler fatalErrorHandler) throws IOException { super( endpointConfiguration, leaderRetriever, clusterConfiguration, restConfiguration, resourceManagerRetriever, transientBlobService, executor, metricFetcher, leaderElectionService, executionGraphCache, fatalErrorHandler); }
Example #15
Source File: JobMaster.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override protected RetryingRegistration<ResourceManagerId, ResourceManagerGateway, JobMasterRegistrationSuccess> generateRegistration() { return new RetryingRegistration<ResourceManagerId, ResourceManagerGateway, JobMasterRegistrationSuccess>( log, getRpcService(), "ResourceManager", ResourceManagerGateway.class, getTargetAddress(), getTargetLeaderId(), jobMasterConfiguration.getRetryingRegistrationConfiguration()) { @Override protected CompletableFuture<RegistrationResponse> invokeRegistration( ResourceManagerGateway gateway, ResourceManagerId fencingToken, long timeoutMillis) { Time timeout = Time.milliseconds(timeoutMillis); return gateway.registerJobManager( jobMasterId, jobManagerResourceID, jobManagerRpcAddress, jobID, timeout); } }; }
Example #16
Source File: TaskExecutor.java From flink with Apache License 2.0 | 5 votes |
private void freeSlotInternal(AllocationID allocationId, Throwable cause) { checkNotNull(allocationId); log.debug("Free slot with allocation id {} because: {}", allocationId, cause.getMessage()); try { final JobID jobId = taskSlotTable.getOwningJob(allocationId); final int slotIndex = taskSlotTable.freeSlot(allocationId, cause); if (slotIndex != -1) { if (isConnectedToResourceManager()) { // the slot was freed. Tell the RM about it ResourceManagerGateway resourceManagerGateway = establishedResourceManagerConnection.getResourceManagerGateway(); resourceManagerGateway.notifySlotAvailable( establishedResourceManagerConnection.getTaskExecutorRegistrationId(), new SlotID(getResourceID(), slotIndex), allocationId); } if (jobId != null) { closeJobManagerConnectionIfNoAllocatedResources(jobId); } } } catch (SlotNotFoundException e) { log.debug("Could not free slot for allocation id {}.", allocationId, e); } localStateStoresManager.releaseLocalStateForAllocationId(allocationId); }
Example #17
Source File: TaskManagersHandler.java From flink with Apache License 2.0 | 5 votes |
public TaskManagersHandler( GatewayRetriever<? extends RestfulGateway> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<EmptyRequestBody, TaskManagersInfo, EmptyMessageParameters> messageHeaders, GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever) { super( leaderRetriever, timeout, responseHeaders, messageHeaders, resourceManagerGatewayRetriever); }
Example #18
Source File: TaskExecutor.java From flink with Apache License 2.0 | 5 votes |
private void closeResourceManagerConnection(Exception cause) { if (establishedResourceManagerConnection != null) { final ResourceID resourceManagerResourceId = establishedResourceManagerConnection.getResourceManagerResourceId(); if (log.isDebugEnabled()) { log.debug("Close ResourceManager connection {}.", resourceManagerResourceId, cause); } else { log.info("Close ResourceManager connection {}.", resourceManagerResourceId); } resourceManagerHeartbeatManager.unmonitorTarget(resourceManagerResourceId); ResourceManagerGateway resourceManagerGateway = establishedResourceManagerConnection.getResourceManagerGateway(); resourceManagerGateway.disconnectTaskManager(getResourceID(), cause); establishedResourceManagerConnection = null; } if (resourceManagerConnection != null) { if (!resourceManagerConnection.isConnected()) { if (log.isDebugEnabled()) { log.debug("Terminating registration attempts towards ResourceManager {}.", resourceManagerConnection.getTargetAddress(), cause); } else { log.info("Terminating registration attempts towards ResourceManager {}.", resourceManagerConnection.getTargetAddress()); } } resourceManagerConnection.close(); resourceManagerConnection = null; } startRegistrationTimeout(); }
Example #19
Source File: TestingDispatcher.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
TestingDispatcher( 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) throws Exception { super( rpcService, endpointId, configuration, highAvailabilityServices, highAvailabilityServices.getSubmittedJobGraphStore(), resourceManagerGatewayRetriever, blobServer, heartbeatServices, jobManagerMetricGroup, metricQueryServicePath, archivedExecutionGraphStore, jobManagerRunnerFactory, fatalErrorHandler, VoidHistoryServerArchivist.INSTANCE); this.startFuture = new CompletableFuture<>(); }
Example #20
Source File: TaskExecutorToResourceManagerConnection.java From flink with Apache License 2.0 | 5 votes |
@Override protected RetryingRegistration<ResourceManagerId, ResourceManagerGateway, TaskExecutorRegistrationSuccess> generateRegistration() { return new TaskExecutorToResourceManagerConnection.ResourceManagerRegistration( log, rpcService, getTargetAddress(), getTargetLeaderId(), retryingRegistrationConfiguration, taskManagerAddress, taskManagerResourceId, dataPort, hardwareDescription); }
Example #21
Source File: AbstractTaskManagerHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected CompletableFuture<P> handleRequest(@Nonnull HandlerRequest<R, M> request, @Nonnull T gateway) throws RestHandlerException { Optional<ResourceManagerGateway> resourceManagerGatewayOptional = resourceManagerGatewayRetriever.getNow(); ResourceManagerGateway resourceManagerGateway = resourceManagerGatewayOptional.orElseThrow( () -> new RestHandlerException("Cannot connect to ResourceManager right now. Please try to refresh.", HttpResponseStatus.NOT_FOUND)); return handleRequest(request, resourceManagerGateway); }
Example #22
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, ExecutorService executor, MetricFetcher metricFetcher, LeaderElectionService leaderElectionService, FatalErrorHandler fatalErrorHandler) throws Exception;
Example #23
Source File: AbstractTaskManagerFileHandlerTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override protected CompletableFuture<TransientBlobKey> requestFileUpload(ResourceManagerGateway resourceManagerGateway, ResourceID taskManagerResourceId) { assertThat(taskManagerResourceId, is(equalTo(expectedTaskManagerId))); final CompletableFuture<TransientBlobKey> transientBlobKeyFuture = requestFileUploads.poll(); if (transientBlobKeyFuture != null) { return transientBlobKeyFuture; } else { return FutureUtils.completedExceptionally(new FlinkException("Could not upload file.")); } }
Example #24
Source File: SlotPoolImplTest.java From flink with Apache License 2.0 | 5 votes |
private static void setupSlotPool( SlotPoolImpl slotPool, ResourceManagerGateway resourceManagerGateway, ComponentMainThreadExecutor mainThreadExecutable) throws Exception { final String jobManagerAddress = "foobar"; slotPool.start(JobMasterId.generate(), jobManagerAddress, mainThreadExecutable); slotPool.connectToResourceManager(resourceManagerGateway); }
Example #25
Source File: AbstractTaskManagerHandler.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
protected AbstractTaskManagerHandler( GatewayRetriever<? extends T> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<R, P, M> messageHeaders, GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever) { super(leaderRetriever, timeout, responseHeaders, messageHeaders); this.resourceManagerGatewayRetriever = Preconditions.checkNotNull(resourceManagerGatewayRetriever); }
Example #26
Source File: DispatcherHATest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
HATestingDispatcher( 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, @Nonnull Queue<DispatcherId> fencingTokens) throws Exception { super( rpcService, endpointId, configuration, highAvailabilityServices, resourceManagerGatewayRetriever, blobServer, heartbeatServices, jobManagerMetricGroup, metricQueryServicePath, archivedExecutionGraphStore, jobManagerRunnerFactory, fatalErrorHandler); this.fencingTokens = fencingTokens; }
Example #27
Source File: TestingDispatcher.java From flink with Apache License 2.0 | 5 votes |
TestingDispatcher( RpcService rpcService, String endpointId, Configuration configuration, HighAvailabilityServices highAvailabilityServices, GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever, BlobServer blobServer, HeartbeatServices heartbeatServices, JobManagerMetricGroup jobManagerMetricGroup, @Nullable String metricQueryServiceAddress, ArchivedExecutionGraphStore archivedExecutionGraphStore, JobManagerRunnerFactory jobManagerRunnerFactory, FatalErrorHandler fatalErrorHandler) throws Exception { super( rpcService, endpointId, configuration, highAvailabilityServices, highAvailabilityServices.getSubmittedJobGraphStore(), resourceManagerGatewayRetriever, blobServer, heartbeatServices, jobManagerMetricGroup, metricQueryServiceAddress, archivedExecutionGraphStore, jobManagerRunnerFactory, fatalErrorHandler, VoidHistoryServerArchivist.INSTANCE); this.startFuture = new CompletableFuture<>(); }
Example #28
Source File: AbstractTaskManagerHandler.java From flink with Apache License 2.0 | 5 votes |
protected AbstractTaskManagerHandler( GatewayRetriever<? extends T> leaderRetriever, Time timeout, Map<String, String> responseHeaders, MessageHeaders<R, P, M> messageHeaders, GatewayRetriever<ResourceManagerGateway> resourceManagerGatewayRetriever) { super(leaderRetriever, timeout, responseHeaders, messageHeaders); this.resourceManagerGatewayRetriever = Preconditions.checkNotNull(resourceManagerGatewayRetriever); }
Example #29
Source File: TaskManagerThreadDumpHandler.java From flink with Apache License 2.0 | 5 votes |
@Override protected CompletableFuture<ThreadDumpInfo> handleRequest( @Nonnull HandlerRequest<EmptyRequestBody, TaskManagerMessageParameters> request, @Nonnull ResourceManagerGateway gateway) throws RestHandlerException { final ResourceID taskManagerId = request.getPathParameter(TaskManagerIdPathParameter.class); return gateway.requestThreadDump(taskManagerId, timeout); }
Example #30
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;