You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jg...@apache.org on 2021/03/08 21:08:42 UTC
[kafka] branch 2.8 updated: MINOR: Refer users to
`kafka-storage.sh` if `meta.properties` is missing (#10279)
This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch 2.8
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.8 by this push:
new 65da1b1 MINOR: Refer users to `kafka-storage.sh` if `meta.properties` is missing (#10279)
65da1b1 is described below
commit 65da1b164baee78426e1cf2ee1e9781158c43c8a
Author: Jason Gustafson <ja...@confluent.io>
AuthorDate: Mon Mar 8 13:04:46 2021 -0800
MINOR: Refer users to `kafka-storage.sh` if `meta.properties` is missing (#10279)
The KIP-500 server requires users to run `kafka-storage.sh` to format log directories before the server will start. If the directory is not formatted, the error message complains about a missing `meta.properties` file. It is useful for the message to refer users to `kafka-storage.sh` directly since formatting is a new requirement.
This patch also reduces the log level of a very spammy log message in `BrokerLifecycleManager`.
Reviewers: Colin P. McCabe <cm...@apache.org>
---
core/src/main/scala/kafka/server/BrokerLifecycleManager.scala | 4 ++--
core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/core/src/main/scala/kafka/server/BrokerLifecycleManager.scala b/core/src/main/scala/kafka/server/BrokerLifecycleManager.scala
index 64c9200..b15fc1c 100644
--- a/core/src/main/scala/kafka/server/BrokerLifecycleManager.scala
+++ b/core/src/main/scala/kafka/server/BrokerLifecycleManager.scala
@@ -372,10 +372,10 @@ class BrokerLifecycleManager(val config: KafkaConfig,
_state = BrokerState.RECOVERY
initialCatchUpFuture.complete(null)
} else {
- info(s"The broker is STARTING. Still waiting to catch up with cluster metadata.")
+ debug(s"The broker is STARTING. Still waiting to catch up with cluster metadata.")
}
// Schedule the heartbeat after only 10 ms so that in the case where
- //there is no recovery work to be done, we start up a bit quicker.
+ // there is no recovery work to be done, we start up a bit quicker.
scheduleNextCommunication(NANOSECONDS.convert(10, MILLISECONDS))
case BrokerState.RECOVERY =>
if (!message.data().isFenced()) {
diff --git a/core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala b/core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala
index e3d5c4b..49e033d 100755
--- a/core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala
+++ b/core/src/main/scala/kafka/server/BrokerMetadataCheckpoint.scala
@@ -171,7 +171,8 @@ object BrokerMetadataCheckpoint extends Logging {
brokerMetadataMap += logDir -> properties
case None =>
if (!ignoreMissing) {
- throw new KafkaException(s"No `meta.properties` found in $logDir")
+ throw new KafkaException(s"No `meta.properties` found in $logDir " +
+ "(have you run `kafka-storage.sh` to format the directory?)")
}
}
} catch {