You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by tb...@apache.org on 2015/06/18 23:23:09 UTC

ambari git commit: Revert "AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)"

Repository: ambari
Updated Branches:
  refs/heads/trunk 4bff675a8 -> 2c5ecc39e


Revert "AMBARI-11824 - Views: Tez View should automatically work out of the box in Ambari 2.1 (tbeerbower)"

This reverts commit 59a74cfda17bd3ad559f64fd967aa2dd13398e72.


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

Branch: refs/heads/trunk
Commit: 2c5ecc39ec919af7e911237635382e6fe9a18abb
Parents: 4bff675
Author: tbeerbower <tb...@hortonworks.com>
Authored: Thu Jun 18 17:22:35 2015 -0400
Committer: tbeerbower <tb...@hortonworks.com>
Committed: Thu Jun 18 17:22:35 2015 -0400

----------------------------------------------------------------------
 .../stacks/HDP/2.3/services/stack_advisor.py          | 14 ++++++--------
 .../python/stacks/2.3/common/test_stack_advisor.py    | 13 +------------
 2 files changed, 7 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5ecc39/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
index 1075a06..d65d711 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py
@@ -63,14 +63,12 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
       if 'views.dir' in serverProperties:
         views_dir = serverProperties['views.dir']
 
-      views_work_dir = os.path.join(views_dir, 'work')
-
-      if os.path.exists(views_work_dir) and os.path.isdir(views_work_dir):
+      if os.path.exists(views_dir) and os.path.isdir(views_dir):
         last_version = '0.0.0'
-        for file in os.listdir(views_work_dir):
-          if fnmatch.fnmatch(file, 'TEZ{*}'):
-            current_version = file.lstrip("TEZ{").rstrip("}") # E.g.: TEZ{0.7.0.2.3.0.0-2154}
-            if self.versionCompare(current_version.replace("-", "."), last_version.replace("-", ".")) >= 0:
+        for file in os.listdir(views_dir):
+          if fnmatch.fnmatch(file, 'tez-view*.jar'):
+            current_version = file.lstrip("tez-view-")[:-4] # E.g.: tez-view-2.1.0.2043.jar
+            if self.versionCompare(current_version, last_version) >= 0:
               latest_tez_jar_version = current_version
               last_version = current_version
             pass
@@ -79,7 +77,7 @@ class HDP23StackAdvisor(HDP22StackAdvisor):
     pass
 
     if latest_tez_jar_version:
-      tez_url = 'http://{0}:{1}/#/main/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version)
+      tez_url = 'http://{0}:{1}/views/TEZ/{2}/TEZ_CLUSTER_INSTANCE'.format(server_host, server_port, latest_tez_jar_version)
       putTezProperty("tez.tez-ui.history-url.base", tez_url)
     pass
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5ecc39/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
index da85cfc..2f73f18 100644
--- a/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py
@@ -480,15 +480,7 @@ class TestHDP23StackAdvisor(TestCase):
     self.stackAdvisor.recommendHIVEConfigurations(configurations, clusterData, services, hosts)
     self.assertEquals(configurations, expected)
 
-  @patch('os.path.exists')
-  @patch('os.path.isdir')
-  @patch('os.listdir')
-  def test_recommendTezConfigurations(self, os_listdir_mock, os_isdir_mock, os_exists_mock):
-
-    os_exists_mock.return_value = True
-    os_isdir_mock.return_value = True
-    os_listdir_mock.return_value = ['TEZ{0.7.0.2.3.0.0-2155}']
-
+  def test_recommendTezConfigurations(self):
     self.maxDiff = None
     configurations = {
       "yarn-site": {
@@ -656,7 +648,6 @@ class TestHDP23StackAdvisor(TestCase):
 
     # Test JDK1.7
     services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.7.3_23'}
-    expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"
     self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts)
     self.assertEquals(configurations, expected)
 
@@ -664,7 +655,6 @@ class TestHDP23StackAdvisor(TestCase):
     services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.8_44'}
     expected['tez-site']['properties']['tez.am.launch.cmd-opts'] = "-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB"
     expected['tez-site']['properties']['tez.task.launch.cmd-opts'] = "-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB"
-    expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"
     self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts)
     self.assertEquals(configurations, expected)
 
@@ -672,7 +662,6 @@ class TestHDP23StackAdvisor(TestCase):
     services['ambari-server-properties'] = {'java.home': '/usr/jdk64/jdk1.9.2_44'}
     expected['tez-site']['properties']['tez.am.launch.cmd-opts'] = "-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB"
     expected['tez-site']['properties']['tez.task.launch.cmd-opts'] = "-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB"
-    expected['tez-site']['properties']['tez.tez-ui.history-url.base'] = "http://hw11465.home:8080/#/main/views/TEZ/0.7.0.2.3.0.0-2155/TEZ_CLUSTER_INSTANCE"
     self.stackAdvisor.recommendTezConfigurations(configurations, clusterData, services, hosts)
     self.assertEquals(configurations, expected)