Last active
July 12, 2016 17:43
-
-
Save jacoelho/194b70a11e234b175febb6522b8dd780 to your computer and use it in GitHub Desktop.
topic first step
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| property :topic, String, name_property: true | |
| property :partitions, Fixnum, default: 3 | |
| property :replicas, Fixnum, default: 3 | |
| property :zookeeper, String, default: "localhost:2181" | |
| property :directory, String, default: "/kafka" | |
| action :create do | |
| cmd = %W( | |
| #{directory}/bin/kafka-topics.sh | |
| --zookeeper #{zookeeper} | |
| --create | |
| --topic #{topic} | |
| --replication-factor #{replicas} | |
| --partitions #{partitions} | |
| ).join(" ") | |
| result = shell_out(cmd) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment