timyuer opened a new pull request, #1030:
URL: https://github.com/apache/bigtop/pull/1030
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/BIGTOP/How+to+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'BIGTOP-3638: Your PR title ...'.
-->
### Description of PR
This is a stack-tools for bigtop-ambari-mpack.
### How was this patch tested?
1. Test for dry-run-set
```bash
[root@ambari-server opt]# python /usr/lib/bigtop-select/conf-select
dry-run-set --package zookeeper --stack-version 3.2.0 --conf-version 1
/usr/bigtop/3.2.0/usr/lib/zookeeper/conf
```
2. Test for dry-run-create
```bash
[root@ambari-server opt]# python /usr/lib/bigtop-select/conf-select
dry-run-create --package zookeeper --stack-version 3.2.0 --conf-version 1
/usr/bigtop/3.2.0/etc/zookeeper/conf.dist.1
```
3. Test for create-conf-dir
```bash
[root@ambari-server opt]# python /usr/lib/bigtop-select/conf-select
create-conf-dir --package zookeeper --stack-version 3.2.0 --conf-version 4
/usr/bigtop/3.2.0/etc/zookeeper/conf.dist.4
[root@ambari-server opt]# ll /usr/bigtop/3.2.0/etc/zookeeper/
total 0
drwxr-xr-x 3 zookeeper hadoop 128 Oct 2 08:33 conf.dist
drwxr-xr-x 2 root root 6 Oct 2 09:10 conf.dist.1
drwxr-xr-x 2 root root 6 Oct 2 09:35 conf.dist.2
drwxr-xr-x 2 root root 6 Oct 2 09:46 conf.dist.3
drwxr-xr-x 2 root root 6 Oct 3 02:29 conf.dist.4
```
4. Test for set-conf-dir
```bash
[root@ambari-server opt]# python /usr/lib/bigtop-select/conf-select
set-conf-dir --package zookeeper --stack-version 3.2.0 --conf-version 4
/usr/bigtop/3.2.0/usr/lib/zookeeper/conf -> /etc/zookeeper/conf
alternatives --install /etc/zookeeper/conf zookeeper-conf
/usr/bigtop/3.2.0/etc/zookeeper/conf.dist.4 30
/etc/zookeeper/conf -> /usr/bigtop/3.2.0/etc/zookeeper/conf.dist.4
[root@ambari-server opt]# ll /etc/alternatives/zookeeper-conf
lrwxrwxrwx 1 root root 43 Oct 3 02:30 /etc/alternatives/zookeeper-conf ->
/usr/bigtop/3.2.0/etc/zookeeper/conf.dist.4
[root@ambari-server opt]# ll /etc/zookeeper/conf
lrwxrwxrwx 1 root root 32 Oct 3 02:31 /etc/zookeeper/conf ->
/etc/alternatives/zookeeper-conf
[root@ambari-server opt]# ll /usr/bigtop/3.2.0/usr/lib/zookeeper/conf
lrwxrwxrwx 1 root root 19 Oct 3 02:31
/usr/bigtop/3.2.0/usr/lib/zookeeper/conf -> /etc/zookeeper/conf
```
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'BIGTOP-3638. Your PR title ...')?
- [ ] Make sure that newly added files do not have any licensing issues.
When in doubt refer to https://www.apache.org/licenses/
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]