rondagostino commented on a change in pull request #11606:
URL: https://github.com/apache/kafka/pull/11606#discussion_r770558946



##########
File path: 
core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala
##########
@@ -67,6 +68,14 @@ abstract class KafkaServerTestHarness extends 
QuorumTestHarness {
    */
   def generateConfigs: Seq[KafkaConfig]
 
+  /**
+   * It is sometimes useful to keep the same log.dirs configuration value; 
override this method if that is desired
+   *
+   * @param priorConfigs the prior configs
+   * @return the new generated configs
+   */
+  def regenerateConfigs(priorConfigs: Seq[KafkaConfig]): Seq[KafkaConfig] = 
generateConfigs
+

Review comment:
       > a simpler way of doing this where subclasses who want the old configs 
just do super.generateConfigs and then modify what that function returns
   
   The `generateConfigs()` method is abstract, so `super.generateConfigs` isn't 
there.  The real issue here is that the class generally doesn't specify it's 
log directory -- that's typically auto-generated.  So if we generate configs a 
second time we get a new log directory, and typically we don't want a new one 
-- we want to keep the old one.  So we need the prior generated configs in 
order to know that.




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


Reply via email to