-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72750/
-----------------------------------------------------------
Review request for ranger, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, and
Ramesh Mani.
Bugs: RANGER-2945
https://issues.apache.org/jira/browse/RANGER-2945
Repository: ranger
Description
-------
Since Presto service allows not to set password, when constructing
`HadoopConfigHolder`, we need to check whether `RANGER_LOGIN_PASSWORD` is set.
If it is not set, we need to set it to null in `connectionProperties` in order
to make the password in `dataSource2HadoopConfigHolder` be updated. Otherwise,
when we set the password in the Presto service, the static variable
`dataSource2HadoopConfigHolder` will store the password. If we change the
password in the Presto service to empty, if we do not check the
`RANGER_LOGIN_PASSWORD`, the old password stored in
`dataSource2HadoopConfigHolder` will never be updated, causing the presto
client connection to fail.
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/client/HadoopConfigHolder.java
a065a8db7
Diff: https://reviews.apache.org/r/72750/diff/1/
Testing
-------
First, set the password in the presto service, and then set the password to
empty, the password stored in dataSource2HadoopConfigHolder can be successfully
updated to null.
Thanks,
Jiayi Liu