You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/11/15 08:26:24 UTC

[GitHub] dawidwys closed pull request #7096: [FLINK-10419] Call JobMasterGateway through RpcCheckpointResponder in…

dawidwys closed pull request #7096: [FLINK-10419] Call JobMasterGateway through RpcCheckpointResponder in…
URL: https://github.com/apache/flink/pull/7096
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java
index b1f02845c14..de3f7875098 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java
@@ -103,6 +103,7 @@
 import org.apache.flink.runtime.state.memory.ByteStreamStateHandle;
 import org.apache.flink.runtime.taskexecutor.TestingTaskExecutorGateway;
 import org.apache.flink.runtime.taskexecutor.TestingTaskExecutorGatewayBuilder;
+import org.apache.flink.runtime.taskexecutor.rpc.RpcCheckpointResponder;
 import org.apache.flink.runtime.taskexecutor.slot.SlotOffer;
 import org.apache.flink.runtime.taskmanager.LocalTaskManagerLocation;
 import org.apache.flink.runtime.taskmanager.TaskExecutionState;
@@ -303,18 +304,16 @@ public void declineCheckpoint(DeclineCheckpoint declineCheckpoint) {
 
 			Throwable userException = (Throwable) Class.forName(className, false, userClassLoader).newInstance();
 
-			CompletableFuture<JobMasterGateway> jobMasterGateway =
-				rpcService2.connect(jobMaster.getAddress(), jobMaster.getFencingToken(), JobMasterGateway.class);
-
-			jobMasterGateway.thenAccept(gateway -> {
-				gateway.declineCheckpoint(new DeclineCheckpoint(
-						jobGraph.getJobID(),
-						new ExecutionAttemptID(1, 1),
-						1,
-						userException
-					)
-				);
-			});
+			JobMasterGateway jobMasterGateway =
+				rpcService2.connect(jobMaster.getAddress(), jobMaster.getFencingToken(), JobMasterGateway.class).get();
+
+			RpcCheckpointResponder rpcCheckpointResponder = new RpcCheckpointResponder(jobMasterGateway);
+			rpcCheckpointResponder.declineCheckpoint(
+				jobGraph.getJobID(),
+				new ExecutionAttemptID(1, 1),
+				1,
+				userException
+			);
 
 			Throwable throwable = declineCheckpointMessageFuture.get(testingTimeout.toMilliseconds(),
 				TimeUnit.MILLISECONDS);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services