tillrohrmann commented on a change in pull request #13319:
URL: https://github.com/apache/flink/pull/13319#discussion_r483081832



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
##########
@@ -513,10 +513,10 @@ public State terminate(AkkaRpcActor<?> akkaRpcActor) {
                        try {
                                terminationFuture = 
akkaRpcActor.rpcEndpoint.internalCallOnStop();
                        } catch (Throwable t) {
-                               terminationFuture = 
FutureUtils.completedExceptionally(
-                                       new AkkaRpcException(
-                                               String.format("Failure while 
stopping RpcEndpoint %s.", akkaRpcActor.rpcEndpoint.getEndpointId()),
-                                               t));
+                               String errorMsg = String.format("Failure while 
stopping RpcEndpoint %s.", akkaRpcActor.rpcEndpoint.getEndpointId());
+                               
LoggerFactory.getLogger(akkaRpcActor.rpcEndpoint.getClass()).error(errorMsg, t);

Review comment:
       I'd suggest to use `akkaRpcActor.log` instead of creating a new logger.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
##########
@@ -209,8 +209,9 @@ public ResourceManager(
        public final void onStart() throws Exception {
                try {
                        startResourceManagerServices();
-               } catch (Exception e) {
-                       final ResourceManagerException exception = new 
ResourceManagerException(String.format("Could not start the ResourceManager 
%s", getAddress()), e);
+               } catch (Throwable t) {
+                       getTerminationFuture().completeExceptionally(t);

Review comment:
       Not needed.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
##########
@@ -548,11 +548,10 @@ public State start(AkkaRpcActor<?> akkaRpcActor) {
                        try {
                                akkaRpcActor.rpcEndpoint.internalCallOnStart();
                        } catch (Throwable throwable) {
-                               akkaRpcActor.stop(
-                                       RpcEndpointTerminationResult.failure(
-                                               new AkkaRpcException(
-                                                       String.format("Could 
not start RpcEndpoint %s.", akkaRpcActor.rpcEndpoint.getEndpointId()),
-                                                       throwable)));
+                               String errorMsg = String.format("Could not 
start RpcEndpoint %s.", akkaRpcActor.rpcEndpoint.getEndpointId());
+                               
LoggerFactory.getLogger(akkaRpcActor.rpcEndpoint.getClass()).error(errorMsg, 
throwable);

Review comment:
       Same here.




----------------------------------------------------------------
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]


Reply via email to