Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. ### Create
  2. Note:
  3. ```bash
  4. bin/kafka-topics.sh --zookeeper 127.0.0.1:8081,127.0.0.1:8082,127.0.0.1:8083 --create --topic test2 --partitions 6 --replication-factor 1
  5. ```
  6.  
  7. ```bash
  8. bin/kafka-topics.sh --zookeeper 127.0.0.1:8081 --create --topic test-rep-one --partitions 6 --replication-factor 1
  9. ```
  10. ```bash
  11. bin/kafka-topics.sh --zookeeper 127.0.0.1:8081 --create --topic test-rep-two --partitions 6 --replication-factor 3
  12. ```
  13.  
  14. ### List
  15. ```bash
  16. bin/kafka-topics.sh --list --zookeeper 127.0.0.1:8081
  17. ```
  18.  
  19. ### Delete
  20. ```bash
  21. bin/kafka-topics.sh --zookeeper 127.0.0.1:8081 --delete --topic test-rep-one
  22. ```
  23.  
  24. ### In broker
  25. ```bash
  26. bin/kafka-topics.sh --describe --zookeeper 127.0.0.1:8081 --topic test-rep-one
  27. ```
  28. ```bash
  29. bin/kafka-topics.sh --describe --zookeeper 127.0.0.1:8081 --topic test-rep-two
  30. ```
  31.  
  32. ### Single thread, no replication
  33. ```
  34. KAFKA_HEAP_OPTS="-Xmx6G" bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-one --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=127.0.0.1:9094,127.0.0.1:9095,127.0.0.1:9096 buffer.memory=67108864 batch.size=8196
  35. ```
  36.  
  37. ### Single-thread, async 3x replication
  38. ```
  39. KAFKA_HEAP_OPTS="-Xmx6G" bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-two --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=127.0.0.1:9094 acks=1 buffer.memory=67108864 batch.size=8196
  40. ```
  41.  
  42. ### Single-thread, sync 3x replication
  43. ```
  44. KAFKA_HEAP_OPTS="-Xmx6G" bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-two --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=127.0.0.1:9094 acks=-1 buffer.memory=67108864 batch.size=8196
  45. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement