Permalink
Browse files

[FLINK-5399] [checkpoints] Add more information about checkpoint to T…

…riggerSavepointSuccess

This closes #3051
  • Loading branch information...
1 parent 9f7ad84 commit d156f8d73cdd152da924f1923a615374258d5015 @shijinkui shijinkui committed with StephanEwen Dec 29, 2016
@@ -82,7 +82,7 @@ public void testTriggerSavepointSuccess() throws Exception {
String savepointPath = "expectedSavepointPath";
- triggerResponse.success(new TriggerSavepointSuccess(jobId, savepointPath));
+ triggerResponse.success(new TriggerSavepointSuccess(jobId, -1, savepointPath, -1));
CliFrontend frontend = new MockCliFrontend(
CliFrontendTestUtils.getConfigDir(), jobManager);
@@ -214,7 +214,7 @@ public void testTriggerSavepointCustomTarget() throws Exception {
any(FiniteDuration.class)))
.thenReturn(triggerResponse.future());
String savepointPath = "expectedSavepointPath";
- triggerResponse.success(new TriggerSavepointSuccess(jobId, savepointPath));
+ triggerResponse.success(new TriggerSavepointSuccess(jobId, -1, savepointPath, -1));
CliFrontend frontend = new MockCliFrontend(
CliFrontendTestUtils.getConfigDir(), jobManager);
@@ -778,7 +778,12 @@ class JobManager(
override def apply(success: CompletedCheckpoint, cause: Throwable): Void = {
if (success != null) {
if (success.getExternalPath != null) {
- senderRef ! TriggerSavepointSuccess(jobId, success.getExternalPath)
+ senderRef ! TriggerSavepointSuccess(
+ jobId,
+ success.getCheckpointID,
+ success.getExternalPath,
+ success.getTimestamp
+ )
} else {
senderRef ! TriggerSavepointFailure(
jobId, new Exception("Savepoint has not been persisted."))
@@ -494,7 +494,12 @@ object JobManagerMessages {
* @param jobId The job ID for which the savepoint was triggered.
* @param savepointPath The path of the savepoint.
*/
- case class TriggerSavepointSuccess(jobId: JobID, savepointPath: String)
+ case class TriggerSavepointSuccess(
+ jobId: JobID,
+ checkpointId: Long,
+ savepointPath: String,
+ triggerTime: Long
+ )
/**
* Response after a failed savepoint trigger containing the failure cause.

0 comments on commit d156f8d

Please sign in to comment.