You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by yao lei <le...@163.com> on 2023/03/08 05:41:03 UTC

Review Request 74340: RANGER-4124 Value of -Dlogback.configurationFile in ranger-tagsync-services.sh is not configurable

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74340/
-----------------------------------------------------------

Review request for ranger.


Bugs: RANGER-4124
    https://issues.apache.org/jira/browse/RANGER-4124


Repository: ranger


Description
-------

In file ranger-tagsync-services.sh, we can find -Dlogback.configurationFile not configurable as below:
nohup java -Dproc_rangertagsync ${JAVA_OPTS} -Dlogdir="${RANGER_TAGSYNC_LOG_DIR}" -Dlogback.configurationFile=file:/etc/ranger/tagsync/conf/logback.xml -cp "${cp}" org.apache.ranger.tagsync.process.TagSynchronizer  > ${RANGER_TAGSYNC_LOG_DIR}/tagsync.out 2>&1 &

Like usersync, suggest adding variable TAGSYNC_CONF_DIR and set -Dlogback.configurationFile=file:${TAGSYNC_CONF_DIR}/logback.xml


Diffs
-----

  tagsync/scripts/ranger-tagsync-services.sh 46f4428e3 
  tagsync/scripts/setup.py 6ac30565f 


Diff: https://reviews.apache.org/r/74340/diff/1/


Testing
-------

1 Run ./setup.sh successfully 
2 cat conf/ranger-tagsync-env-confdir.sh
export TAGSYNC_CONF_DIR=/etc/ranger/tagsync/conf
3 ps -ef | grep org.apache.ranger.tagsync.process.TagSynchronizer
root   18220     1  0 10:44 ?        00:00:06 java -Dproc_rangertagsync -XX:MetaspaceSize=100m -XX:MaxMetaspaceSize=200m -Xmx1g -Xms1g -Dlogdir=/var/log/ranger/tagsync -Dlogback.configurationFile=file:/etc/ranger/tagsync/conf/logback.xml -cp /usr/lib/ranger-tagsync/conf:/usr/lib/ranger-tagsync/dist/*:/usr/lib/ranger-tagsync/lib/*:/etc/hadoop/conf/* org.apache.ranger.tagsync.process.TagSynchronizer

4 vi conf/ranger-tagsync-env-confdir.sh
export TAGSYNC_CONF_DIR=/usr/lib/ranger-tagsync/conf
5 ./ranger-tagsync-services.sh stop & start
6 root     29718     1  1 11:49 pts/3    00:00:04 java -Dproc_rangertagsync -XX:MetaspaceSize=100m -XX:MaxMetaspaceSize=200m -Xmx1g -Xms1g -Dlogdir=/var/log/ranger/tagsync -Dlogback.configurationFile=file:/usr/lib/ranger-tagsync/conf/logback.xml -cp /usr/lib/ranger-tagsync/conf:/usr/lib/ranger-tagsync/dist/*:/usr/lib/ranger-tagsync/lib/*:/etc/hadoop/conf/* org.apache.ranger.tagsync.process.TagSynchronizer


Thanks,

yao lei