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

Till Rohrmann commented on FLINK-14499:
---------------------------------------

Looking at the definition of {{MetricRegistry}} we have the method

{code}
/**
 * Returns the gateway of the {@link MetricQueryService} or null, if none is 
started.
 *
 * @return Gateway of the MetricQueryService or null, if none is started
 */
@Nullable
default String getMetricQueryServiceGatewayRpcAddress() {
        return null;
}
{code}

It clearly states that {{getMetricQueryServiceGatewayRpcAddress}} can be 
{{null}}. Looking further at {{MetricRegistryImpl}} one can see that the 
{{queryService}} field is optional. Hence, there is no guarantee even if using 
{{MetricRegistryImpl}} that there will be a metric query service address. I 
think this change is invalid and I will revert it.

> MetricRegistry#getMetricQueryServiceGatewayRpcAddress is Nonnull
> ----------------------------------------------------------------
>
>                 Key: FLINK-14499
>                 URL: https://issues.apache.org/jira/browse/FLINK-14499
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Metrics
>            Reporter: Zili Chen
>            Assignee: AT-Fieldless
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> As codebase moved, I suspect 
> {{MetricRegistry#getMetricQueryServiceGatewayRpcAddress}} is now non-null. 
> One can try to figure it out and if so, refactor related code a bit.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to