save topology description to disk
This commit is contained in:
parent
2c383041b5
commit
0d81650400
1 changed files with 9 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import java.time.Duration
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
import kotlin.coroutines.CoroutineContext
|
import kotlin.coroutines.CoroutineContext
|
||||||
import kotlin.coroutines.cancellation.CancellationException
|
import kotlin.coroutines.cancellation.CancellationException
|
||||||
|
import kotlin.io.path.Path
|
||||||
import kotlinx.coroutines.CoroutineName
|
import kotlinx.coroutines.CoroutineName
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
|
@ -92,10 +93,17 @@ internal class KafkatorioTopology(
|
||||||
})
|
})
|
||||||
|
|
||||||
val description: TopologyDescription = topology.describe()
|
val description: TopologyDescription = topology.describe()
|
||||||
|
|
||||||
|
val descFile = Path("./build/$appId.txt").toFile().apply {
|
||||||
|
parentFile.mkdirs()
|
||||||
|
if (!exists()) createNewFile()
|
||||||
|
writeText(description.toString())
|
||||||
|
}
|
||||||
|
|
||||||
println(
|
println(
|
||||||
"""
|
"""
|
||||||
|----------------
|
|----------------
|
||||||
|$appId
|
|$appId - ${descFile.canonicalPath}
|
||||||
|$description
|
|$description
|
||||||
|----------------
|
|----------------
|
||||||
""".trimMargin()
|
""".trimMargin()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue