MINOR: Fix a startup NPE in BrokerServer (#10989)

Reviewers: Colin P. McCabe <cmccabe@apache.org>
This commit is contained in:
David Arthur 2021-07-07 14:51:13 -04:00 committed by GitHub
parent 862f814cc3
commit 61b6539517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

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