Repository: ambari Updated Branches: refs/heads/branch-2.6 77786e4c7 -> f8d30d85f
AMBARI-21882. Throw an error if unsupported database JDBC driver is configured for HDP services. (stoader) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f8d30d85 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f8d30d85 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f8d30d85 Branch: refs/heads/branch-2.6 Commit: f8d30d85f84aa509694107f86077331d99fc4ce8 Parents: 77786e4 Author: Toader, Sebastian <stoa...@hortonworks.com> Authored: Fri Sep 8 11:39:10 2017 +0200 Committer: Toader, Sebastian <stoa...@hortonworks.com> Committed: Fri Sep 8 11:39:10 2017 +0200 ---------------------------------------------------------------------- .../HIVE/test_jdbc_driver_config.py | 17 ----------------- .../RANGER/test_db_flavor_config.py | 19 +------------------ .../RANGER_KMS/test_db_flavor_config.py | 19 +------------------ .../SQOOP/test_jdbc_driver_config.py | 19 +------------------ .../common-services/configs/sqoop_default.json | 4 ++++ .../configs/sqoop_unsupported_jdbc_driver.json | 4 ++++ 6 files changed, 11 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d30d85/ambari-server/src/test/python/common-services/HIVE/test_jdbc_driver_config.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/HIVE/test_jdbc_driver_config.py b/ambari-server/src/test/python/common-services/HIVE/test_jdbc_driver_config.py index e4d81b1..fb4e526 100644 --- a/ambari-server/src/test/python/common-services/HIVE/test_jdbc_driver_config.py +++ b/ambari-server/src/test/python/common-services/HIVE/test_jdbc_driver_config.py @@ -44,23 +44,6 @@ class TestJdbcDriverConfig(RMFTestCase): stack_version=self.STACK_VERSION, config_file=os.path.join(self.CONFIG_DIR, "hive_unsupported_jdbc_type.json")) - def test_jdbc_type_2_1_0_3_0(self): - self.executeScript("HIVE/2.1.0.3.0/package/scripts/hive_server.py", - classname="HiveServer", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "hive_default.json")) - - def test_unsupported_jdbc_type_throws_error_2_1_0_3_0(self): - with self.assertRaises(Fail): - self.executeScript("HIVE/2.1.0.3.0/package/scripts/hive_server.py", - classname="HiveServer", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "hive_unsupported_jdbc_type.json")) - http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d30d85/ambari-server/src/test/python/common-services/RANGER/test_db_flavor_config.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/RANGER/test_db_flavor_config.py b/ambari-server/src/test/python/common-services/RANGER/test_db_flavor_config.py index 568e3fd..5baa61e 100644 --- a/ambari-server/src/test/python/common-services/RANGER/test_db_flavor_config.py +++ b/ambari-server/src/test/python/common-services/RANGER/test_db_flavor_config.py @@ -43,21 +43,4 @@ class TestDbFlavorConfig(RMFTestCase): command="configure", target=RMFTestCase.TARGET_COMMON_SERVICES, stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "ranger_admin_unsupported_db_flavor.json")) - - def test_db_flavor_1_0_0_3_0(self): - self.executeScript("RANGER/1.0.0.3.0/package/scripts/ranger_admin.py", - classname="RangerAdmin", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "ranger_admin_default.json")) - - def test_unsupported_db_flavor_1_0_0_3_0(self): - with self.assertRaises(Fail): - self.executeScript("RANGER/1.0.0.3.0/package/scripts/ranger_admin.py", - classname="RangerAdmin", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "ranger_admin_unsupported_db_flavor.json")) \ No newline at end of file + config_file=os.path.join(self.CONFIG_DIR, "ranger_admin_unsupported_db_flavor.json")) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d30d85/ambari-server/src/test/python/common-services/RANGER_KMS/test_db_flavor_config.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/RANGER_KMS/test_db_flavor_config.py b/ambari-server/src/test/python/common-services/RANGER_KMS/test_db_flavor_config.py index 48654ee..cbb82a1 100644 --- a/ambari-server/src/test/python/common-services/RANGER_KMS/test_db_flavor_config.py +++ b/ambari-server/src/test/python/common-services/RANGER_KMS/test_db_flavor_config.py @@ -43,21 +43,4 @@ class TestDbFlavorConfig(RMFTestCase): command="configure", target=RMFTestCase.TARGET_COMMON_SERVICES, stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "ranger_kms_unsupported_db_flavor.json")) - - def test_db_flavor_1_0_0_3_0(self): - self.executeScript("RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py", - classname="KmsServer", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "ranger_kms_default.json")) - - def test_unsupported_db_flavor_1_0_0_3_0(self): - with self.assertRaises(Fail): - self.executeScript("RANGER_KMS/1.0.0.3.0/package/scripts/kms_server.py", - classname="KmsServer", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "ranger_kms_unsupported_db_flavor.json")) \ No newline at end of file + config_file=os.path.join(self.CONFIG_DIR, "ranger_kms_unsupported_db_flavor.json")) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d30d85/ambari-server/src/test/python/common-services/SQOOP/test_jdbc_driver_config.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/SQOOP/test_jdbc_driver_config.py b/ambari-server/src/test/python/common-services/SQOOP/test_jdbc_driver_config.py index 7bb809a..c250bf7 100644 --- a/ambari-server/src/test/python/common-services/SQOOP/test_jdbc_driver_config.py +++ b/ambari-server/src/test/python/common-services/SQOOP/test_jdbc_driver_config.py @@ -43,21 +43,4 @@ class TestJdbcDriverConfig(RMFTestCase): command="configure", target=RMFTestCase.TARGET_COMMON_SERVICES, stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "sqoop_unsupported_jdbc_driver.json")) - - def test_jdbc_driver_1_4_4_3_0(self): - self.executeScript("SQOOP/1.4.4.3.0/package/scripts/sqoop_client.py", - classname="SqoopClient", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "sqoop_default.json")) - - def test_unsupported_jdbc_driver_1_4_4_3_0(self): - with self.assertRaises(Fail): - self.executeScript("SQOOP/1.4.4.3.0/package/scripts/sqoop_client.py", - classname="SqoopClient", - command="configure", - target=RMFTestCase.TARGET_COMMON_SERVICES, - stack_version=self.STACK_VERSION, - config_file=os.path.join(self.CONFIG_DIR, "sqoop_unsupported_jdbc_driver.json")) \ No newline at end of file + config_file=os.path.join(self.CONFIG_DIR, "sqoop_unsupported_jdbc_driver.json")) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d30d85/ambari-server/src/test/python/common-services/configs/sqoop_default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/configs/sqoop_default.json b/ambari-server/src/test/python/common-services/configs/sqoop_default.json index 73a810d..129d5fb 100644 --- a/ambari-server/src/test/python/common-services/configs/sqoop_default.json +++ b/ambari-server/src/test/python/common-services/configs/sqoop_default.json @@ -618,6 +618,10 @@ "sqoop_user": "sqoop", "jdbc_drivers" : "com.microsoft.sqlserver.jdbc.SQLServerDriver,com.mysql.jdbc.Driver" }, + "sqoop-site": { + "atlas.cluster.name": "c1", + "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook" + }, "hdfs-log4j": { "content": "log4jproperties\nline2" }, http://git-wip-us.apache.org/repos/asf/ambari/blob/f8d30d85/ambari-server/src/test/python/common-services/configs/sqoop_unsupported_jdbc_driver.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/common-services/configs/sqoop_unsupported_jdbc_driver.json b/ambari-server/src/test/python/common-services/configs/sqoop_unsupported_jdbc_driver.json index dc76fbb..415b1d8 100644 --- a/ambari-server/src/test/python/common-services/configs/sqoop_unsupported_jdbc_driver.json +++ b/ambari-server/src/test/python/common-services/configs/sqoop_unsupported_jdbc_driver.json @@ -618,6 +618,10 @@ "sqoop_user": "sqoop", "jdbc_drivers" : "com.microsoft.sqlserver.jdbc.SQLServerDriver,Unsupported" }, + "sqoop-site": { + "atlas.cluster.name": "c1", + "sqoop.job.data.publish.class": "org.apache.atlas.sqoop.hook.SqoopHook" + }, "hdfs-log4j": { "content": "log4jproperties\nline2" },