-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59618/
-----------------------------------------------------------
(Updated May 28, 2017, 5:28 a.m.)
Review request for ranger, Ankita Sinha, Don Bosco Durai, Abhay Kulkarni,
Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
Bugs: RANGER-1620
https://issues.apache.org/jira/browse/RANGER-1620
Repository: ranger
Description
-------
Fixed the kafka-ranger-env.sh script by not relying on the $0 variable.
Diffs
-----
plugin-kafka/conf/kafka-ranger-env.sh
232e31c0a68a38a2bcfc345bb987cf3dfdde4479
Diff: https://reviews.apache.org/r/59618/diff/1/
Testing
-------
Tested on a cluster with Ranger and Kafka and ensured that when the script is
sourced it does not give any error.
Manual testing of script:
1. With no CLASSPATH set:
[root@instance-5 ~]# echo $CLASSPATH
[root@instance-5 ~]# . /etc/kafka/conf/kafka-ranger-env.sh
[root@instance-5 ~]# echo $CLASSPATH
:/etc/kafka/conf:/usr/hdp/current/hadoop-hdfs-client/*:/usr/hdp/current/hadoop-hdfs-client/lib/*:/etc/hadoop/conf
2. With CLASSPATH already set to some value:
[root@instance-5 ~]# export CLASSPATH="a"
[root@instance-5 ~]# echo $CLASSPATH
a
[root@instance-5 ~]# . /etc/kafka/conf/kafka-ranger-env.sh
[root@instance-5 ~]# echo $CLASSPATH
a:/etc/kafka/conf:/usr/hdp/current/hadoop-hdfs-client/*:/usr/hdp/current/hadoop-hdfs-client/lib/*:/etc/hadoop/conf
Thanks,
Gautam Borad