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-5852) Move JSON generation code into static methods
Date Tue, 28 Feb 2017 15:07:45 GMT

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

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

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

    https://github.com/apache/flink/pull/3365#discussion_r103473295
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/ArchivedExecutionConfig.java
---
    @@ -54,6 +54,19 @@ public ArchivedExecutionConfig(ExecutionConfig ec) {
     		}
     	}
     
    +	public ArchivedExecutionConfig(
    +			String executionMode,
    +			String restartStrategyDescription,
    +			int parallelism,
    +			boolean objectReuseEnabled,
    +			Map<String, String> globalJobParameters) {
    +		this.executionMode = executionMode;
    --- End diff --
    
    But isn't the other constructor already exactly trying to ensure what you say "simply
won't happen"?
    
    ```java
    if (ec.getGlobalJobParameters() != null
            && ec.getGlobalJobParameters().toMap() != null) {
        globalJobParameters = ec.getGlobalJobParameters().toMap();
    } else {
        globalJobParameters = Collections.emptyMap();
    }
    ```


> Move JSON generation code into static methods
> ---------------------------------------------
>
>                 Key: FLINK-5852
>                 URL: https://issues.apache.org/jira/browse/FLINK-5852
>             Project: Flink
>          Issue Type: Improvement
>          Components: Webfrontend
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>             Fix For: 1.3.0
>
>
> In order to implement the HistoryServer we need a way to generate the JSON responses
independent of the REST API. As such i suggest to move the main parts of the generation code
for job-specific handlers into static methods. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message