Github user interma commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1206#discussion_r108580756
--- Diff: ranger-plugin/scripts/enable-ranger-plugin.sh ---
@@ -211,6 +211,28 @@ function update_ranger_url() {
echo "Updated POLICY_MGR_URL to ${policy_mgr_url} in ${prop_file}"
}
+function update_java_home() {
+ local jdk64="/usr/jdk64"
+ local java_sdk="/etc/alternatives/java_sdk"
+
+ if [[ -d ${jdk64} ]]; then
+ local DIR_NAME=$(ls ${jdk64} | sort -r | head -1)
+ if [[ ${DIR_NAME} ]]; then
+ JAVA_HOME_DIR="${jdk64}/${DIR_NAME}"
+ fi
+ elif [[ -d ${java_sdk} ]]; then
+ JAVA_HOME_DIR="${java_sdk}"
+ fi
+
+ if [[ ${JAVA_HOME_DIR} ]]; then
+ local prop_file=$(dirname ${SCRIPT_DIR})/etc/rps.properties
+ sed -i -e "s|/usr/java/default|${JAVA_HOME_DIR}|g" ${prop_file}
--- End diff --
Seems no `/usr/java/default` existed in rps.properties?
I refer
here:https://github.com/apache/incubator-hawq/blob/master/ranger-plugin/conf/rps.properties
Is there something wrong?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---