ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-11312. Value of hbase.tmp.dir should contain ${user.name} instead of hard coded directory path (Ted Yu via smohanty)
Date Fri, 22 May 2015 20:58:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b75d59727 -> 064f841ad


AMBARI-11312. Value of hbase.tmp.dir should contain ${user.name} instead of hard coded directory
path (Ted Yu via smohanty)


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

Branch: refs/heads/trunk
Commit: 064f841ad8c3ed002b2a8f9ed69b8ce7bdea2fc5
Parents: b75d597
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Fri May 22 13:56:02 2015 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Fri May 22 13:56:02 2015 -0700

----------------------------------------------------------------------
 .../0.96.0.2.0/configuration/hbase-site.xml      |  2 +-
 .../0.96.0.2.0/package/scripts/params_linux.py   |  4 ++--
 .../HDP/2.0.6/hooks/before-ANY/scripts/params.py |  2 +-
 .../2.0.6/hooks/before-INSTALL/scripts/params.py |  2 +-
 .../2.0.6/hooks/before-START/scripts/params.py   |  2 +-
 .../stacks/2.0.6/HBASE/test_hbase_client.py      | 13 +++++++------
 .../stacks/2.0.6/HBASE/test_hbase_master.py      | 19 ++++++++++---------
 .../2.0.6/HBASE/test_hbase_regionserver.py       | 19 ++++++++++---------
 .../2.0.6/HBASE/test_phoenix_queryserver.py      | 15 ++++++++-------
 .../2.0.6/hooks/before-ANY/test_before_any.py    |  6 ++++--
 10 files changed, 45 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
index 59fa842..dd983a8 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml
@@ -49,7 +49,7 @@
   </property>
   <property>
     <name>hbase.tmp.dir</name>
-    <value>/tmp/hbase</value>
+    <value>/tmp/hbase-${user.name}</value>
     <description>Temporary directory on the local filesystem.
     Change this setting to point to a location more permanent
     than '/tmp' (The '/tmp' directory is often cleared on

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 1f79f87..5350612 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -105,9 +105,9 @@ regionserver_xmn_size = calc_xmn_from_xms(regionserver_heapsize, regionserver_xm
 
 
 pid_dir = status_params.pid_dir
-tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir']
+tmp_dir = "/tmp/hbase-hbase"
 # TODO UPGRADE default, update site during upgrade
-_local_dir_conf = default('/configurations/hbase-site/hbase.local.dir', "${hbase.tmp.dir}/local")
+_local_dir_conf = "/tmp/hbase-hbase/local"
 local_dir = substitute_vars(_local_dir_conf, config['configurations']['hbase-site'])
 
 client_jaas_config_file = format("{hbase_conf_dir}/hbase_client_jaas.conf")

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
index e0934ec..837bd66 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py
@@ -156,7 +156,7 @@ has_tez = 'tez-site' in config['configurations']
 has_hbase_masters = not len(hbase_master_hosts) == 0
 has_oozie_server = not len(oozie_servers) == 0
 
-hbase_tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir']
+hbase_tmp_dir = "/tmp/hbase-hbase"
 
 proxyuser_group = default("/configurations/hadoop-env/proxyuser_group","users")
 dfs_cluster_administrators_group = config['configurations']['hdfs-site']["dfs.cluster.administrators"]

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
index b205f39..35267db 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py
@@ -86,7 +86,7 @@ is_slave = hostname in slave_hosts
 if has_ganglia_server:
   ganglia_server_host = ganglia_server_hosts[0]
 
-hbase_tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir']
+hbase_tmp_dir = "/tmp/hbase-hbase"
 
 #security params
 security_enabled = config['configurations']['cluster-env']['security_enabled']

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
index c6d632d..0fee25b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
@@ -108,7 +108,7 @@ hadoop_pid_dir_prefix = config['configurations']['hadoop-env']['hadoop_pid_dir_p
 task_log4j_properties_location = os.path.join(hadoop_conf_dir, "task-log4j.properties")
 
 hdfs_log_dir_prefix = config['configurations']['hadoop-env']['hdfs_log_dir_prefix']
-hbase_tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir']
+hbase_tmp_dir = "/tmp/hbase-hbase"
 #db params
 server_db_name = config['hostLevelParams']['db_name']
 db_driver_filename = config['hostLevelParams']['db_driver_filename']

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
index 5b57393..afe3de6 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
@@ -27,6 +27,7 @@ from stacks.utils.RMFTestCase import *
 class TestHBaseClient(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "HBASE/0.96.0.2.0/package"
   STACK_VERSION = "2.0.6"
+  TMP_PATH = '/tmp/hbase-hbase'
 
   def test_configure_secured(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hbase_client.py",
@@ -45,19 +46,19 @@ class TestHBaseClient(RMFTestCase):
       group = 'hadoop',
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode=0775,
       recursive = True,
       cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
@@ -136,19 +137,19 @@ class TestHBaseClient(RMFTestCase):
       group = 'hadoop',
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode=0775,
       recursive = True,
       cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index 0c87a80..da0d624 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -26,6 +26,7 @@ from stacks.utils.RMFTestCase import *
 class TestHBaseMaster(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "HBASE/0.96.0.2.0/package"
   STACK_VERSION = "2.0.6"
+  TMP_PATH = "/tmp/hbase-hbase"
 
   def test_configure_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hbase_master.py",
@@ -203,19 +204,19 @@ class TestHBaseMaster(RMFTestCase):
       group = 'hadoop',
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode = 0775,
       recursive = True,
       cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
@@ -326,19 +327,19 @@ class TestHBaseMaster(RMFTestCase):
       group = 'hadoop',
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode = 0775,
       recursive = True,
       cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
@@ -459,19 +460,19 @@ class TestHBaseMaster(RMFTestCase):
       group = 'hadoop',
       recursive = True)
 
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode = 0775,
       recursive = True,
       cd_access='a')
 
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True)
 
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
index 3175a01..47e8ef3 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
@@ -26,6 +26,7 @@ from stacks.utils.RMFTestCase import *
 class TestHbaseRegionServer(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "HBASE/0.96.0.2.0/package"
   STACK_VERSION = "2.0.6"
+  TMP_PATH = '/tmp/hbase-hbase'
 
   def test_configure_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/hbase_regionserver.py",
@@ -130,19 +131,19 @@ class TestHbaseRegionServer(RMFTestCase):
       group = 'hadoop',
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode=0775,
       recursive = True,
       cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH +'/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
@@ -217,19 +218,19 @@ class TestHbaseRegionServer(RMFTestCase):
       group = 'hadoop',
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode=0775,
       recursive = True,
       cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True,
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
@@ -315,19 +316,19 @@ class TestHbaseRegionServer(RMFTestCase):
       group = 'hadoop',
       recursive = True)
 
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
       owner = 'hbase',
       mode = 0775,
       recursive = True,
       cd_access='a')
 
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,
       recursive = True)
 
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
       owner = 'hbase',
       group = 'hadoop',
       mode=0775,

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
index 5f1d856..65bf884 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
@@ -26,6 +26,7 @@ from unittest import skip
 class TestPhoenixQueryServer(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "HBASE/0.96.0.2.0/package"
   STACK_VERSION = "2.3"
+  TMP_PATH = "/tmp/hbase-hbase"
 
   def test_configure_default(self):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/phoenix_queryserver.py",
@@ -186,19 +187,19 @@ class TestPhoenixQueryServer(RMFTestCase):
                               group = 'hadoop',
                               recursive = True,
                               )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
                               owner = 'hbase',
                               mode=0775,
                               recursive = True,
                               cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
                               owner = 'hbase',
                               group = 'hadoop',
                               mode=0775,
                               recursive = True,
                               )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
                               owner = 'hbase',
                               group = 'hadoop',
                               mode=0775,
@@ -276,19 +277,19 @@ class TestPhoenixQueryServer(RMFTestCase):
                               group = 'hadoop',
                               recursive = True,
                               )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
                               owner = 'hbase',
                               mode=0775,
                               recursive = True,
                               cd_access='a'
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local',
                               owner = 'hbase',
                               group = 'hadoop',
                               mode=0775,
                               recursive = True,
                               )
-    self.assertResourceCalled('Directory', '/hadoop/hbase/local/jars',
+    self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars',
                               owner = 'hbase',
                               group = 'hadoop',
                               mode=0775,
@@ -359,4 +360,4 @@ class TestPhoenixQueryServer(RMFTestCase):
                               group='hadoop',
                               owner='hbase',
                               content='log4jproperties\nline2'
-    )
\ No newline at end of file
+    )

http://git-wip-us.apache.org/repos/asf/ambari/blob/064f841a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
index 5c8154e..fb4a937 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
@@ -24,6 +24,8 @@ from resource_management import Hook
 
 @patch.object(Hook, "run_custom_hook", new = MagicMock())
 class TestHookBeforeInstall(RMFTestCase):
+  TMP_PATH = '/tmp/hbase-hbase'
+
   @patch("os.path.exists")
   def test_hook_default(self, os_path_exists_mock):
 
@@ -136,7 +138,7 @@ class TestHookBeforeInstall(RMFTestCase):
     self.assertResourceCalled('Execute', '/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa',
         not_if = '(test $(id -u ambari-qa) -gt 1000) || (false)',
     )
-    self.assertResourceCalled('Directory', '/hadoop/hbase',
+    self.assertResourceCalled('Directory', self.TMP_PATH,
         owner = 'hbase',
         mode = 0775,
         recursive = True,
@@ -146,7 +148,7 @@ class TestHookBeforeInstall(RMFTestCase):
         content = StaticFile('changeToSecureUid.sh'),
         mode = 0555,
     )
-    self.assertResourceCalled('Execute', '/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/hadoop/hbase',
+    self.assertResourceCalled('Execute', '/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,'
+ self.TMP_PATH,
         not_if = '(test $(id -u hbase) -gt 1000) || (false)',
     )
     self.assertResourceCalled('User', 'test_user1',


Mime
View raw message