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/02/16 23:14:13 UTC
[kafka] branch trunk updated: Fixed README and added clearer error
message. (#10133)
This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new fb7da1a Fixed README and added clearer error message. (#10133)
fb7da1a is described below
commit fb7da1a245ff24a3d538e011ab3ec4e96ef86d28
Author: Justine Olshan <jo...@confluent.io>
AuthorDate: Tue Feb 16 18:12:29 2021 -0500
Fixed README and added clearer error message. (#10133)
The script `test-raft-server-start.sh` requires the config to be specified with `--config`. I've included this in the README and added an error message for this specific case.
Reviewers: Jason Gustafson <ja...@confluent.io>
---
core/src/main/scala/kafka/tools/TestRaftServer.scala | 4 ++++
raft/README.md | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/core/src/main/scala/kafka/tools/TestRaftServer.scala b/core/src/main/scala/kafka/tools/TestRaftServer.scala
index 0a83fd9..2d6dd67 100644
--- a/core/src/main/scala/kafka/tools/TestRaftServer.scala
+++ b/core/src/main/scala/kafka/tools/TestRaftServer.scala
@@ -26,6 +26,7 @@ import kafka.raft.{KafkaRaftManager, RaftManager}
import kafka.security.CredentialProvider
import kafka.server.{KafkaConfig, KafkaRequestHandlerPool, MetaProperties}
import kafka.utils.{CommandDefaultOptions, CommandLineUtils, CoreUtils, Exit, Logging, ShutdownableThread}
+import org.apache.kafka.common.errors.InvalidConfigurationException
import org.apache.kafka.common.metrics.Metrics
import org.apache.kafka.common.metrics.stats.Percentiles.BucketSizing
import org.apache.kafka.common.metrics.stats.{Meter, Percentile, Percentiles}
@@ -419,6 +420,9 @@ object TestRaftServer extends Logging {
"Standalone raft server for performance testing")
val configFile = opts.options.valueOf(opts.configOpt)
+ if (configFile == null) {
+ throw new InvalidConfigurationException("Missing configuration file. Should specify with '--config'")
+ }
val serverProps = Utils.loadProps(configFile)
// KafkaConfig requires either `process.roles` or `zookeeper.connect`. Neither are
diff --git a/raft/README.md b/raft/README.md
index 4d51323..35d3969 100644
--- a/raft/README.md
+++ b/raft/README.md
@@ -9,7 +9,7 @@ we have a standalone test server which can be used for performance testing.
Below we describe the details to set this up.
### Run Single Quorum ###
- bin/test-raft-server-start.sh config/raft.properties
+ bin/test-raft-server-start.sh --config config/raft.properties
### Run Multi Node Quorum ###
Create 3 separate raft quorum properties as the following: