You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2018/07/06 09:46:22 UTC

[GitHub] flink pull request #6274: [FLINK-9771][rest] Fix plan JSON response

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/6274

    [FLINK-9771][rest] Fix plan JSON response

    ## What is the purpose of the change
    
    This PR fixes the JSON plan display in the UI. The returned JSON did not conform to the expected format `{plan:<json_plan>}` and only returned the JSON plan as is.
    
    Furthermore the `JobPlanInfoTest` was modified to not manually create JSON, as it wasn't representative of reality due to contained spaces after commas.
    
    ## Verifying this change
    
    Manually verified.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 9771

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6274.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6274
    
----
commit f232def0052f189958f60f3cb53efb527542cf3f
Author: zentol <ch...@...>
Date:   2018-07-06T09:22:20Z

    [FLINK-9771][rest] Fix plan JSON response

----


---

[GitHub] flink issue #6274: [FLINK-9771][rest] Fix plan JSON response

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/6274
  
    merging.


---

[GitHub] flink pull request #6274: [FLINK-9771][rest] Fix plan JSON response

Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6274#discussion_r200638465
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/JobPlanInfo.java ---
    @@ -67,47 +72,88 @@ public int hashCode() {
     		return Objects.hash(jsonPlan);
     	}
     
    -	//---------------------------------------------------------------------------------
    -	// Static helper classes
    -	//---------------------------------------------------------------------------------
    +	@Override
    +	public String toString() {
    +		return "JobPlanInfo{" +
    +			"jsonPlan=" + jsonPlan +
    +			'}';
    +	}
     
    -	/**
    -	 * Json serializer for the {@link JobPlanInfo}.
    -	 */
    -	public static final class Serializer extends StdSerializer<JobPlanInfo> {
    +	@JsonSerialize(using = RawJson.Serializer.class)
    --- End diff --
    
    seems missed Java Doc here~


---

[GitHub] flink pull request #6274: [FLINK-9771][rest] Fix plan JSON response

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/6274


---

[GitHub] flink issue #6274: [FLINK-9771][rest] Fix plan JSON response

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on the issue:

    https://github.com/apache/flink/pull/6274
  
    +1


---