flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #6330: [FLINK-9499][rest] Support JSON request in JarHand...
Date Wed, 18 Jul 2018 12:39:26 GMT
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6330#discussion_r203361773
  
    --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JarRunHandler.java
---
    @@ -138,12 +154,22 @@ public JarRunHandler(
     			});
     	}
     
    -	private static SavepointRestoreSettings getSavepointRestoreSettings(
    -			final @Nonnull HandlerRequest<EmptyRequestBody, JarRunMessageParameters> request)
    +	private SavepointRestoreSettings getSavepointRestoreSettings(
    +			final @Nonnull HandlerRequest<JarRunRequestBody, JarRunMessageParameters> request)
     				throws RestHandlerException {
     
    -		final boolean allowNonRestoredState = getQueryParameter(request, AllowNonRestoredStateQueryParameter.class,
false);
    -		final String savepointPath = getQueryParameter(request, SavepointPathQueryParameter.class);
    +		final JarRunRequestBody requestBody = request.getRequestBody();
    +
    +		final boolean allowNonRestoredState = fromRequestBodyOrQueryParameter(
    +			requestBody.getAllowNonRestoredState(),
    +			() -> getQueryParameter(request, AllowNonRestoredStateQueryParameter.class),
    +			false,
    +			log);
    +		final String savepointPath = fromRequestBodyOrQueryParameter(
    --- End diff --
    
    How does this prevent the scenario i described?


---

Mime
View raw message