private void printTopicInfo(final SourceDescription source) {
final String timestamp = source.getTimestamp().isEmpty()
? "Not set - using <ROWTIME>"
: source.getTimestamp();
writer().println(String.format("%-20s : %s", "Key field", source.getKey()));
writer().println(String.format("%-20s : %s", "Key format", "STRING"));
writer().println(String.format("%-20s : %s", "Timestamp field", timestamp));
writer().println(String.format("%-20s : %s", "Value format", source.getFormat()));
if (!source.getTopic().isEmpty()) {
writer().println(String.format(
"%-20s : %s (partitions: %d, replication: %d)",
"Kafka topic",
source.getTopic(),
source.getPartitions(),
source.getReplication()
));
}
}