TisonKun commented on a change in pull request #7927: [FLINK-11603][metrics]
Port the MetricQueryService to the new RpcEndpoint
URL: https://github.com/apache/flink/pull/7927#discussion_r268375981
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/dump/MetricQueryService.java
##########
@@ -73,60 +71,50 @@ public String filterCharacters(String input) {
private final long messageSizeLimit;
- public MetricQueryService(long messageSizeLimit) {
+ public MetricQueryService(RpcService rpcService, String endpointId,
long messageSizeLimit) {
+ super(rpcService, endpointId);
this.messageSizeLimit = messageSizeLimit;
}
@Override
- public void postStop() {
+ public CompletableFuture<Void> onStop() {
serializer.close();
+ return CompletableFuture.completedFuture(null);
}
- @Override
- public void onReceive(Object message) {
- try {
Review comment:
All of `addMetric` `removeMetric` and `queryMetrics` don't throw Exception.
If it is a fatal, the rpcendpoint will down. Any exception thrown from the
methods should be the same as a exception throw from
`AkkaRpcActor#handleRpcInvocation`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services