DBZ-1358 Avoiding instantiation of SystemTime

This commit is contained in:
Gunnar Morling 2019-06-28 08:05:56 +02:00
parent a0df2c140b
commit 254dba97ee

View File

@ -11,7 +11,7 @@
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Supplier; import java.util.function.Supplier;
import org.apache.kafka.common.utils.SystemTime; import org.apache.kafka.common.utils.Time;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -215,7 +215,7 @@ public synchronized KafkaServer startup() {
// Start the server ... // Start the server ...
try { try {
LOGGER.debug("Starting Kafka broker {} at {} with storage in {}", brokerId, getConnection(), logsDir.getAbsolutePath()); LOGGER.debug("Starting Kafka broker {} at {} with storage in {}", brokerId, getConnection(), logsDir.getAbsolutePath());
server = new kafka.server.KafkaServer(new KafkaConfig(config), new SystemTime(), scala.Option.apply(null), server = new kafka.server.KafkaServer(new KafkaConfig(config), Time.SYSTEM, scala.Option.apply(null),
new scala.collection.mutable.ArraySeq<>(0)); new scala.collection.mutable.ArraySeq<>(0));
server.startup(); server.startup();
LOGGER.info("Started Kafka server {} at {} with storage in {}", brokerId, getConnection(), logsDir.getAbsolutePath()); LOGGER.info("Started Kafka server {} at {} with storage in {}", brokerId, getConnection(), logsDir.getAbsolutePath());