You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by zh...@apache.org on 2017/05/18 12:06:36 UTC
ranger git commit: RANGER-1545:The associated AUDIT database
configuration has been removed in enable_hive_plugin.sh. But the
corresponding code has not been deleted. We should remove redundant code to
keep consistency.
Repository: ranger
Updated Branches:
refs/heads/master a8a0b5533 -> b08baf923
RANGER-1545:The associated AUDIT database configuration has been removed in enable_hive_plugin.sh. But the corresponding code has not been deleted. We should remove redundant code to keep consistency.
Signed-off-by: zhangqiang2 <zh...@zte.com.cn>
Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/b08baf92
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/b08baf92
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/b08baf92
Branch: refs/heads/master
Commit: b08baf923d1f24434f79edeccc68de2103340275
Parents: a8a0b55
Author: zhangqiang2 <zh...@zte.com.cn>
Authored: Wed Apr 26 01:46:19 2017 -0400
Committer: zhangqiang2 <zh...@zte.com.cn>
Committed: Thu May 18 08:01:30 2017 -0400
----------------------------------------------------------------------
agents-common/scripts/enable-agent.sh | 48 ------------------------------
1 file changed, 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ranger/blob/b08baf92/agents-common/scripts/enable-agent.sh
----------------------------------------------------------------------
diff --git a/agents-common/scripts/enable-agent.sh b/agents-common/scripts/enable-agent.sh
index 57278b4..76ba8f0 100755
--- a/agents-common/scripts/enable-agent.sh
+++ b/agents-common/scripts/enable-agent.sh
@@ -399,54 +399,6 @@ then
chmod a+rx ${POLICY_CACHE_FILE_PATH}
chown -R ${CFG_OWNER_INF} /etc/${PROJ_NAME}/${REPO_NAME}
-
- #
- # We need to do the AUDIT JDBC url
- #
-db_flavor=''
-db_flavor=`echo $(getInstallProperty 'XAAUDIT.DB.FLAVOUR') | tr '[:lower:]' '[:upper:]'`
-if [ "${db_flavor}" != "" ]
-then
- audit_db_hostname=$(getInstallProperty 'XAAUDIT.DB.HOSTNAME')
- audit_db_name=$(getInstallProperty 'XAAUDIT.DB.DATABASE_NAME')
-
- if [ "${db_flavor}" = "MYSQL" ]
- then
- export XAAUDIT_DB_JDBC_URL="jdbc:mysql://${audit_db_hostname}/${audit_db_name}"
- export XAAUDIT_DB_JDBC_DRIVER="com.mysql.jdbc.Driver"
- elif [ "${db_flavor}" = "ORACLE" ]
- then
- count=$(grep -o ":" <<< "$audit_db_hostname" | wc -l)
- #if [[ ${count} -eq 2 ]] ; then
- if [ ${count} -eq 2 ] || [ ${count} -eq 0 ]; then
- #jdbc:oracle:thin:@[HOST][:PORT]:SID or #jdbc:oracle:thin:@GL
- newPropertyValue="jdbc:oracle:thin:@${audit_db_hostname}"
- else
- #jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE
- newPropertyValue="jdbc:oracle:thin:@//${audit_db_hostname}"
- fi
- export XAAUDIT_DB_JDBC_URL=${newPropertyValue}
- export XAAUDIT_DB_JDBC_DRIVER="oracle.jdbc.OracleDriver"
- elif [ "${db_flavor}" = "POSTGRES" ]
- then
- export XAAUDIT_DB_JDBC_URL="jdbc:postgresql://${audit_db_hostname}/${audit_db_name}"
- export XAAUDIT_DB_JDBC_DRIVER="org.postgresql.Driver"
- elif [ "${db_flavor}" = "MSSQL" ]
- then
- export XAAUDIT_DB_JDBC_URL="jdbc:sqlserver://${audit_db_hostname};databaseName=${audit_db_name}"
- export XAAUDIT_DB_JDBC_DRIVER="com.microsoft.sqlserver.jdbc.SQLServerDriver"
- elif [ "${db_flavor}" = "SQLA" ]
- then
- export XAAUDIT_DB_JDBC_URL="jdbc:sqlanywhere:database=${audit_db_name};host=${audit_db_hostname}"
- export XAAUDIT_DB_JDBC_DRIVER="sap.jdbc4.sqlanywhere.IDriver"
- else
- echo "Audit is not specified with a valid db_flavor: [${db_flavor}]. Ignoring audit ..."
- export XAAUDIT_DB_JDBC_URL="jdbc:${db_flavor}://${audit_db_hostname}/${audit_db_name}"
- export XAAUDIT_DB_JDBC_DRIVER="com.unknown.driver.${db_flavor}"
- fi
-fi
-
-
for f in ${PROJ_INSTALL_DIR}/install/conf.templates/${action}/*.cfg
do
if [ -f "${f}" ]