Repository: incubator-ranger
Updated Branches:
  refs/heads/master 83b6a0a03 -> 73b22d3eb


RANGER-453: Change db flavor input parameter value from SQLSERVER to MSSQL


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/73b22d3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/73b22d3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/73b22d3e

Branch: refs/heads/master
Commit: 73b22d3eba0b150907349ecfed39136f1d4bf772
Parents: 83b6a0a
Author: Velmurugan Periasamy <[email protected]>
Authored: Mon May 4 12:43:59 2015 -0400
Committer: Velmurugan Periasamy <[email protected]>
Committed: Mon May 4 12:43:59 2015 -0400

----------------------------------------------------------------------
 agents-common/scripts/enable-agent.sh     | 2 +-
 hbase-agent/scripts/install.sh            | 2 +-
 hdfs-agent/scripts/install.sh             | 2 +-
 hive-agent/scripts/install.sh             | 2 +-
 kms/scripts/db_setup.py                   | 2 +-
 kms/scripts/dba_script.py                 | 6 +++---
 kms/scripts/install.properties            | 2 +-
 kms/scripts/setup.sh                      | 4 ++--
 knox-agent/scripts/install.sh             | 2 +-
 plugin-kms/scripts/enable-kms-plugin.sh   | 2 +-
 security-admin/scripts/db_setup.py        | 4 ++--
 security-admin/scripts/dba_script.py      | 8 ++++----
 security-admin/scripts/install.properties | 2 +-
 security-admin/scripts/setup.sh           | 5 +++--
 security-admin/src/bin/ranger_install.py  | 4 ++--
 storm-agent/scripts/install.sh            | 2 +-
 16 files changed, 26 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/agents-common/scripts/enable-agent.sh
----------------------------------------------------------------------
diff --git a/agents-common/scripts/enable-agent.sh 
b/agents-common/scripts/enable-agent.sh
index a880850..62cde71 100755
--- a/agents-common/scripts/enable-agent.sh
+++ b/agents-common/scripts/enable-agent.sh
@@ -354,7 +354,7 @@ then
        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}" = "SQLSERVER" ]
+       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"

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/hbase-agent/scripts/install.sh
----------------------------------------------------------------------
diff --git a/hbase-agent/scripts/install.sh b/hbase-agent/scripts/install.sh
index a24f535..8190603 100644
--- a/hbase-agent/scripts/install.sh
+++ b/hbase-agent/scripts/install.sh
@@ -300,7 +300,7 @@ then
        newPropertyValue="org.postgresql.Driver"
        updatePropertyToFile $propertyName $newPropertyValue $to_file
 fi
-if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+if [ "${DB_FLAVOR}" == "MSSQL" ]
 then
        audit_db_hostname=`grep '^XAAUDIT.DB.HOSTNAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`
        audit_db_name=`grep '^XAAUDIT.DB.DATABASE_NAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/hdfs-agent/scripts/install.sh
----------------------------------------------------------------------
diff --git a/hdfs-agent/scripts/install.sh b/hdfs-agent/scripts/install.sh
index a0f6547..2afd030 100644
--- a/hdfs-agent/scripts/install.sh
+++ b/hdfs-agent/scripts/install.sh
@@ -307,7 +307,7 @@ then
        newPropertyValue="org.postgresql.Driver"
        updatePropertyToFile $propertyName $newPropertyValue $to_file
 fi
-if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+if [ "${DB_FLAVOR}" == "MSSQL" ]
 then
        audit_db_hostname=`grep '^XAAUDIT.DB.HOSTNAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`
        audit_db_name=`grep '^XAAUDIT.DB.DATABASE_NAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/hive-agent/scripts/install.sh
----------------------------------------------------------------------
diff --git a/hive-agent/scripts/install.sh b/hive-agent/scripts/install.sh
index 27c4e06..6798a3c 100644
--- a/hive-agent/scripts/install.sh
+++ b/hive-agent/scripts/install.sh
@@ -284,7 +284,7 @@ then
        newPropertyValue="org.postgresql.Driver"
        updatePropertyToFile $propertyName $newPropertyValue $to_file
 fi
-if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+if [ "${DB_FLAVOR}" == "MSSQL" ]
 then
        audit_db_hostname=`grep '^XAAUDIT.DB.HOSTNAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`
        audit_db_name=`grep '^XAAUDIT.DB.DATABASE_NAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/kms/scripts/db_setup.py
----------------------------------------------------------------------
diff --git a/kms/scripts/db_setup.py b/kms/scripts/db_setup.py
index eaf72ac..792327b 100644
--- a/kms/scripts/db_setup.py
+++ b/kms/scripts/db_setup.py
@@ -463,7 +463,7 @@ def main(argv):
                xa_sqlObj = PostgresConf(xa_db_host, POSTGRES_CONNECTOR_JAR, 
JAVA_BIN)
                xa_db_core_file = os.path.join(RANGER_KMS_HOME , 
postgres_core_file)
 
-       elif XA_DB_FLAVOR == "SQLSERVER":
+       elif XA_DB_FLAVOR == "MSSQL":
                SQLSERVER_CONNECTOR_JAR = globalDict['SQL_CONNECTOR_JAR']
                xa_sqlObj = SqlServerConf(xa_db_host, SQLSERVER_CONNECTOR_JAR, 
JAVA_BIN)
                xa_db_core_file = os.path.join(RANGER_KMS_HOME , 
sqlserver_core_file)

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/kms/scripts/dba_script.py
----------------------------------------------------------------------
diff --git a/kms/scripts/dba_script.py b/kms/scripts/dba_script.py
index e1a253a..0749038 100644
--- a/kms/scripts/dba_script.py
+++ b/kms/scripts/dba_script.py
@@ -962,7 +962,7 @@ def main(argv):
        else:
                XA_DB_FLAVOR=''
                while XA_DB_FLAVOR == "":
-                       log("Enter db flavour{MYSQL|ORACLE|POSTGRES|SQLSERVER} 
:","info")
+                       log("Enter db flavour{MYSQL|ORACLE|POSTGRES|MSSQL} 
:","info")
                        XA_DB_FLAVOR=raw_input()
 
        XA_DB_FLAVOR = XA_DB_FLAVOR.upper()
@@ -971,7 +971,7 @@ def main(argv):
        if (quiteMode):
                CONNECTOR_JAR=globalDict['SQL_CONNECTOR_JAR']
        else:
-               if XA_DB_FLAVOR == "MYSQL" or XA_DB_FLAVOR == "ORACLE" or 
XA_DB_FLAVOR == "POSTGRES" or XA_DB_FLAVOR == "SQLSERVER":
+               if XA_DB_FLAVOR == "MYSQL" or XA_DB_FLAVOR == "ORACLE" or 
XA_DB_FLAVOR == "POSTGRES" or XA_DB_FLAVOR == "MSSQL":
                        log("Enter JDBC connector file for 
:"+XA_DB_FLAVOR,"info")
                        CONNECTOR_JAR=raw_input()
                        while os.path.isfile(CONNECTOR_JAR) == False:
@@ -1059,7 +1059,7 @@ def main(argv):
                xa_sqlObj = PostgresConf(xa_db_host, POSTGRES_CONNECTOR_JAR, 
JAVA_BIN)
                xa_db_core_file = os.path.join(os.getcwd(),postgres_core_file)
 
-       elif XA_DB_FLAVOR == "SQLSERVER":
+       elif XA_DB_FLAVOR == "MSSQL":
                SQLSERVER_CONNECTOR_JAR=CONNECTOR_JAR
                xa_sqlObj = SqlServerConf(xa_db_host, SQLSERVER_CONNECTOR_JAR, 
JAVA_BIN)
                xa_db_core_file = os.path.join(os.getcwd(),sqlserver_core_file)

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/kms/scripts/install.properties
----------------------------------------------------------------------
diff --git a/kms/scripts/install.properties b/kms/scripts/install.properties
index 0785ade..0059787 100644
--- a/kms/scripts/install.properties
+++ b/kms/scripts/install.properties
@@ -23,7 +23,7 @@
 
 PYTHON_COMMAND_INVOKER=python
 
-#DB_FLAVOR=MYSQL|ORACLE|POSTGRES|SQLSERVER
+#DB_FLAVOR=MYSQL|ORACLE|POSTGRES|MSSQL
 DB_FLAVOR=MYSQL
 #
 # The executable path to be used to invoke command-line MYSQL 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/kms/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/setup.sh b/kms/scripts/setup.sh
index 0abfd2b..229ff33 100755
--- a/kms/scripts/setup.sh
+++ b/kms/scripts/setup.sh
@@ -245,7 +245,7 @@ sanity_check_files() {
             log "[E] ${postgres_core_file} does not exists" ; exit 1;
         fi
     fi
-    if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+    if [ "${DB_FLAVOR}" == "MSSQL" ]
     then
         if test -f ${sqlserver_core_file}; then
                        log "[I] ${sqlserver_core_file} file found"
@@ -358,7 +358,7 @@ update_properties() {
                updatePropertyToFilePy $propertyName $newPropertyValue $to_file
 
        fi
-       if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+       if [ "${DB_FLAVOR}" == "MSSQL" ]
        then
                propertyName=ranger.ks.jpa.jdbc.url
                
newPropertyValue="jdbc:sqlserver://${DB_HOST};databaseName=${db_name}"

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/knox-agent/scripts/install.sh
----------------------------------------------------------------------
diff --git a/knox-agent/scripts/install.sh b/knox-agent/scripts/install.sh
index 7462462..2255eac 100644
--- a/knox-agent/scripts/install.sh
+++ b/knox-agent/scripts/install.sh
@@ -203,7 +203,7 @@ then
        newPropertyValue="org.postgresql.Driver"
        updatePropertyToFile $propertyName $newPropertyValue $to_file
 fi
-if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+if [ "${DB_FLAVOR}" == "MSSQL" ]
 then
        audit_db_hostname=`grep '^XAAUDIT.DB.HOSTNAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`
        audit_db_name=`grep '^XAAUDIT.DB.DATABASE_NAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/plugin-kms/scripts/enable-kms-plugin.sh
----------------------------------------------------------------------
diff --git a/plugin-kms/scripts/enable-kms-plugin.sh 
b/plugin-kms/scripts/enable-kms-plugin.sh
index 4e5789a..70d03a3 100644
--- a/plugin-kms/scripts/enable-kms-plugin.sh
+++ b/plugin-kms/scripts/enable-kms-plugin.sh
@@ -350,7 +350,7 @@ then
        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}" = "SQLSERVER" ]
+       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"

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/security-admin/scripts/db_setup.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/db_setup.py 
b/security-admin/scripts/db_setup.py
index e7d0a17..6590eb2 100644
--- a/security-admin/scripts/db_setup.py
+++ b/security-admin/scripts/db_setup.py
@@ -1225,7 +1225,7 @@ def main(argv):
                xa_patch_file = os.path.join(RANGER_ADMIN_HOME , 
postgres_patches)
                audit_patch_file = os.path.join(RANGER_ADMIN_HOME 
,postgres_auditdb_patches)
 
-       elif XA_DB_FLAVOR == "SQLSERVER":
+       elif XA_DB_FLAVOR == "MSSQL":
                SQLSERVER_CONNECTOR_JAR = globalDict['SQL_CONNECTOR_JAR']
                xa_sqlObj = SqlServerConf(xa_db_host, SQLSERVER_CONNECTOR_JAR, 
JAVA_BIN)
                xa_db_version_file = os.path.join(RANGER_ADMIN_HOME 
,sqlserver_dbversion_catalog)
@@ -1251,7 +1251,7 @@ def main(argv):
                audit_sqlObj = PostgresConf(audit_db_host, 
POSTGRES_CONNECTOR_JAR, JAVA_BIN)
                audit_db_file = os.path.join(RANGER_ADMIN_HOME , 
postgres_audit_file)
 
-       elif AUDIT_DB_FLAVOR == "SQLSERVER":
+       elif AUDIT_DB_FLAVOR == "MSSQL":
                SQLSERVER_CONNECTOR_JAR = globalDict['SQL_CONNECTOR_JAR']
                audit_sqlObj = SqlServerConf(audit_db_host, 
SQLSERVER_CONNECTOR_JAR, JAVA_BIN)
                audit_db_file = os.path.join(RANGER_ADMIN_HOME , 
sqlserver_audit_file)

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/security-admin/scripts/dba_script.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/dba_script.py 
b/security-admin/scripts/dba_script.py
index 964501d..9dfba94 100644
--- a/security-admin/scripts/dba_script.py
+++ b/security-admin/scripts/dba_script.py
@@ -1162,7 +1162,7 @@ def main(argv):
        else:
                XA_DB_FLAVOR=''
                while XA_DB_FLAVOR == "":
-                       log("Enter db flavour{MYSQL|ORACLE|POSTGRES|SQLSERVER} 
:","info")
+                       log("Enter db flavour{MYSQL|ORACLE|POSTGRES|MSSQL} 
:","info")
                        XA_DB_FLAVOR=raw_input()
                        AUDIT_DB_FLAVOR = XA_DB_FLAVOR
 
@@ -1173,7 +1173,7 @@ def main(argv):
        if (quiteMode):
                CONNECTOR_JAR=globalDict['SQL_CONNECTOR_JAR']
        else:
-               if XA_DB_FLAVOR == "MYSQL" or XA_DB_FLAVOR == "ORACLE" or 
XA_DB_FLAVOR == "POSTGRES" or XA_DB_FLAVOR == "SQLSERVER":
+               if XA_DB_FLAVOR == "MYSQL" or XA_DB_FLAVOR == "ORACLE" or 
XA_DB_FLAVOR == "POSTGRES" or XA_DB_FLAVOR == "MSSQL":
                        log("Enter JDBC connector file for 
:"+XA_DB_FLAVOR,"info")
                        CONNECTOR_JAR=raw_input()
                        while os.path.isfile(CONNECTOR_JAR) == False:
@@ -1326,7 +1326,7 @@ def main(argv):
                xa_db_core_file = 
os.path.join(RANGER_ADMIN_HOME,postgres_core_file)
                xa_patch_file = os.path.join(RANGER_ADMIN_HOME,postgres_patches)
 
-       elif XA_DB_FLAVOR == "SQLSERVER":
+       elif XA_DB_FLAVOR == "MSSQL":
                #SQLSERVER_CONNECTOR_JAR = globalDict['SQL_CONNECTOR_JAR']
                #SQLSERVER_CONNECTOR_JAR='/usr/share/java/sqljdbc4-2.0.jar'
                SQLSERVER_CONNECTOR_JAR=CONNECTOR_JAR
@@ -1363,7 +1363,7 @@ def main(argv):
                audit_sqlObj = PostgresConf(audit_db_host, 
POSTGRES_CONNECTOR_JAR, JAVA_BIN)
                audit_db_file = 
os.path.join(RANGER_ADMIN_HOME,postgres_audit_file)
 
-       elif AUDIT_DB_FLAVOR == "SQLSERVER":
+       elif AUDIT_DB_FLAVOR == "MSSQL":
                #SQLSERVER_CONNECTOR_JAR = globalDict['SQL_CONNECTOR_JAR']
                #SQLSERVER_CONNECTOR_JAR='/usr/share/java/sqljdbc4-2.0.jar'
                SQLSERVER_CONNECTOR_JAR=CONNECTOR_JAR

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/security-admin/scripts/install.properties
----------------------------------------------------------------------
diff --git a/security-admin/scripts/install.properties 
b/security-admin/scripts/install.properties
index c2d896f..5dd1f41 100644
--- a/security-admin/scripts/install.properties
+++ b/security-admin/scripts/install.properties
@@ -23,7 +23,7 @@
 
 PYTHON_COMMAND_INVOKER=python
 
-#DB_FLAVOR=MYSQL|ORACLE|POSTGRES|SQLSERVER
+#DB_FLAVOR=MYSQL|ORACLE|POSTGRES|MSSQL
 DB_FLAVOR=MYSQL
 #
 # The executable path to be used to invoke command-line MYSQL 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/security-admin/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/security-admin/scripts/setup.sh b/security-admin/scripts/setup.sh
index 14378cb..77ca819 100755
--- a/security-admin/scripts/setup.sh
+++ b/security-admin/scripts/setup.sh
@@ -292,7 +292,7 @@ sanity_check_files() {
             log "[E] ${postgres_core_file} does not exists" ; exit 1;
         fi
     fi
-    if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+    if [ "${DB_FLAVOR}" == "MSSQL" ]
     then
         if test -f ${sqlserver_core_file}; then
                        log "[I] ${sqlserver_core_file} file found"
@@ -843,7 +843,8 @@ update_properties() {
                newPropertyValue="org.postgresql.Driver"
                updatePropertyToFilePy $propertyName $newPropertyValue 
$to_file_ranger
        fi
-       if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+
+       if [ "${DB_FLAVOR}" == "MSSQL" ]
        then
                propertyName=ranger.jpa.jdbc.url
                
newPropertyValue="jdbc:sqlserver://${DB_HOST};databaseName=${db_name}"

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/security-admin/src/bin/ranger_install.py
----------------------------------------------------------------------
diff --git a/security-admin/src/bin/ranger_install.py 
b/security-admin/src/bin/ranger_install.py
index ed1e251..a3c7836 100644
--- a/security-admin/src/bin/ranger_install.py
+++ b/security-admin/src/bin/ranger_install.py
@@ -283,7 +283,7 @@ def init_variables(switch):
                 f = re.match("^ojdbc.*?.jar",filename)
             elif os.getenv("RANGER_DB_FLAVOR") == "POSTGRES" or 
os.getenv("RANGER_AUDIT_DB_FLAVOR") == "POSTGRES":    
                 f = re.match("^postgresql-connector-jdbc.*?.jar",filename)    
-            elif os.getenv("RANGER_DB_FLAVOR") == "SQLSERVER" or 
os.getenv("RANGER_AUDIT_DB_FLAVOR") == "SQLSERVER":
+            elif os.getenv("RANGER_DB_FLAVOR") == "MSSQL" or 
os.getenv("RANGER_AUDIT_DB_FLAVOR") == "MSSQL":
                 f = re.match("^sqljdbc.*?.jar",filename)    
             if f:
                 src = os.path.join(layout_dir,filename)
@@ -832,7 +832,7 @@ def update_properties():
         updatePropertyToFilePy(propertyName ,newPropertyValue ,to_file_ranger)
        
 
-    elif RANGER_DB_FLAVOR == "SQLSERVER":
+    elif RANGER_DB_FLAVOR == "MSSQL":
         propertyName="ranger.jpa.jdbc.url"
         newPropertyValue="jdbc:sqlserver://%s;databaseName=%s" %(MYSQL_HOST, 
db_name)
         updatePropertyToFilePy(propertyName ,newPropertyValue ,to_file_ranger)

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/73b22d3e/storm-agent/scripts/install.sh
----------------------------------------------------------------------
diff --git a/storm-agent/scripts/install.sh b/storm-agent/scripts/install.sh
index 2c0992e..d006379 100644
--- a/storm-agent/scripts/install.sh
+++ b/storm-agent/scripts/install.sh
@@ -246,7 +246,7 @@ then
        newPropertyValue="org.postgresql.Driver"
        updatePropertyToFile $propertyName $newPropertyValue $to_file
 fi
-if [ "${DB_FLAVOR}" == "SQLSERVER" ]
+if [ "${DB_FLAVOR}" == "MSSQL" ]
 then
        audit_db_hostname=`grep '^XAAUDIT.DB.HOSTNAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`
        audit_db_name=`grep '^XAAUDIT.DB.DATABASE_NAME'  
${install_dir}/install.properties | awk -F= '{ print $2 }'`

Reply via email to