hanishakoneru commented on a change in pull request #1494:
URL: https://github.com/apache/ozone/pull/1494#discussion_r670744405



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
##########
@@ -273,106 +483,6 @@ private OMResponse processReply(OMRequest omRequest, 
RaftClientReply reply)
     }
   }
 
-
-  /**
-   * Returns an OM Ratis server.
-   * @param conf configuration
-   * @param om the OM instance starting the ratis server
-   * @param raftGroupIdStr raft group id string
-   * @param localRaftPeerId raft peer id of this Ratis server
-   * @param addr address of the ratis server
-   * @param raftPeers peer nodes in the raft ring
-   * @throws IOException
-   */
-  @SuppressWarnings({"parameternumber", "java:S107"})
-  private OzoneManagerRatisServer(ConfigurationSource conf,
-      OzoneManager om,
-      String raftGroupIdStr, RaftPeerId localRaftPeerId,
-      InetSocketAddress addr, List<RaftPeer> raftPeers,
-      SecurityConfig secConfig, CertificateClient certClient)
-      throws IOException {
-    this.ozoneManager = om;
-    this.omRatisAddress = addr;
-    this.port = addr.getPort();
-    RaftProperties serverProperties = newRaftProperties(conf);
-
-    this.raftPeerId = localRaftPeerId;
-    this.raftGroupId = RaftGroupId.valueOf(
-        getRaftGroupIdFromOmServiceId(raftGroupIdStr));
-    this.raftGroup = RaftGroup.valueOf(raftGroupId, raftPeers);
-
-    StringBuilder raftPeersStr = new StringBuilder();
-    for (RaftPeer peer : raftPeers) {
-      raftPeersStr.append(", ").append(peer.getAddress());
-    }
-    LOG.info("Instantiating OM Ratis server with GroupID: {} and " +
-        "Raft Peers: {}", raftGroupIdStr, 
raftPeersStr.toString().substring(2));
-
-    this.omStateMachine = getStateMachine(conf);
-
-    Parameters parameters = createServerTlsParameters(secConfig, certClient);
-    this.server = RaftServer.newBuilder()
-        .setServerId(this.raftPeerId)
-        .setGroup(this.raftGroup)
-        .setProperties(serverProperties)
-        .setParameters(parameters)
-        .setStateMachine(omStateMachine)
-        .build();
-  }
-
-  /**
-   * Creates an instance of OzoneManagerRatisServer.
-   */
-  public static OzoneManagerRatisServer newOMRatisServer(
-      ConfigurationSource ozoneConf, OzoneManager omProtocol,
-      OMNodeDetails omNodeDetails, List<OMNodeDetails> peerNodes,
-      SecurityConfig secConfig, CertificateClient certClient)
-      throws IOException {
-
-    // RaftGroupId is the omServiceId
-    String omServiceId = omNodeDetails.getServiceId();
-
-    String omNodeId = omNodeDetails.getNodeId();
-    RaftPeerId localRaftPeerId = RaftPeerId.getRaftPeerId(omNodeId);
-
-    InetSocketAddress ratisAddr = new InetSocketAddress(
-        omNodeDetails.getInetAddress(), omNodeDetails.getRatisPort());
-
-    RaftPeer localRaftPeer = RaftPeer.newBuilder()
-        .setId(localRaftPeerId)
-        .setAddress(ratisAddr)
-        .build();
-
-    List<RaftPeer> raftPeers = new ArrayList<>();
-    // Add this Ratis server to the Ratis ring
-    raftPeers.add(localRaftPeer);

Review comment:
       @bharatviswa504, in old code too, local OM node is added to raftPeers 
list. 




-- 
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]

Reply via email to