ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: AMBARI-12888: After adding Ranger with SQLA, ambari-server Restart fails (jluniya)
Date Wed, 26 Aug 2015 21:53:08 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 24e752b94 -> d7f3f31a6


AMBARI-12888: After adding Ranger with SQLA, ambari-server Restart fails (jluniya)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d7f3f31a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d7f3f31a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d7f3f31a

Branch: refs/heads/trunk
Commit: d7f3f31a6e70af12d632382bc92d9dded4b1e020
Parents: 24e752b
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Wed Aug 26 14:52:59 2015 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Wed Aug 26 14:52:59 2015 -0700

----------------------------------------------------------------------
 .../python/ambari_server/serverConfiguration.py | 14 ---------
 .../src/test/python/TestAmbariServer.py         | 33 +-------------------
 2 files changed, 1 insertion(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d7f3f31a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/serverConfiguration.py b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
index 6b3974b..03da9f9 100644
--- a/ambari-server/src/main/python/ambari_server/serverConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/serverConfiguration.py
@@ -1203,17 +1203,6 @@ def get_ambari_jars():
                  + default_jar_location)
     return default_jar_location
 
-def get_share_jars():
-  share_jars = ""
-  file_list = []
-  file_list.extend(glob.glob(configDefaults.JAVA_SHARE_PATH + os.sep + "*mysql*"))
-  file_list.extend(glob.glob(configDefaults.JAVA_SHARE_PATH + os.sep + "*sqljdbc*"))
-  file_list.extend(glob.glob(configDefaults.JAVA_SHARE_PATH + os.sep + "*ojdbc*"))
-  file_list.extend(glob.glob(configDefaults.JAVA_SHARE_PATH + os.sep + "*sajdbc4*"))
-  if len(file_list) > 0:
-    share_jars = string.join(file_list, os.pathsep)
-  return share_jars
-
 def get_jdbc_cp():
   jdbc_jar_path = ""
   properties = get_ambari_properties()
@@ -1226,9 +1215,6 @@ def get_ambari_classpath():
   jdbc_cp = get_jdbc_cp()
   if len(jdbc_cp) > 0:
     ambari_cp = ambari_cp + os.pathsep + jdbc_cp
-  share_cp = get_share_jars()
-  if len(share_cp) > 0:
-    ambari_cp = ambari_cp + os.pathsep + share_cp
   return ambari_cp
 
 def get_full_ambari_classpath(conf_dir = None):

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7f3f31a/ambari-server/src/test/python/TestAmbariServer.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index dc4a038..7b913e1 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -60,7 +60,7 @@ with patch("platform.linux_distribution", return_value = os_distro_value):
         from ambari_server.resourceFilesKeeper import ResourceFilesKeeper, KeeperException
         from ambari_server.serverConfiguration import configDefaults, \
           check_database_name_property, OS_FAMILY_PROPERTY, \
-          find_properties_file, get_ambari_classpath, get_ambari_jars, get_ambari_properties,
get_JAVA_HOME, get_share_jars, \
+          find_properties_file, get_ambari_classpath, get_ambari_jars, get_ambari_properties,
get_JAVA_HOME, \
           parse_properties_file, read_ambari_user, update_ambari_properties, update_properties_2,
write_property, find_jdk, \
           AMBARI_CONF_VAR, AMBARI_SERVER_LIB, JDBC_DATABASE_PROPERTY, JDBC_RCA_PASSWORD_FILE_PROPERTY,
\
           PERSISTENCE_TYPE_PROPERTY, JDBC_URL_PROPERTY, get_conf_dir, JDBC_USER_NAME_PROPERTY,
JDBC_PASSWORD_PROPERTY, \
@@ -795,7 +795,6 @@ class TestAmbariServer(TestCase):
     sys.stdout = sys.__stdout__
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("time.sleep")
   @patch("subprocess.Popen")
@@ -817,7 +816,6 @@ class TestAmbariServer(TestCase):
     self.assertEqual(1, retcode)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("shlex.split")
   @patch("subprocess.Popen")
@@ -862,7 +860,6 @@ class TestAmbariServer(TestCase):
     self.assertTrue(splitMock.called)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.serverConfiguration.get_conf_dir")
   @patch("ambari_server.serverConfiguration.search_file")
@@ -897,7 +894,6 @@ class TestAmbariServer(TestCase):
       os.unlink(tf1.name)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.dbConfiguration.decrypt_password_for_alias")
   @patch("ambari_server.dbConfiguration_linux.run_os_command")
@@ -926,7 +922,6 @@ class TestAmbariServer(TestCase):
     self.assertEqual((0, None, None), result)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.dbConfiguration.decrypt_password_for_alias")
   @patch("time.sleep")
@@ -955,7 +950,6 @@ class TestAmbariServer(TestCase):
     self.assertEqual(2, sleep_mock.call_count)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.dbConfiguration.decrypt_password_for_alias")
   @patch("time.sleep")
@@ -984,7 +978,6 @@ class TestAmbariServer(TestCase):
     self.assertEqual(1, sleep_mock.call_count)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.serverSetup.get_YN_input")
   @patch("ambari_server.serverSetup.run_os_command")
@@ -1004,7 +997,6 @@ class TestAmbariServer(TestCase):
     self.assertTrue(getYNInput_mock.called)
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.serverConfiguration.print_info_msg")
   def test_get_ambari_jars(self, printInfoMsg_mock):
@@ -1035,24 +1027,6 @@ class TestAmbariServer(TestCase):
     self.assertTrue(printInfoMsg_mock.called)
     pass
 
-
-  @patch("glob.glob")
-  @patch("ambari_server.serverConfiguration.print_info_msg")
-  def test_get_share_jars(self, printInfoMsg_mock, globMock):
-    globMock.return_value = ["one", "two"]
-    expected = "one" + os.pathsep + "two" + os.pathsep + \
-               "one" + os.pathsep + "two" + os.pathsep + \
-               "one" + os.pathsep + "two" + os.pathsep + \
-               "one" + os.pathsep + "two"
-    result = get_share_jars()
-    self.assertEqual(expected, result)
-    globMock.return_value = []
-    expected = ""
-    result = get_share_jars()
-    self.assertEqual(expected, result)
-    pass
-
-
   @patch("glob.glob")
   @patch("ambari_server.serverConfiguration.print_info_msg")
   @patch("ambari_server.serverConfiguration.get_ambari_properties")
@@ -1060,14 +1034,12 @@ class TestAmbariServer(TestCase):
     globMock.return_value = ["one"]
     result = get_ambari_classpath()
     self.assertTrue(get_ambari_jars() in result)
-    self.assertTrue(get_share_jars() in result)
     globMock.return_value = []
     result = get_ambari_classpath()
     self.assertTrue(get_ambari_jars() in result)
     self.assertFalse(":" in result[2:])
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("ambari_server.serverConfiguration.print_info_msg")
   def test_get_conf_dir(self, printInfoMsg_mock):
@@ -1317,7 +1289,6 @@ class TestAmbariServer(TestCase):
       configDefaults.NR_ADJUST_OWNERSHIP_LIST = old_adjust_owner_list
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch("os.path.exists")
   @patch("ambari_commons.os_linux.os_run_os_command")
@@ -1396,7 +1367,6 @@ class TestAmbariServer(TestCase):
     print_warning_msg_mock.reset_mock()
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch("ambari_server.serverSetup.get_validated_string_input")
@@ -1530,7 +1500,6 @@ class TestAmbariServer(TestCase):
     self.assertEquals(userChecks.user, "dummy_domain\\dummy_user")
     pass
 
-
   @not_for_platform(PLATFORM_WINDOWS)
   @patch.object(OSCheck, "os_distribution", new = MagicMock(return_value = os_distro_value))
   @patch("ambari_server.serverSetup.read_ambari_user")


Mime
View raw message