Which command shows the replication factor and partition count for a topic named 'my-first-topic'?

Study for the CCDAK Apache Kafka Test. Dive into comprehensive flashcards and multiple choice questions with detailed hints and explanations. Ensure your readiness for the exam with our targeted practice efforts!

Multiple Choice

Which command shows the replication factor and partition count for a topic named 'my-first-topic'?

Explanation:
Describing a topic is how you pull its metadata, including how many partitions it has and the replication factor for those partitions. To obtain that information, you must run the command with the describe option and specify the topic name. The command that connects to the cluster via Zookeeper and asks for a description of the topic my-first-topic is the one that will display those details. Its output includes lines that show the partition count and the replication factor, which is exactly what you’re looking for. Other options won’t provide those details in the same way: listing topics just shows names, not partition/replication metadata. Using describe with a bootstrap-server also works in many setups, but the Zookeeper-based describe form is the one highlighted here and yields the required information.

Describing a topic is how you pull its metadata, including how many partitions it has and the replication factor for those partitions. To obtain that information, you must run the command with the describe option and specify the topic name.

The command that connects to the cluster via Zookeeper and asks for a description of the topic my-first-topic is the one that will display those details. Its output includes lines that show the partition count and the replication factor, which is exactly what you’re looking for.

Other options won’t provide those details in the same way: listing topics just shows names, not partition/replication metadata. Using describe with a bootstrap-server also works in many setups, but the Zookeeper-based describe form is the one highlighted here and yields the required information.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy