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-7638) Port CurrentJobsOverviewHandler to new REST endpoint
Date Thu, 21 Sep 2017 16:22:01 GMT

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

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

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

    https://github.com/apache/flink/pull/4688#discussion_r140291389
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/CurrentJobsOverviewHandler.java
---
    @@ -92,24 +101,26 @@ public CurrentJobsOverviewHandler(
     					StringWriter writer = new StringWriter();
     					try {
     						JsonGenerator gen = JsonFactory.JACKSON_FACTORY.createGenerator(writer);
    +						final JobDetails.JobDetailsSerializer jobDetailsSerializer = new JobDetails.JobDetailsSerializer();
    +
     						gen.writeStartObject();
     
     						if (includeRunningJobs && includeFinishedJobs) {
     							gen.writeArrayFieldStart("running");
    -							for (JobDetails detail : result.getRunningJobs()) {
    -								writeJobDetailOverviewAsJson(detail, gen, now);
    +							for (JobDetails detail : result.getRunning()) {
    +								jobDetailsSerializer.serialize(detail, gen, null);
     							}
     							gen.writeEndArray();
     
     							gen.writeArrayFieldStart("finished");
    -							for (JobDetails detail : result.getFinishedJobs()) {
    -								writeJobDetailOverviewAsJson(detail, gen, now);
    +							for (JobDetails detail : result.getFinished()) {
    +								jobDetailsSerializer.serialize(detail, gen, null);
     							}
     							gen.writeEndArray();
     						} else {
    --- End diff --
    
    Yes, because I think it's not so nice to return different answer formats depending on
how the handler was instantiated. The respective information can be easily extracted from
the complete overview. Moreover, I think we never used these endpoints in the first place.


> Port CurrentJobsOverviewHandler to new REST endpoint
> ----------------------------------------------------
>
>                 Key: FLINK-7638
>                 URL: https://issues.apache.org/jira/browse/FLINK-7638
>             Project: Flink
>          Issue Type: Sub-task
>          Components: REST, Webfrontend
>    Affects Versions: 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>              Labels: flip-6
>
> Port the existing {{CurrentJobsOverviewHandler}} to the new REST endpoint.



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

Mime
View raw message