muralibasani commented on code in PR #16325:
URL: https://github.com/apache/kafka/pull/16325#discussion_r1672845320


##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -698,6 +663,42 @@ object StorageTool extends Logging {
     voterSet
   }
 
+  def createStandaloneVoterMap(config: KafkaConfig): util.Map[ListenerName, 
InetSocketAddress] = {
+    val advertisedListenerEndpoints = 
config.effectiveAdvertisedControllerListeners
+    val listeners: util.Map[ListenerName, InetSocketAddress] = new 
util.HashMap()
+    advertisedListenerEndpoints.foreach(endpoint => {
+      val host: String = endpoint.host
+      listeners.put(endpoint.listenerName, new InetSocketAddress(host, 
endpoint.port))
+    })
+    listeners
+  }
+
+  private def parseControllerQuorumVotersMap(controllerQuorumVoterMap: 
util.Map[Integer, InetSocketAddress],
+                           metaProperties: MetaProperties,
+                           config: KafkaConfig): util.Map[ListenerName, 
InetSocketAddress] = {

Review Comment:
   From the kip description 
   "When the format command is executed with this option it will read the 
node.id configured in the properties file specified by the --config option and 
compare it against the <replica-id> specified in --controller-quorum-voters. If 
there is a match, it will write the <replica-directory-id> specified to the 
directory.id property in the meta.properties for the metadata.log.dir 
directory."
   
   I tried adding the if condition 
   if (metaProperties.nodeId().getAsInt == replicaId) ) 
   
   in the method 
   
   May be am wrong. Can you pls suggest code maybe?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to