ChenSammi commented on code in PR #3382:
URL: https://github.com/apache/ozone/pull/3382#discussion_r873408778
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OMInterServiceProtocolServerSideImpl.java:
##########
@@ -60,7 +64,7 @@ public BootstrapOMResponse bootstrap(RpcController controller,
.build();
}
- checkLeaderStatus();
+ OzoneManagerRatisUtils.checkLeaderStatus(ozoneManager);
Review Comment:
All protocol service API need throws ServiceException, while
ozoneManager.checkLeaderStatus throws OMNotLeaderException and
OMLeaderNotReadyException. So we need OzoneManagerRatisUtils.checkLeaderStatus
wrapper to covert exceptions.
ozoneManager.checkLeaderStatus is used both in SASL path authentication and
protocol level authentication. It throws the core exception. Let the caller
wrap the core exception into desired outer exceptions.
--
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]