chia7712 commented on code in PR #15745:
URL: https://github.com/apache/kafka/pull/15745#discussion_r1569310965


##########
core/src/test/java/kafka/testkit/TestKitNodes.java:
##########
@@ -82,6 +82,10 @@ public Builder setNumBrokerNodes(int numBrokerNodes) {
             return setBrokerNodes(numBrokerNodes, 1);
         }
 
+        public Builder setNumBrokerNodes(int numBrokerNodes, int 
disksPerBroker) {

Review Comment:
   why we need this method? it is equal to `setBrokerNodes`



##########
core/src/test/java/kafka/test/ClusterConfig.java:
##########
@@ -155,29 +161,31 @@ public ClusterConfig copyOf() {
     }
 
     public static Builder defaultClusterBuilder() {
-        return new Builder(Type.ZK, 1, 1, true, SecurityProtocol.PLAINTEXT, 
MetadataVersion.latestTesting());
+        return new Builder(Type.ZK, 1, 1, 1, true, SecurityProtocol.PLAINTEXT, 
MetadataVersion.latestTesting());
     }
 
-    public static Builder clusterBuilder(Type type, int brokers, int 
controllers, boolean autoStart,
+    public static Builder clusterBuilder(Type type, int brokers, int 
controllers, int disksPerBroker, boolean autoStart,
                                          SecurityProtocol securityProtocol, 
MetadataVersion metadataVersion) {
-        return new Builder(type, brokers, controllers, autoStart, 
securityProtocol, metadataVersion);
+        return new Builder(type, brokers, controllers, disksPerBroker, 
autoStart, securityProtocol, metadataVersion);
     }
 
     public static class Builder {
         private Type type;
         private int brokers;
         private int controllers;
+        private int disksPerBroker;
         private String name;
         private boolean autoStart;
         private SecurityProtocol securityProtocol;
         private String listenerName;
         private File trustStoreFile;
         private MetadataVersion metadataVersion;
 
-        Builder(Type type, int brokers, int controllers, boolean autoStart, 
SecurityProtocol securityProtocol, MetadataVersion metadataVersion) {
+        Builder(Type type, int brokers, int controllers, int disksPerBroker, 
boolean autoStart, SecurityProtocol securityProtocol, MetadataVersion 
metadataVersion) {

Review Comment:
   Could we call setters instead of having a complicated constructor? We should 
not waste the build pattern ... this is unrelated to this PR, and it already 
have a jira (https://issues.apache.org/jira/browse/KAFKA-16560). However, we 
can do a bit refactor here.



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