Parcourir la source

HDDS-145. Freon times out because of because of wrong ratis port number in datanode details. Contributed by Mukul Kumar Singh.

Xiaoyu Yao il y a 7 ans
Parent
commit
ea7b53fb44

+ 2 - 2
hadoop-hdds/common/src/main/java/org/apache/ratis/RatisHelper.java

@@ -49,12 +49,12 @@ public interface RatisHelper {
 
   static String toRaftPeerIdString(DatanodeDetails id) {
     return id.getUuidString() + "_" +
-        id.getPort(DatanodeDetails.Port.Name.RATIS);
+        id.getPort(DatanodeDetails.Port.Name.RATIS).getValue();
   }
 
   static String toRaftPeerAddressString(DatanodeDetails id) {
     return id.getIpAddress() + ":" +
-        id.getPort(DatanodeDetails.Port.Name.RATIS);
+        id.getPort(DatanodeDetails.Port.Name.RATIS).getValue();
   }
 
   static RaftPeerId toRaftPeerId(DatanodeDetails id) {