timmylicheng commented on a change in pull request #1652:
URL: https://github.com/apache/ozone/pull/1652#discussion_r535134176
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/StorageContainerLocationProtocolServerSideTranslatorPB.java
##########
@@ -133,9 +133,7 @@ private boolean isLeader() throws ServiceException {
public ScmContainerLocationResponse submitRequest(RpcController controller,
ScmContainerLocationRequest request) throws ServiceException {
if (!isLeader()) {
- return ScmContainerLocationResponse.newBuilder()
-
.setCmdType(request.getCmdType()).setTraceID(request.getTraceID())
- .setSuccess(false).setStatus(Status.SCM_NOT_LEADER).build();
+ throw new ServiceException(new IOException("SCM IS NOT LEADER"));
Review comment:
Shall we expose scm names or ipadress for the current SCM in the
exception message?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]