elek commented on a change in pull request #1776:
URL: https://github.com/apache/ozone/pull/1776#discussion_r557493249
##########
File path:
hadoop-ozone/ozonefs-hadoop2/src/main/java/org/apache/hadoop/fs/ozone/Hadoop27RpcTransport.java
##########
@@ -67,6 +69,12 @@ public OMResponse submitRequest(OMRequest payload) throws
IOException {
try {
return proxy.submitRequest(NULL_RPC_CONTROLLER, payload);
} catch (ServiceException e) {
+ OMNotLeaderException notLeaderException =
Review comment:
Not sure about this one, but not tested. Do we really get a
`NotLeaderExecption` if a simple client tries to access an HA OM node? I think
there is a chance to connect directly to the leader, and in that case the
exception can be different.
Or am I wrong?
It may be better to throw this exception
Another approach is using `OmUtils.isOmHAServiceId(conf, omHost)`. For
example, we can override `OzoneClientAdapter createAdapter(ConfigurationSource
conf, String omHost, int omPort)` in the `ozonefs-hadoop2` version of
`RootedOzFs` and `OzFs`. After checking the HA config whith this utlity we can
call the parent implementation (if not HA)
----------------------------------------------------------------
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]