Owen-CH-Leung commented on PR #13909:
URL: https://github.com/apache/kafka/pull/13909#issuecomment-1791810020

   @mjsax Thanks. It really clarifies a lot!
   
   I've modified the code to allow overriding default value for `state.dir` by 
setting the system property `kafka.streams.state.dir`. So in `build.gradle`, if 
we set the following: 
   
   ```shell
   task genStreamsConfigDocs(type: JavaExec) {
       classpath = sourceSets.main.runtimeClasspath
       mainClass = 'org.apache.kafka.streams.StreamsConfig'
       if( !generatedDocsDir.exists() ) { generatedDocsDir.mkdirs() }
       standardOutput = new File(generatedDocsDir, 
"streams_config.html").newOutputStream()
       systemProperty 'kafka.streams.state.dir', '/some/random/path'
     }
   ```
   
   then the output html page will have the default value shown as 
`/some/random/path`. If we set it as empty string, the output will be an empty 
string also. If not set, the default logic 
`System.getProperty("java.io.tmpdir") + File.separator + "kafka-streams"` will 
be applied
   
   Let me know what you think. Thanks!


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