org.apache.flink.runtime.rest.handler.legacy.backpressure.OperatorBackPressureStatsResponse Java Examples
The following examples show how to use
org.apache.flink.runtime.rest.handler.legacy.backpressure.OperatorBackPressureStatsResponse.
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: JobVertexBackPressureHandlerTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Before public void setUp() { restfulGateway = TestingRestfulGateway.newBuilder().setRequestOperatorBackPressureStatsFunction( (jobId, jobVertexId) -> { if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_AVAILABLE)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(new OperatorBackPressureStats( 4711, Integer.MAX_VALUE, new double[]{1.0, 0.5, 0.1} ))); } else if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(null)); } else { throw new AssertionError(); } } ).build(); jobVertexBackPressureHandler = new JobVertexBackPressureHandler( () -> CompletableFuture.completedFuture(restfulGateway), Time.seconds(10), Collections.emptyMap(), JobVertexBackPressureHeaders.getInstance() ); }
Example #2
Source File: JobVertexBackPressureHandlerTest.java From flink with Apache License 2.0 | 6 votes |
@Before public void setUp() { restfulGateway = TestingRestfulGateway.newBuilder().setRequestOperatorBackPressureStatsFunction( (jobId, jobVertexId) -> { if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_AVAILABLE)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(new OperatorBackPressureStats( 4711, Integer.MAX_VALUE, new double[]{1.0, 0.5, 0.1} ))); } else if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(null)); } else { throw new AssertionError(); } } ).build(); jobVertexBackPressureHandler = new JobVertexBackPressureHandler( () -> CompletableFuture.completedFuture(restfulGateway), Time.seconds(10), Collections.emptyMap(), JobVertexBackPressureHeaders.getInstance() ); }
Example #3
Source File: JobVertexBackPressureHandlerTest.java From flink with Apache License 2.0 | 6 votes |
@Before public void setUp() { restfulGateway = new TestingRestfulGateway.Builder().setRequestOperatorBackPressureStatsFunction( (jobId, jobVertexId) -> { if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_AVAILABLE)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(new OperatorBackPressureStats( 4711, Integer.MAX_VALUE, new double[]{1.0, 0.5, 0.1} ))); } else if (jobId.equals(TEST_JOB_ID_BACK_PRESSURE_STATS_ABSENT)) { return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of(null)); } else { throw new AssertionError(); } } ).build(); jobVertexBackPressureHandler = new JobVertexBackPressureHandler( () -> CompletableFuture.completedFuture(restfulGateway), Time.seconds(10), Collections.emptyMap(), JobVertexBackPressureHeaders.getInstance() ); }
Example #4
Source File: BackPressureITCase.java From flink with Apache License 2.0 | 5 votes |
private SupplierWithException<Boolean, Exception> isJobVertexBackPressured(final JobVertex sourceJobVertex) { return () -> { final OperatorBackPressureStatsResponse backPressureStatsResponse = dispatcherGateway .requestOperatorBackPressureStats(TEST_JOB_ID, sourceJobVertex.getID()) .get(); return backPressureStatsResponse.getOperatorBackPressureStats() .map(backPressureStats -> isBackPressured(backPressureStats)) .orElse(false); }; }
Example #5
Source File: BackPressureITCase.java From flink with Apache License 2.0 | 5 votes |
private SupplierWithException<Boolean, Exception> isJobVertexBackPressured(final JobVertex sourceJobVertex) { return () -> { final OperatorBackPressureStatsResponse backPressureStatsResponse = dispatcherGateway .requestOperatorBackPressureStats(TEST_JOB_ID, sourceJobVertex.getID()) .get(); return backPressureStatsResponse.getOperatorBackPressureStats() .map(backPressureStats -> isBackPressured(backPressureStats)) .orElse(false); }; }
Example #6
Source File: TestingDispatcherGateway.java From flink with Apache License 2.0 | 5 votes |
public TestingDispatcherGateway( String address, String hostname, Function<JobID, CompletableFuture<Acknowledge>> cancelJobFunction, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestJobFunction, Function<JobID, CompletableFuture<JobResult>> requestJobResultFunction, Function<JobID, CompletableFuture<JobStatus>> requestJobStatusFunction, Supplier<CompletableFuture<MultipleJobsDetails>> requestMultipleJobDetailsSupplier, Supplier<CompletableFuture<ClusterOverview>> requestClusterOverviewSupplier, Supplier<CompletableFuture<Collection<String>>> requestMetricQueryServiceAddressesSupplier, Supplier<CompletableFuture<Collection<Tuple2<ResourceID, String>>>> requestTaskManagerMetricQueryServiceGatewaysSupplier, BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, BiFunction<JobID, String, CompletableFuture<String>> triggerSavepointFunction, BiFunction<JobID, String, CompletableFuture<String>> stopWithSavepointFunction, Function<JobGraph, CompletableFuture<Acknowledge>> submitFunction, Supplier<CompletableFuture<Collection<JobID>>> listFunction, int blobServerPort, DispatcherId fencingToken, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestArchivedJobFunction) { super( address, hostname, cancelJobFunction, requestJobFunction, requestJobResultFunction, requestJobStatusFunction, requestMultipleJobDetailsSupplier, requestClusterOverviewSupplier, requestMetricQueryServiceAddressesSupplier, requestTaskManagerMetricQueryServiceGatewaysSupplier, requestOperatorBackPressureStatsFunction, triggerSavepointFunction, stopWithSavepointFunction); this.submitFunction = submitFunction; this.listFunction = listFunction; this.blobServerPort = blobServerPort; this.fencingToken = fencingToken; this.requestArchivedJobFunction = requestArchivedJobFunction; }
Example #7
Source File: Dispatcher.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats( final JobID jobId, final JobVertexID jobVertexId) { final CompletableFuture<JobMasterGateway> jobMasterGatewayFuture = getJobMasterGatewayFuture(jobId); return jobMasterGatewayFuture.thenCompose((JobMasterGateway jobMasterGateway) -> jobMasterGateway.requestOperatorBackPressureStats(jobVertexId)); }
Example #8
Source File: Dispatcher.java From flink with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats( final JobID jobId, final JobVertexID jobVertexId) { final CompletableFuture<JobMasterGateway> jobMasterGatewayFuture = getJobMasterGatewayFuture(jobId); return jobMasterGatewayFuture.thenCompose((JobMasterGateway jobMasterGateway) -> jobMasterGateway.requestOperatorBackPressureStats(jobVertexId)); }
Example #9
Source File: TestingRestfulGateway.java From flink with Apache License 2.0 | 5 votes |
public TestingRestfulGateway( String address, String hostname, Function<JobID, CompletableFuture<Acknowledge>> cancelJobFunction, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestJobFunction, Function<JobID, CompletableFuture<JobResult>> requestJobResultFunction, Function<JobID, CompletableFuture<JobStatus>> requestJobStatusFunction, Supplier<CompletableFuture<MultipleJobsDetails>> requestMultipleJobDetailsSupplier, Supplier<CompletableFuture<ClusterOverview>> requestClusterOverviewSupplier, Supplier<CompletableFuture<Collection<String>>> requestMetricQueryServiceAddressesSupplier, Supplier<CompletableFuture<Collection<Tuple2<ResourceID, String>>>> requestTaskManagerMetricQueryServiceAddressesSupplier, BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, BiFunction<JobID, String, CompletableFuture<String>> triggerSavepointFunction, BiFunction<JobID, String, CompletableFuture<String>> stopWithSavepointFunction) { this.address = address; this.hostname = hostname; this.cancelJobFunction = cancelJobFunction; this.requestJobFunction = requestJobFunction; this.requestJobResultFunction = requestJobResultFunction; this.requestJobStatusFunction = requestJobStatusFunction; this.requestMultipleJobDetailsSupplier = requestMultipleJobDetailsSupplier; this.requestClusterOverviewSupplier = requestClusterOverviewSupplier; this.requestMetricQueryServiceAddressesSupplier = requestMetricQueryServiceAddressesSupplier; this.requestTaskManagerMetricQueryServiceAddressesSupplier = requestTaskManagerMetricQueryServiceAddressesSupplier; this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; this.triggerSavepointFunction = triggerSavepointFunction; this.stopWithSavepointFunction = stopWithSavepointFunction; }
Example #10
Source File: JobMaster.java From flink with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(final JobVertexID jobVertexId) { try { final Optional<OperatorBackPressureStats> operatorBackPressureStats = schedulerNG.requestOperatorBackPressureStats(jobVertexId); return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of( operatorBackPressureStats.orElse(null))); } catch (FlinkException e) { log.info("Error while requesting operator back pressure stats", e); return FutureUtils.completedExceptionally(e); } }
Example #11
Source File: JobMaster.java From flink with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(final JobVertexID jobVertexId) { try { final Optional<OperatorBackPressureStats> operatorBackPressureStats = schedulerNG.requestOperatorBackPressureStats(jobVertexId); return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of( operatorBackPressureStats.orElse(null))); } catch (FlinkException e) { log.info("Error while requesting operator back pressure stats", e); return FutureUtils.completedExceptionally(e); } }
Example #12
Source File: TestingRestfulGateway.java From flink with Apache License 2.0 | 5 votes |
public TestingRestfulGateway( String address, String hostname, Function<JobID, CompletableFuture<Acknowledge>> cancelJobFunction, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestJobFunction, Function<JobID, CompletableFuture<JobResult>> requestJobResultFunction, Function<JobID, CompletableFuture<JobStatus>> requestJobStatusFunction, Supplier<CompletableFuture<MultipleJobsDetails>> requestMultipleJobDetailsSupplier, Supplier<CompletableFuture<ClusterOverview>> requestClusterOverviewSupplier, Supplier<CompletableFuture<Collection<String>>> requestMetricQueryServiceAddressesSupplier, Supplier<CompletableFuture<Collection<Tuple2<ResourceID, String>>>> requestTaskManagerMetricQueryServiceAddressesSupplier, BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, BiFunction<JobID, String, CompletableFuture<String>> triggerSavepointFunction, BiFunction<JobID, String, CompletableFuture<String>> stopWithSavepointFunction, Supplier<CompletableFuture<Acknowledge>> clusterShutdownSupplier, TriFunction<JobID, OperatorID, SerializedValue<CoordinationRequest>, CompletableFuture<CoordinationResponse>> deliverCoordinationRequestToCoordinatorFunction) { this.address = address; this.hostname = hostname; this.cancelJobFunction = cancelJobFunction; this.requestJobFunction = requestJobFunction; this.requestJobResultFunction = requestJobResultFunction; this.requestJobStatusFunction = requestJobStatusFunction; this.requestMultipleJobDetailsSupplier = requestMultipleJobDetailsSupplier; this.requestClusterOverviewSupplier = requestClusterOverviewSupplier; this.requestMetricQueryServiceAddressesSupplier = requestMetricQueryServiceAddressesSupplier; this.requestTaskManagerMetricQueryServiceAddressesSupplier = requestTaskManagerMetricQueryServiceAddressesSupplier; this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; this.triggerSavepointFunction = triggerSavepointFunction; this.stopWithSavepointFunction = stopWithSavepointFunction; this.clusterShutdownSupplier = clusterShutdownSupplier; this.deliverCoordinationRequestToCoordinatorFunction = deliverCoordinationRequestToCoordinatorFunction; }
Example #13
Source File: Dispatcher.java From flink with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats( final JobID jobId, final JobVertexID jobVertexId) { final CompletableFuture<JobMasterGateway> jobMasterGatewayFuture = getJobMasterGatewayFuture(jobId); return jobMasterGatewayFuture.thenCompose((JobMasterGateway jobMasterGateway) -> jobMasterGateway.requestOperatorBackPressureStats(jobVertexId)); }
Example #14
Source File: TestingDispatcherGateway.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public TestingDispatcherGateway( String address, String hostname, Function<JobID, CompletableFuture<Acknowledge>> cancelJobFunction, Function<JobID, CompletableFuture<Acknowledge>> stopJobFunction, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestJobFunction, Function<JobID, CompletableFuture<JobResult>> requestJobResultFunction, Function<JobID, CompletableFuture<JobStatus>> requestJobStatusFunction, Supplier<CompletableFuture<MultipleJobsDetails>> requestMultipleJobDetailsSupplier, Supplier<CompletableFuture<ClusterOverview>> requestClusterOverviewSupplier, Supplier<CompletableFuture<Collection<String>>> requestMetricQueryServicePathsSupplier, Supplier<CompletableFuture<Collection<Tuple2<ResourceID, String>>>> requestTaskManagerMetricQueryServicePathsSupplier, BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, BiFunction<JobID, String, CompletableFuture<String>> triggerSavepointFunction, Function<JobGraph, CompletableFuture<Acknowledge>> submitFunction, Supplier<CompletableFuture<Collection<JobID>>> listFunction, int blobServerPort, DispatcherId fencingToken, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestArchivedJobFunction) { super( address, hostname, cancelJobFunction, stopJobFunction, requestJobFunction, requestJobResultFunction, requestJobStatusFunction, requestMultipleJobDetailsSupplier, requestClusterOverviewSupplier, requestMetricQueryServicePathsSupplier, requestTaskManagerMetricQueryServicePathsSupplier, requestOperatorBackPressureStatsFunction, triggerSavepointFunction); this.submitFunction = submitFunction; this.listFunction = listFunction; this.blobServerPort = blobServerPort; this.fencingToken = fencingToken; this.requestArchivedJobFunction = requestArchivedJobFunction; }
Example #15
Source File: TestingRestfulGateway.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public TestingRestfulGateway( String address, String hostname, Function<JobID, CompletableFuture<Acknowledge>> cancelJobFunction, Function<JobID, CompletableFuture<Acknowledge>> stopJobFunction, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestJobFunction, Function<JobID, CompletableFuture<JobResult>> requestJobResultFunction, Function<JobID, CompletableFuture<JobStatus>> requestJobStatusFunction, Supplier<CompletableFuture<MultipleJobsDetails>> requestMultipleJobDetailsSupplier, Supplier<CompletableFuture<ClusterOverview>> requestClusterOverviewSupplier, Supplier<CompletableFuture<Collection<String>>> requestMetricQueryServicePathsSupplier, Supplier<CompletableFuture<Collection<Tuple2<ResourceID, String>>>> requestTaskManagerMetricQueryServicePathsSupplier, BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, BiFunction<JobID, String, CompletableFuture<String>> triggerSavepointFunction) { this.address = address; this.hostname = hostname; this.cancelJobFunction = cancelJobFunction; this.stopJobFunction = stopJobFunction; this.requestJobFunction = requestJobFunction; this.requestJobResultFunction = requestJobResultFunction; this.requestJobStatusFunction = requestJobStatusFunction; this.requestMultipleJobDetailsSupplier = requestMultipleJobDetailsSupplier; this.requestClusterOverviewSupplier = requestClusterOverviewSupplier; this.requestMetricQueryServicePathsSupplier = requestMetricQueryServicePathsSupplier; this.requestTaskManagerMetricQueryServicePathsSupplier = requestTaskManagerMetricQueryServicePathsSupplier; this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; this.triggerSavepointFunction = triggerSavepointFunction; }
Example #16
Source File: JobMaster.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(final JobVertexID jobVertexId) { final ExecutionJobVertex jobVertex = executionGraph.getJobVertex(jobVertexId); if (jobVertex == null) { return FutureUtils.completedExceptionally(new FlinkException("JobVertexID not found " + jobVertexId)); } final Optional<OperatorBackPressureStats> operatorBackPressureStats = backPressureStatsTracker.getOperatorBackPressureStats(jobVertex); return CompletableFuture.completedFuture(OperatorBackPressureStatsResponse.of( operatorBackPressureStats.orElse(null))); }
Example #17
Source File: TestingJobMasterGateway.java From flink with Apache License 2.0 | 4 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(JobVertexID jobVertexId) { return requestOperatorBackPressureStatsFunction.apply(jobVertexId); }
Example #18
Source File: TestingRestfulGateway.java From flink with Apache License 2.0 | 4 votes |
public Builder setRequestOperatorBackPressureStatsFunction(BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOeratorBackPressureStatsFunction) { this.requestOperatorBackPressureStatsFunction = requestOeratorBackPressureStatsFunction; return this; }
Example #19
Source File: TestingRestfulGateway.java From flink with Apache License 2.0 | 4 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(final JobID jobId, final JobVertexID jobVertexId) { return requestOperatorBackPressureStatsFunction.apply(jobId, jobVertexId); }
Example #20
Source File: TestingRestfulGateway.java From flink with Apache License 2.0 | 4 votes |
public T setRequestOperatorBackPressureStatsFunction(BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOeratorBackPressureStatsFunction) { this.requestOperatorBackPressureStatsFunction = requestOeratorBackPressureStatsFunction; return self(); }
Example #21
Source File: TestingDispatcherGateway.java From flink with Apache License 2.0 | 4 votes |
public TestingDispatcherGateway( String address, String hostname, Function<JobID, CompletableFuture<Acknowledge>> cancelJobFunction, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestJobFunction, Function<JobID, CompletableFuture<JobResult>> requestJobResultFunction, Function<JobID, CompletableFuture<JobStatus>> requestJobStatusFunction, Supplier<CompletableFuture<MultipleJobsDetails>> requestMultipleJobDetailsSupplier, Supplier<CompletableFuture<ClusterOverview>> requestClusterOverviewSupplier, Supplier<CompletableFuture<Collection<String>>> requestMetricQueryServiceAddressesSupplier, Supplier<CompletableFuture<Collection<Tuple2<ResourceID, String>>>> requestTaskManagerMetricQueryServiceGatewaysSupplier, BiFunction<JobID, JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, BiFunction<JobID, String, CompletableFuture<String>> triggerSavepointFunction, BiFunction<JobID, String, CompletableFuture<String>> stopWithSavepointFunction, Function<JobGraph, CompletableFuture<Acknowledge>> submitFunction, Supplier<CompletableFuture<Collection<JobID>>> listFunction, int blobServerPort, DispatcherId fencingToken, Function<JobID, CompletableFuture<ArchivedExecutionGraph>> requestArchivedJobFunction, Supplier<CompletableFuture<Acknowledge>> clusterShutdownSupplier, Function<ApplicationStatus, CompletableFuture<Acknowledge>> clusterShutdownWithStatusFunction, TriFunction<JobID, OperatorID, SerializedValue<CoordinationRequest>, CompletableFuture<CoordinationResponse>> deliverCoordinationRequestToCoordinatorFunction) { super( address, hostname, cancelJobFunction, requestJobFunction, requestJobResultFunction, requestJobStatusFunction, requestMultipleJobDetailsSupplier, requestClusterOverviewSupplier, requestMetricQueryServiceAddressesSupplier, requestTaskManagerMetricQueryServiceGatewaysSupplier, requestOperatorBackPressureStatsFunction, triggerSavepointFunction, stopWithSavepointFunction, clusterShutdownSupplier, deliverCoordinationRequestToCoordinatorFunction); this.submitFunction = submitFunction; this.listFunction = listFunction; this.blobServerPort = blobServerPort; this.fencingToken = fencingToken; this.requestArchivedJobFunction = requestArchivedJobFunction; this.clusterShutdownWithStatusFunction = clusterShutdownWithStatusFunction; }
Example #22
Source File: TestingJobMasterGatewayBuilder.java From flink with Apache License 2.0 | 4 votes |
public TestingJobMasterGatewayBuilder setRequestOperatorBackPressureStatsFunction(Function<JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction) { this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; return this; }
Example #23
Source File: TestingJobMasterGateway.java From flink with Apache License 2.0 | 4 votes |
public TestingJobMasterGateway( @Nonnull String address, @Nonnull String hostname, @Nonnull Supplier<CompletableFuture<Acknowledge>> cancelFunction, @Nonnull Function<TaskExecutionState, CompletableFuture<Acknowledge>> updateTaskExecutionStateFunction, @Nonnull BiFunction<JobVertexID, ExecutionAttemptID, CompletableFuture<SerializedInputSplit>> requestNextInputSplitFunction, @Nonnull BiFunction<IntermediateDataSetID, ResultPartitionID, CompletableFuture<ExecutionState>> requestPartitionStateFunction, @Nonnull Function<ResultPartitionID, CompletableFuture<Acknowledge>> scheduleOrUpdateConsumersFunction, @Nonnull Function<ResourceID, CompletableFuture<Acknowledge>> disconnectTaskManagerFunction, @Nonnull Consumer<ResourceManagerId> disconnectResourceManagerConsumer, @Nonnull BiFunction<ResourceID, Collection<SlotOffer>, CompletableFuture<Collection<SlotOffer>>> offerSlotsFunction, @Nonnull TriConsumer<ResourceID, AllocationID, Throwable> failSlotConsumer, @Nonnull BiFunction<String, UnresolvedTaskManagerLocation, CompletableFuture<RegistrationResponse>> registerTaskManagerFunction, @Nonnull BiConsumer<ResourceID, AccumulatorReport> taskManagerHeartbeatConsumer, @Nonnull Consumer<ResourceID> resourceManagerHeartbeatConsumer, @Nonnull Supplier<CompletableFuture<JobDetails>> requestJobDetailsSupplier, @Nonnull Supplier<CompletableFuture<ArchivedExecutionGraph>> requestJobSupplier, @Nonnull BiFunction<String, Boolean, CompletableFuture<String>> triggerSavepointFunction, @Nonnull BiFunction<String, Boolean, CompletableFuture<String>> stopWithSavepointFunction, @Nonnull Function<JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, @Nonnull BiConsumer<AllocationID, Throwable> notifyAllocationFailureConsumer, @Nonnull Consumer<Tuple5<JobID, ExecutionAttemptID, Long, CheckpointMetrics, TaskStateSnapshot>> acknowledgeCheckpointConsumer, @Nonnull Consumer<DeclineCheckpoint> declineCheckpointConsumer, @Nonnull Supplier<JobMasterId> fencingTokenSupplier, @Nonnull BiFunction<JobID, String, CompletableFuture<KvStateLocation>> requestKvStateLocationFunction, @Nonnull Function<Tuple6<JobID, JobVertexID, KeyGroupRange, String, KvStateID, InetSocketAddress>, CompletableFuture<Acknowledge>> notifyKvStateRegisteredFunction, @Nonnull Function<Tuple4<JobID, JobVertexID, KeyGroupRange, String>, CompletableFuture<Acknowledge>> notifyKvStateUnregisteredFunction, @Nonnull TriFunction<String, Object, byte[], CompletableFuture<Object>> updateAggregateFunction, @Nonnull TriFunction<ExecutionAttemptID, OperatorID, SerializedValue<OperatorEvent>, CompletableFuture<Acknowledge>> operatorEventSender, @Nonnull BiFunction<OperatorID, SerializedValue<CoordinationRequest>, CompletableFuture<CoordinationResponse>> deliverCoordinationRequestFunction) { this.address = address; this.hostname = hostname; this.cancelFunction = cancelFunction; this.updateTaskExecutionStateFunction = updateTaskExecutionStateFunction; this.requestNextInputSplitFunction = requestNextInputSplitFunction; this.requestPartitionStateFunction = requestPartitionStateFunction; this.scheduleOrUpdateConsumersFunction = scheduleOrUpdateConsumersFunction; this.disconnectTaskManagerFunction = disconnectTaskManagerFunction; this.disconnectResourceManagerConsumer = disconnectResourceManagerConsumer; this.offerSlotsFunction = offerSlotsFunction; this.failSlotConsumer = failSlotConsumer; this.registerTaskManagerFunction = registerTaskManagerFunction; this.taskManagerHeartbeatConsumer = taskManagerHeartbeatConsumer; this.resourceManagerHeartbeatConsumer = resourceManagerHeartbeatConsumer; this.requestJobDetailsSupplier = requestJobDetailsSupplier; this.requestJobSupplier = requestJobSupplier; this.triggerSavepointFunction = triggerSavepointFunction; this.stopWithSavepointFunction = stopWithSavepointFunction; this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; this.notifyAllocationFailureConsumer = notifyAllocationFailureConsumer; this.acknowledgeCheckpointConsumer = acknowledgeCheckpointConsumer; this.declineCheckpointConsumer = declineCheckpointConsumer; this.fencingTokenSupplier = fencingTokenSupplier; this.requestKvStateLocationFunction = requestKvStateLocationFunction; this.notifyKvStateRegisteredFunction = notifyKvStateRegisteredFunction; this.notifyKvStateUnregisteredFunction = notifyKvStateUnregisteredFunction; this.updateAggregateFunction = updateAggregateFunction; this.operatorEventSender = operatorEventSender; this.deliverCoordinationRequestFunction = deliverCoordinationRequestFunction; }
Example #24
Source File: TestingJobMasterGateway.java From flink with Apache License 2.0 | 4 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(JobVertexID jobVertexId) { return requestOperatorBackPressureStatsFunction.apply(jobVertexId); }
Example #25
Source File: TestingJobMasterGateway.java From flink with Apache License 2.0 | 4 votes |
public TestingJobMasterGateway( @Nonnull String address, @Nonnull String hostname, @Nonnull Supplier<CompletableFuture<Acknowledge>> cancelFunction, @Nonnull Function<TaskExecutionState, CompletableFuture<Acknowledge>> updateTaskExecutionStateFunction, @Nonnull BiFunction<JobVertexID, ExecutionAttemptID, CompletableFuture<SerializedInputSplit>> requestNextInputSplitFunction, @Nonnull BiFunction<IntermediateDataSetID, ResultPartitionID, CompletableFuture<ExecutionState>> requestPartitionStateFunction, @Nonnull Function<ResultPartitionID, CompletableFuture<Acknowledge>> scheduleOrUpdateConsumersFunction, @Nonnull Function<ResourceID, CompletableFuture<Acknowledge>> disconnectTaskManagerFunction, @Nonnull Consumer<ResourceManagerId> disconnectResourceManagerConsumer, @Nonnull Supplier<CompletableFuture<ClassloadingProps>> classloadingPropsSupplier, @Nonnull BiFunction<ResourceID, Collection<SlotOffer>, CompletableFuture<Collection<SlotOffer>>> offerSlotsFunction, @Nonnull TriConsumer<ResourceID, AllocationID, Throwable> failSlotConsumer, @Nonnull BiFunction<String, TaskManagerLocation, CompletableFuture<RegistrationResponse>> registerTaskManagerFunction, @Nonnull BiConsumer<ResourceID, AccumulatorReport> taskManagerHeartbeatConsumer, @Nonnull Consumer<ResourceID> resourceManagerHeartbeatConsumer, @Nonnull Supplier<CompletableFuture<JobDetails>> requestJobDetailsSupplier, @Nonnull Supplier<CompletableFuture<ArchivedExecutionGraph>> requestJobSupplier, @Nonnull BiFunction<String, Boolean, CompletableFuture<String>> triggerSavepointFunction, @Nonnull BiFunction<String, Boolean, CompletableFuture<String>> stopWithSavepointFunction, @Nonnull Function<JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, @Nonnull BiConsumer<AllocationID, Throwable> notifyAllocationFailureConsumer, @Nonnull Consumer<Tuple5<JobID, ExecutionAttemptID, Long, CheckpointMetrics, TaskStateSnapshot>> acknowledgeCheckpointConsumer, @Nonnull Consumer<DeclineCheckpoint> declineCheckpointConsumer, @Nonnull Supplier<JobMasterId> fencingTokenSupplier, @Nonnull BiFunction<JobID, String, CompletableFuture<KvStateLocation>> requestKvStateLocationFunction, @Nonnull Function<Tuple6<JobID, JobVertexID, KeyGroupRange, String, KvStateID, InetSocketAddress>, CompletableFuture<Acknowledge>> notifyKvStateRegisteredFunction, @Nonnull Function<Tuple4<JobID, JobVertexID, KeyGroupRange, String>, CompletableFuture<Acknowledge>> notifyKvStateUnregisteredFunction, @Nonnull TriFunction<String, Object, byte[], CompletableFuture<Object>> updateAggregateFunction) { this.address = address; this.hostname = hostname; this.cancelFunction = cancelFunction; this.updateTaskExecutionStateFunction = updateTaskExecutionStateFunction; this.requestNextInputSplitFunction = requestNextInputSplitFunction; this.requestPartitionStateFunction = requestPartitionStateFunction; this.scheduleOrUpdateConsumersFunction = scheduleOrUpdateConsumersFunction; this.disconnectTaskManagerFunction = disconnectTaskManagerFunction; this.disconnectResourceManagerConsumer = disconnectResourceManagerConsumer; this.classloadingPropsSupplier = classloadingPropsSupplier; this.offerSlotsFunction = offerSlotsFunction; this.failSlotConsumer = failSlotConsumer; this.registerTaskManagerFunction = registerTaskManagerFunction; this.taskManagerHeartbeatConsumer = taskManagerHeartbeatConsumer; this.resourceManagerHeartbeatConsumer = resourceManagerHeartbeatConsumer; this.requestJobDetailsSupplier = requestJobDetailsSupplier; this.requestJobSupplier = requestJobSupplier; this.triggerSavepointFunction = triggerSavepointFunction; this.stopWithSavepointFunction = stopWithSavepointFunction; this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; this.notifyAllocationFailureConsumer = notifyAllocationFailureConsumer; this.acknowledgeCheckpointConsumer = acknowledgeCheckpointConsumer; this.declineCheckpointConsumer = declineCheckpointConsumer; this.fencingTokenSupplier = fencingTokenSupplier; this.requestKvStateLocationFunction = requestKvStateLocationFunction; this.notifyKvStateRegisteredFunction = notifyKvStateRegisteredFunction; this.notifyKvStateUnregisteredFunction = notifyKvStateUnregisteredFunction; this.updateAggregateFunction = updateAggregateFunction; }
Example #26
Source File: TestingJobMasterGatewayBuilder.java From flink with Apache License 2.0 | 4 votes |
public TestingJobMasterGatewayBuilder setRequestOperatorBackPressureStatsFunction(Function<JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction) { this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; return this; }
Example #27
Source File: TestingRestfulGateway.java From flink with Apache License 2.0 | 4 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(final JobID jobId, final JobVertexID jobVertexId) { return requestOperatorBackPressureStatsFunction.apply(jobId, jobVertexId); }
Example #28
Source File: TestingJobMasterGateway.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
@Override public CompletableFuture<OperatorBackPressureStatsResponse> requestOperatorBackPressureStats(JobVertexID jobVertexId) { return requestOperatorBackPressureStatsFunction.apply(jobVertexId); }
Example #29
Source File: TestingJobMasterGateway.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public TestingJobMasterGateway( @Nonnull String address, @Nonnull String hostname, @Nonnull Supplier<CompletableFuture<Acknowledge>> cancelFunction, @Nonnull Supplier<CompletableFuture<Acknowledge>> stopFunction, @Nonnull BiFunction<Integer, RescalingBehaviour, CompletableFuture<Acknowledge>> rescalingJobFunction, @Nonnull TriFunction<Collection<JobVertexID>, Integer, RescalingBehaviour, CompletableFuture<Acknowledge>> rescalingOperatorsFunction, @Nonnull Function<TaskExecutionState, CompletableFuture<Acknowledge>> updateTaskExecutionStateFunction, @Nonnull BiFunction<JobVertexID, ExecutionAttemptID, CompletableFuture<SerializedInputSplit>> requestNextInputSplitFunction, @Nonnull BiFunction<IntermediateDataSetID, ResultPartitionID, CompletableFuture<ExecutionState>> requestPartitionStateFunction, @Nonnull Function<ResultPartitionID, CompletableFuture<Acknowledge>> scheduleOrUpdateConsumersFunction, @Nonnull Function<ResourceID, CompletableFuture<Acknowledge>> disconnectTaskManagerFunction, @Nonnull Consumer<ResourceManagerId> disconnectResourceManagerConsumer, @Nonnull Supplier<CompletableFuture<ClassloadingProps>> classloadingPropsSupplier, @Nonnull BiFunction<ResourceID, Collection<SlotOffer>, CompletableFuture<Collection<SlotOffer>>> offerSlotsFunction, @Nonnull TriConsumer<ResourceID, AllocationID, Throwable> failSlotConsumer, @Nonnull BiFunction<String, TaskManagerLocation, CompletableFuture<RegistrationResponse>> registerTaskManagerFunction, @Nonnull BiConsumer<ResourceID, AccumulatorReport> taskManagerHeartbeatConsumer, @Nonnull Consumer<ResourceID> resourceManagerHeartbeatConsumer, @Nonnull Supplier<CompletableFuture<JobDetails>> requestJobDetailsSupplier, @Nonnull Supplier<CompletableFuture<ArchivedExecutionGraph>> requestJobSupplier, @Nonnull BiFunction<String, Boolean, CompletableFuture<String>> triggerSavepointFunction, @Nonnull Function<JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction, @Nonnull BiConsumer<AllocationID, Throwable> notifyAllocationFailureConsumer, @Nonnull Consumer<Tuple5<JobID, ExecutionAttemptID, Long, CheckpointMetrics, TaskStateSnapshot>> acknowledgeCheckpointConsumer, @Nonnull Consumer<DeclineCheckpoint> declineCheckpointConsumer, @Nonnull Supplier<JobMasterId> fencingTokenSupplier, @Nonnull BiFunction<JobID, String, CompletableFuture<KvStateLocation>> requestKvStateLocationFunction, @Nonnull Function<Tuple6<JobID, JobVertexID, KeyGroupRange, String, KvStateID, InetSocketAddress>, CompletableFuture<Acknowledge>> notifyKvStateRegisteredFunction, @Nonnull Function<Tuple4<JobID, JobVertexID, KeyGroupRange, String>, CompletableFuture<Acknowledge>> notifyKvStateUnregisteredFunction, @Nonnull TriFunction<String, Object, byte[], CompletableFuture<Object>> updateAggregateFunction) { this.address = address; this.hostname = hostname; this.cancelFunction = cancelFunction; this.stopFunction = stopFunction; this.rescalingJobFunction = rescalingJobFunction; this.rescalingOperatorsFunction = rescalingOperatorsFunction; this.updateTaskExecutionStateFunction = updateTaskExecutionStateFunction; this.requestNextInputSplitFunction = requestNextInputSplitFunction; this.requestPartitionStateFunction = requestPartitionStateFunction; this.scheduleOrUpdateConsumersFunction = scheduleOrUpdateConsumersFunction; this.disconnectTaskManagerFunction = disconnectTaskManagerFunction; this.disconnectResourceManagerConsumer = disconnectResourceManagerConsumer; this.classloadingPropsSupplier = classloadingPropsSupplier; this.offerSlotsFunction = offerSlotsFunction; this.failSlotConsumer = failSlotConsumer; this.registerTaskManagerFunction = registerTaskManagerFunction; this.taskManagerHeartbeatConsumer = taskManagerHeartbeatConsumer; this.resourceManagerHeartbeatConsumer = resourceManagerHeartbeatConsumer; this.requestJobDetailsSupplier = requestJobDetailsSupplier; this.requestJobSupplier = requestJobSupplier; this.triggerSavepointFunction = triggerSavepointFunction; this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; this.notifyAllocationFailureConsumer = notifyAllocationFailureConsumer; this.acknowledgeCheckpointConsumer = acknowledgeCheckpointConsumer; this.declineCheckpointConsumer = declineCheckpointConsumer; this.fencingTokenSupplier = fencingTokenSupplier; this.requestKvStateLocationFunction = requestKvStateLocationFunction; this.notifyKvStateRegisteredFunction = notifyKvStateRegisteredFunction; this.notifyKvStateUnregisteredFunction = notifyKvStateUnregisteredFunction; this.updateAggregateFunction = updateAggregateFunction; }
Example #30
Source File: TestingJobMasterGatewayBuilder.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
public TestingJobMasterGatewayBuilder setRequestOperatorBackPressureStatsFunction(Function<JobVertexID, CompletableFuture<OperatorBackPressureStatsResponse>> requestOperatorBackPressureStatsFunction) { this.requestOperatorBackPressureStatsFunction = requestOperatorBackPressureStatsFunction; return this; }