ctubbsii commented on a change in pull request #316: Add support for ZooKeeper
3.5
URL: https://github.com/apache/fluo-muchos/pull/316#discussion_r372164137
##########
File path: lib/muchos/config/base.py
##########
@@ -73,8 +73,8 @@
'worker_data_dirs': None,
'zookeeper_connect': "{% for host in groups['zookeepers'] %}{{ host
}}:2181{% if not loop.last %},{% endif %}{% endfor %}",
'zookeeper_client_port': '"2181"',
- 'zookeeper_home': '"{{ install_dir }}/zookeeper-{{ zookeeper_version }}"',
- 'zookeeper_tarball': 'zookeeper-{{ zookeeper_version }}.tar.gz',
+ 'zookeeper_home': "{% if zookeeper_version.startswith('3.5') %}{{
install_dir }}/apache-zookeeper-{{ zookeeper_version }}-bin{% else %}{{
install_dir }}/zookeeper-{{ zookeeper_version }}{% endif %}",
+ 'zookeeper_tarball': "{% if zookeeper_version.startswith('3.5')
%}apache-zookeeper-{{ zookeeper_version }}-bin.tar.gz{% else %}zookeeper-{{
zookeeper_version }}.tar.gz{% endif %}",
Review comment:
Since the part that is different here is the same that is different in the
`zookeeper_home` variable, it might make sense to put that in a new variable
that can be injected into these two.
Not sure if this would work, but maybe something like:
```suggestion
'zk_naming': "{% if zookeeper_version.startswith('3.5')
%}apache-zookeeper-{{ zookeeper_version }}-bin{% else %}zookeeper-{{
zookeeper_version }}{% endif %}",
'zookeeper_home': "{{ install_dir }}/{{ zk_naming }}",
'zookeeper_tarball': "{{ zk_naming }}.tar.gz",
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services