Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asashnov
Copy link

@asashnov asashnov commented Apr 9, 2019

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.

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}
Copy link
Owner

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?

@edenhill
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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}
Copy link
Owner

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'))
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants