File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -199,10 +199,10 @@ Kafka stores streams of data in *topics*. You can use the `kafka-topics.sh` util
199
199
* **To create a topic**, use the following command in the SSH connection:
200
200
201
201
```bash
202
- /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --create --replication-factor 3 --partitions 8 --topic test --zookeeper $KAFKAZKHOSTS
202
+ /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --create --replication-factor 3 --partitions 8 --topic test --bootstrap-server $KAFKABROKERS
203
203
```
204
204
205
- This command connects to Zookeeper using the host information stored in `$KAFKAZKHOSTS `. It then creates an Apache Kafka topic named **test**.
205
+ This command connects to Broker using the host information stored in `$KAFKABROKERS `. It then creates an Apache Kafka topic named **test**.
206
206
207
207
* Data stored in this topic is partitioned across eight partitions.
208
208
@@ -227,15 +227,15 @@ Kafka stores streams of data in *topics*. You can use the `kafka-topics.sh` util
227
227
* **To list topics**, use the following command:
228
228
229
229
```bash
230
- /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --list --zookeeper $KAFKAZKHOSTS
230
+ /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --list --bootstrap-server $KAFKABROKERS
231
231
```
232
232
233
233
This command lists the topics available on the Apache Kafka cluster.
234
234
235
235
* **To delete a topic**, use the following command:
236
236
237
237
```bash
238
- /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --delete --topic topicname --zookeeper $KAFKAZKHOSTS
238
+ /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --delete --topic topicname --bootstrap-server $KAFKABROKERS
239
239
```
240
240
241
241
This command deletes the topic named `topicname`.
You can’t perform that action at this time.
0 commit comments