MINOR: Fix a startup NPE in BrokerServer
Reviewers: Colin P. McCabe
@@ -170,12 +170,13 @@ class BrokerServer(
logDirFailureChannel = new LogDirFailureChannel(config.logDirs.size)
+ metadataCache = MetadataCache.kRaftMetadataCache(config.nodeId)
+
// Create log manager, but don't start it because we need to delay any potential unclean shutdown log recovery
// until we catch up on the metadata log and have up-to-date topic and broker configs.
logManager = LogManager(config, initialOfflineDirs, metadataCache, kafkaScheduler, time,
brokerTopicStats, logDirFailureChannel, keepPartitionMetadataFile = true)
- metadataCache = MetadataCache.kRaftMetadataCache(config.nodeId)
// Enable delegation token cache for all SCRAM mechanisms to simplify dynamic update.
// This keeps the cache up-to-date if new SCRAM mechanisms are enabled dynamically.
tokenCache = new DelegationTokenCache(ScramMechanism.mechanismNames)
