flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8317) Enable Triggering of Savepoints via RestfulGateway
Date Fri, 12 Jan 2018 14:58:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16324076#comment-16324076
] 

ASF GitHub Bot commented on FLINK-8317:
---------------------------------------

Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5223#discussion_r161242236
  
    --- Diff: flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java
---
    @@ -294,44 +306,108 @@ public void testSubmitJobAndWaitForExecutionResult() throws Exception
{
     
     	@Test
     	public void testTriggerSavepoint() throws Exception {
    -		String targetSavepointDirectory = "/alternate";
    -		TestSavepointTriggerHandler triggerHandler = new TestSavepointTriggerHandler(targetSavepointDirectory);
    -		try (TestRestServerEndpoint ignored = createRestServerEndpoint(triggerHandler)) {
    +		final String targetSavepointDirectory = "/tmp";
    +		final TestSavepointHandlers testSavepointHandlers = new TestSavepointHandlers();
    +		final TestSavepointHandlers.TestSavepointTriggerHandler triggerHandler =
    +			testSavepointHandlers.new TestSavepointTriggerHandler(
    +				Arrays.asList(null, targetSavepointDirectory, null).iterator());
    +		final TestSavepointHandlers.TestSavepointHandler savepointHandler =
    +			testSavepointHandlers.new TestSavepointHandler(Arrays.asList(
    +				new SavepointResponseBody(QueueStatus.completed(), new SavepointInfo(
    +					testSavepointHandlers.testSavepointTriggerId,
    +					"/other/savepoint-0d2fb9-8d5e0106041a",
    +					null)),
    +				new SavepointResponseBody(QueueStatus.completed(), new SavepointInfo(
    +					testSavepointHandlers.testSavepointTriggerId,
    +					"/tmp/savepoint-0d2fb9-8d5e0106041a",
    +					null)),
    +				new SavepointResponseBody(QueueStatus.completed(), new SavepointInfo(
    +					testSavepointHandlers.testSavepointTriggerId,
    +					null,
    +					new SerializedThrowable(new RuntimeException("expected"))))).iterator());
    +		try (TestRestServerEndpoint ignored = createRestServerEndpoint(
    +			triggerHandler,
    +			savepointHandler)) {
    +
     			JobID id = new JobID();
     			{
     				CompletableFuture<String> savepointPathFuture = restClusterClient.triggerSavepoint(id,
null);
     				String savepointPath = savepointPathFuture.get();
    -				Assert.assertEquals("/universe", savepointPath);
    +				assertEquals("/other/savepoint-0d2fb9-8d5e0106041a", savepointPath);
     			}
     
     			{
     				CompletableFuture<String> savepointPathFuture = restClusterClient.triggerSavepoint(id,
targetSavepointDirectory);
     				String savepointPath = savepointPathFuture.get();
    -				Assert.assertEquals(targetSavepointDirectory + "/universe", savepointPath);
    +				assertEquals("/tmp/savepoint-0d2fb9-8d5e0106041a", savepointPath);
    --- End diff --
    
    done


> Enable Triggering of Savepoints via RestfulGateway
> --------------------------------------------------
>
>                 Key: FLINK-8317
>                 URL: https://issues.apache.org/jira/browse/FLINK-8317
>             Project: Flink
>          Issue Type: New Feature
>          Components: Distributed Coordination, REST
>    Affects Versions: 1.5.0
>            Reporter: Gary Yao
>            Assignee: Gary Yao
>              Labels: flip-6
>             Fix For: 1.5.0
>
>
> Enable triggering of savepoints in FLIP-6 mode via RestfulGateway:
> * Add method to {{CompletableFuture<CompletedCheckpoint> triggerSavepoint(long
timestamp, String targetDirectory)}} to {{RestfulGateway}} interface
> * Implement method in {{Dispatcher}} and {{JobMaster}}
> * Implement a new {{AbstractRestHandler}} which allows asynchronous triggering of savepoints




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message