> On 五月 13, 2017, 1:46 p.m., Velmurugan Periasamy wrote:
> > embeddedwebserver/scripts/ranger-admin-services.sh
> > Lines 71 (patched)
> > <https://reviews.apache.org/r/59255/diff/1/?file=1717758#file1717758line71>
> >
> >     Users can set RANGER_PID_DIR_PATH if they don't want to use default 
> > path. So what is the need for an additional variable?
> 
> pengjianhua wrote:
>     This function is perfect if user independently use our ranger. 
>     There is defect for ranger when they integrate Ranger into the big data 
> platform or business systems to uniform install and run Ranger. These systems 
> require services to support multiple instances, that is, the same service can 
> been run multiple instances in the same node. These systems need to 
> dynamically change the pid file path to avoid conflicts when they run 
> service. They hope that ranger also has the ability to dynamically change the 
> pid path at startup. 
>     We should meet this need by minor modifications without affecting the 
> current function and logic.
> 
> Colm O hEigeartaigh wrote:
>     I think it would be better if we kept the functionality of 
> RANGER_PID_DIR_PATH as it is, but instead used RANGER_ADMIN_PID_NAME or 
> something which would default to "rangeradmin.pid". So if you want to 
> customise it you can change the path via RANGER_PID_DIR_PATH and the filename 
> via RANGER_ADMIN_PID_NAME.
> 
> Gautam Borad wrote:
>     +1 for Colm's suggestions.
> 
> Qiang Zhang wrote:
>     +1 for Colm's suggestions.

The RANGER_PID_DIR_PATH variable was set when installing Ranger Admin. So the 
value for RANGER_PID_DIR_PATH variable can not be changed after install Ranger 
Admin. The user can only change the pid name and can not change the path 
according to Colm's opinion.
1. The value for RANGER_PID_DIR_PATH was writed to 
./ews/webapp/WEB-INF/classes/conf/ranger-admin-env-piddir.sh file when 
installing Ranger Admin.
2. Get the value for RANGER_PID_DIR_PATH through following code when run Ranger 
Admin service.
for custom_env_script in `find 
${XAPOLICYMGR_DIR}/ews/webapp/WEB-INF/classes/conf/ -name "ranger-admin-env*"`; 
do
        if [ -f $custom_env_script ]; then
                . $custom_env_script
        fi
done

Hi Colm, Do you have better opinion? Thanks!


- pengjianhua


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


On 五月 13, 2017, 7:14 a.m., pengjianhua wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59255/
> -----------------------------------------------------------
> 
> (Updated 五月 13, 2017, 7:14 a.m.)
> 
> 
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O 
> hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan 
> Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
> 
> 
> Bugs: RANGER-1575
>     https://issues.apache.org/jira/browse/RANGER-1575
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Some users hope that the pid file of the Ranger Admin can be unified 
> management when they integrate Ranger into the big data platform or business 
> systems to uniform install and run Ranger.
> We should support the need in the case of compatibility with existing logic. 
> When running ranger, users can set the pid file to meet their own needs.
> 
> We will explicitly document this change in the next release.
> 
> 
> Diffs
> -----
> 
>   embeddedwebserver/scripts/ranger-admin-services.sh a81219b 
> 
> 
> Diff: https://reviews.apache.org/r/59255/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> pengjianhua
> 
>

Reply via email to