You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by rm...@apache.org on 2014/11/02 07:11:48 UTC
git commit: Argus 148:Ranger Hive Plugin to update conf.server for
Hive to support Ambari Installation
Repository: incubator-argus
Updated Branches:
refs/heads/master c62c5e165 -> 83d004358
Argus 148:Ranger Hive Plugin to update conf.server for Hive to support
Ambari Installation
Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/83d00435
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/83d00435
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/83d00435
Branch: refs/heads/master
Commit: 83d004358c3ee4993f29c3c75581ff5bb21c78d5
Parents: c62c5e1
Author: rmani <rm...@hortonworks.com>
Authored: Sat Nov 1 23:10:42 2014 -0700
Committer: rmani <rm...@hortonworks.com>
Committed: Sat Nov 1 23:10:42 2014 -0700
----------------------------------------------------------------------
agents-common/scripts/enable-agent.sh | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/83d00435/agents-common/scripts/enable-agent.sh
----------------------------------------------------------------------
diff --git a/agents-common/scripts/enable-agent.sh b/agents-common/scripts/enable-agent.sh
index 37ee161..d2f7792 100755
--- a/agents-common/scripts/enable-agent.sh
+++ b/agents-common/scripts/enable-agent.sh
@@ -140,6 +140,16 @@ then
exit 1
fi
+ambari_hive_install="N"
+if [ "${HCOMPONENT_NAME}" = "hive" ]
+then
+ HCOMPONENT_CONF_SERVER_DIR="${HCOMPONENT_CONF_DIR}"/../conf.server
+ if [ -d "${HCOMPONENT_CONF_SERVER_DIR}" ]
+ then
+ ambari_hive_install="Y"
+ fi
+fi
+
#
# Common functions used by all enable/disable scripts
#
@@ -348,6 +358,22 @@ then
then
cat ${newfn} > ${fullpathorgfn}
fi
+
+ # For Ambari install copy the .xml to conf.server also
+ if [ "${ambari_hive_install}" = "Y" ]
+ then
+ fullpathorgHS2fn="${HCOMPONENT_CONF_SERVER_DIR}/${orgfn}"
+ archiveHS2fn="${HCOMPONENT_CONF_SERVER_DIR}/.${orgfn}.${dt}"
+ newHS2fn="${HCOMPONENT_CONF_SERVER_DIR}/.${orgfn}-new.${dt}"
+ log "Saving current conf.server file: ${fullpathorgHS2fn} to ${archiveHS2fn} ..."
+ if [ -f ${fullpathorgHS2fn} ]
+ then
+ cp ${fullpathorgHS2fn} ${archiveHS2fn}
+ fi
+ cp ${fullpathorgfn} ${HCOMPONENT_CONF_SERVER_DIR}/${orgfn}
+ chown ${CFG_OWNER_INF} ${HCOMPONENT_CONF_SERVER_DIR}/${orgfn}
+ fi
+
else
echo "ERROR: Unable to make changes to config. file: ${fullpathorgfn}"
echo "exiting ...."