You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/01/15 03:05:35 UTC

[GitHub] [ozone] symious commented on a change in pull request #1776: HDDS-4289. Throw exception from hadoop2 filesystem jar in HA environment

symious commented on a change in pull request #1776:
URL: https://github.com/apache/ozone/pull/1776#discussion_r557833774



##########
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:
       @elek Thanks for the comment.
   
   Can reproduce the error by the following steps:
   1. Prepare an OM-HA cluster.
   2. Prepare the config files in HADOOP_CONF_DIR, including the core-site.xml and the ozone-site.xml.
   3. Run the command of "hdfs dfs -ls o3fs://bucket.volume.cluster1/" on a follower OM. The client would get the NotLeaderExecption.
   4. Run the command of "hdfs dfs -ls o3fs://bucket.volume.cluster1/" on the leader OM. The client would get normal result.
   5. Run the command of "hdfs dfs -ls o3fs://bucket.volume.cluster1/" on other servers. The client would be retring to connect to "0.0.0.0:9862".
   
   When Hadoop27RpcTransport is trying to initialize the socket to OM, client would use the config of "ozone.om.address", and for an OM-HA cluster, this value should be default as "0.0.0.0". 
   So when client initialize the proxy on a follower OM host, it will try to connect to the follower OM, and an NotLeaderException will be thrown. And if the client is on the leader server, the proxy would be successfully created and no exceptions should be thrown. And If the client is on other servers, it will try to connect to the local OM, while on OM is running, so the client would be retrying to connect "0.0.0.0:9862".




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org