You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Bowen Li (JIRA)" <ji...@apache.org> on 2017/09/27 04:19:00 UTC

[jira] [Commented] (FLINK-7694) Port JobMetricsHandler to new REST handler

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

Bowen Li commented on FLINK-7694:
---------------------------------

[~till.rohrmann] Hi Till, I have done some research on how to accomplish this migration. To make sure I'm on the right path, I want to discuss with you my rough understanding and ask some questions about the code architecture.

Here're the steps I think I need to do:

--------------------
1. add class 

{code:java}
public class JobIDPathParameter extends MessagePathParameter<JobID>
{code}

2. add class

{code:java}
public class JobIDMessageParameters extends MessageParameters {
	private final JobIDPathParameter jobIDPathParameter;
        ...
}
{code}

3. add class 

{code:java}
public class JobMetricsOverview implements ResponseBody {
	public static final String FIELD_NAME_METRICS = "metrics";

	@JsonProperty(FIELD_NAME_METRICS)
	private final  Map<String, String> metrics;

        ...
}
{code}


4. change {{JobMetricsHandler}} 's signature to 

{code:java}
public class JobMetricsHandler extends AbstractMetricsHandler implements LegacyRestHandler<DispatcherGateway, JobMetricsOverview, JobIDMessageParameters>
{code}

--------------------

Do the above steps make sense?

What I haven't figured out are: where is {{JobMetricsOverview}} (the ResponseBody) consumed? Is there an example of integration test?


> Port JobMetricsHandler to new REST handler
> ------------------------------------------
>
>                 Key: FLINK-7694
>                 URL: https://issues.apache.org/jira/browse/FLINK-7694
>             Project: Flink
>          Issue Type: Sub-task
>          Components: REST, Webfrontend
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>             Fix For: 1.4.0
>
>




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