eubnara commented on code in PR #3354:
URL: https://github.com/apache/ambari/pull/3354#discussion_r958373556
##########
ambari-server/src/main/java/org/apache/ambari/server/events/publishers/AgentCommandsPublisher.java:
##########
@@ -111,7 +111,10 @@ public void sendAgentCommand(Multimap<Long, AgentCommand>
agentCommands) throws
if (!clusterDesiredConfigs.containsKey(clusterId)) {
clusterDesiredConfigs.put(clusterId,
clusters.getCluster(clusterId).getDesiredConfigs());
}
- } catch (NumberFormatException|AmbariException ignored) {}
+ } catch (NumberFormatException|AmbariException e) {
+ LOG.error("Exception on sendAgentCommand", e);
+ throw new RuntimeException(e);
Review Comment:
I think `RuntimeException` or `AmbariRuntimeException` will be handled on
`ActionScheduler#run`.
(https://github.com/apache/ambari/blob/branch-2.7/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java#L352-L354)
So, I just changed `RuntimeException` to `AmbariRuntimeException`.
If you want to use `AmbariException`, many changes are needed.
Isn't it the right way to use `AmbariRuntimeException` instaed of
`AmbariException`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]