reswqa commented on PR #22042:
URL: https://github.com/apache/flink/pull/22042#issuecomment-1446839774

   Hi @XComp , would you mind taking a look at this in your free time~
   
   In general, I want to fix this in the same way as `MetricFetcherImpl`. As a 
result, the retrieval logic of `MetricQueryServiceGateway` and 
`TaskExecutorThreadInfoGateway` are actually the same. So I extracted a common 
class `AddressBasedGatewayRetriever` to reduce duplicate code. 
   
   What confuses me is that whether it should implements the `GatewayRetriever` 
interface? If yes, It seems that we must introduce `CompletableFuture<T> 
getFuture(String address)` method in `GatewayRetriever`, which makes me feel 
uncomfortable. The protocol of `GatewayRetriever` is very simple now, It is to 
get a `Future` of retrieved `Gateway` directly without anything else. I don't 
want to break it, so `AddressBasedGatewayRetriever` is a separate interface in 
this pr. 
   
   What do you think is better, or do you have other better suggestions, I am 
very happy to hear your opinion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to