-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Quick start instructions and generalize $HOME path #6
base: master
Are you sure you want to change the base?
Conversation
tests/usecase.py
Outdated
broker2 = KafkaBrokerApp(cluster, conf, kafka_path='/home/maglun/src/kafka') | ||
broker3 = KafkaBrokerApp(cluster, conf, kafka_path='/home/maglun/src/kafka') | ||
# Multiple Kafka brokers | ||
conf = {'version': '2.2.0', 'replication_factor': 3, 'num_partitions': 4, 'kafka_path': kafka_dir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With version specified (binary download) we dont need kafka_path (source tree), right?
Can you fix the conflicts? |
|
||
# Directory for cloning Apache Kafka sources to. | ||
# It will only be used if 'version' is not specified. | ||
# Otherwise Apache Kafka binary distrubution will be downloaded to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Otherwise Apache Kafka binary distrubution will be downloaded to | |
# Otherwise Apache Kafka binary distribution will be downloaded to |
broker2 = KafkaBrokerApp(cluster, conf, kafka_path='/home/maglun/src/kafka') | ||
broker3 = KafkaBrokerApp(cluster, conf, kafka_path='/home/maglun/src/kafka') | ||
# Multiple Kafka brokers | ||
conf = {'version': '2.2.0', 'replication_factor': 3, 'num_partitions': 4} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use 3.3.1, 2.2.0 is quite old now
|
||
if __name__ == '__main__': | ||
cluster = Cluster('TestCluster', 'tmp') | ||
|
||
# One ZK | ||
zk1 = ZookeeperApp(cluster, bin_path='/home/maglun/src/kafka/bin/zookeeper-server-start.sh') | ||
zk1 = ZookeeperApp(cluster, bin_path=os.path.join(kafka_dir, '/bin/zookeeper-server-start.sh')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can safely remove bin_path here too.
in fact, I don't think the use-case needs to show off local source dir at all, so you can remove kafka_dir up top too.
With these changes, I'm able to start my cluster.
Previously there was an error about the unknown argument 'kafka_path' in KafkaBrokerApp constructor.
The only thing I changed: by default, it will start with Kafka broker 2.2.0 (binary distribution) instead of cloning and building Kafka sources. I hope it will not disrupt the way you are used to working with this testing framework. But on the other hand, it will help new users start quickly.