Repository: ambari Updated Branches: refs/heads/trunk 8e496ce61 -> 7eaf73c30
Revert "AMBARI-11721. Handle if non-default value is used for hbase.tmp.dir (aonishuk)" This reverts commit fb90a26e82a58c9b72d506786fbdb6decc759dff. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7eaf73c3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7eaf73c3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7eaf73c3 Branch: refs/heads/trunk Commit: 7eaf73c3086f842eac2eba344fc7080b4f6b477a Parents: 8e496ce Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Fri Jun 5 14:22:50 2015 -0700 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Fri Jun 5 14:22:50 2015 -0700 ---------------------------------------------------------------------- .../0.96.0.2.0/configuration/hbase-site.xml | 2 +- .../HBASE/0.96.0.2.0/package/scripts/hbase.py | 17 +++++++- .../0.96.0.2.0/package/scripts/params_linux.py | 3 +- .../stacks/2.0.6/HBASE/test_hbase_client.py | 26 ++++++++++++- .../stacks/2.0.6/HBASE/test_hbase_master.py | 39 +++++++++++++++++-- .../2.0.6/HBASE/test_hbase_regionserver.py | 41 ++++++++++++++++++-- .../2.0.6/HBASE/test_phoenix_queryserver.py | 26 ++++++++++++- .../python/stacks/2.0.6/configs/default.json | 2 +- .../python/stacks/2.0.6/configs/hbase-2.2.json | 2 +- .../stacks/2.0.6/configs/hbase-check-2.2.json | 4 +- .../stacks/2.0.6/configs/hbase-preupgrade.json | 2 +- .../stacks/2.0.6/configs/hbase-rs-2.2.json | 2 +- .../python/stacks/2.0.6/configs/secured.json | 2 +- .../stacks/2.3/configs/hbase_default.json | 2 +- .../python/stacks/2.3/configs/hbase_secure.json | 2 +- 15 files changed, 147 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/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 1cad600..65f72a7 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-{{hbase_user}}</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/7eaf73c3/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py index 0478398..1bfa7e4 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py @@ -56,14 +56,27 @@ def hbase(name=None): recursive = True ) - Directory (InlineTemplate(params.hbase_tmp_dir).get_content()+"/local/jars", + Directory (params.tmp_dir, owner = params.hbase_user, - group = params.user_group, mode=0775, recursive = True, cd_access="a", ) + Directory (params.local_dir, + owner = params.hbase_user, + group = params.user_group, + mode=0775, + recursive = True + ) + + Directory (os.path.join(params.local_dir, "jars"), + owner = params.hbase_user, + group = params.user_group, + mode=0775, + recursive = True + ) + XmlConfig( "hbase-site.xml", conf_dir = params.hbase_conf_dir, configurations = params.config['configurations']['hbase-site'], http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/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 d25eac8..e8585cd 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 @@ -35,6 +35,7 @@ from resource_management.libraries.functions import is_empty from resource_management.libraries.functions import get_unique_id_and_date from resource_management.libraries.script.script import Script + from resource_management.libraries.functions.substitute_vars import substitute_vars # server configurations @@ -297,5 +298,3 @@ if security_enabled: else: # HDP Stack 2.2 and less / ranger plugin enabled hbase_coprocessor_master_classes = "com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor" hbase_coprocessor_region_classes = "org.apache.hadoop.hbase.security.token.TokenProvider,org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint,com.xasecure.authorization.hbase.XaSecureAuthorizationCoprocessor" - -hbase_tmp_dir = config['configurations']['hbase-site']['hbase.tmp.dir'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/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 dfde2e5..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 @@ -46,12 +46,23 @@ class TestHBaseClient(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode=0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', @@ -126,12 +137,23 @@ class TestHBaseClient(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode=0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/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 839c396..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 @@ -204,12 +204,23 @@ class TestHBaseMaster(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode = 0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', @@ -316,12 +327,23 @@ class TestHBaseMaster(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode = 0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', @@ -438,11 +460,22 @@ class TestHBaseMaster(RMFTestCase): group = 'hadoop', recursive = True) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode = 0775, + recursive = True, + cd_access='a') + + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, - cd_access='a', recursive = True) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/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 93bbb24..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 @@ -131,12 +131,23 @@ class TestHbaseRegionServer(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode=0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH +'/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', @@ -207,12 +218,23 @@ class TestHbaseRegionServer(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode=0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', @@ -294,12 +316,23 @@ class TestHbaseRegionServer(RMFTestCase): group = 'hadoop', recursive = True) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode = 0775, + recursive = True, + cd_access='a') + + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, - recursive = True, - cd_access='a') + recursive = True) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/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 503a41c..c6ab01d 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 @@ -187,12 +187,23 @@ class TestPhoenixQueryServer(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode=0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', @@ -266,12 +277,23 @@ class TestPhoenixQueryServer(RMFTestCase): group = 'hadoop', recursive = True, ) + self.assertResourceCalled('Directory', self.TMP_PATH, + owner = 'hbase', + mode=0775, + recursive = True, + cd_access='a' + ) + self.assertResourceCalled('Directory', self.TMP_PATH + '/local', + owner = 'hbase', + group = 'hadoop', + mode=0775, + recursive = True, + ) self.assertResourceCalled('Directory', self.TMP_PATH + '/local/jars', owner = 'hbase', group = 'hadoop', mode=0775, recursive = True, - cd_access='a' ) self.assertResourceCalled('XmlConfig', 'hbase-site.xml', owner = 'hbase', http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.0.6/configs/default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json index 639c2f3..2c09011 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json @@ -298,7 +298,7 @@ "hbase.zookeeper.property.clientPort": "2181", "hbase.regionserver.global.memstore.upperLimit": "0.4", "zookeeper.session.timeout": "30000", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hbase.local.dir": "${hbase.tmp.dir}/local", "hbase.hregion.max.filesize": "10737418240", "hfile.block.cache.size": "0.40", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-2.2.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-2.2.json b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-2.2.json index dd1d69a..e7a516f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-2.2.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-2.2.json @@ -285,7 +285,7 @@ "hbase.regionserver.global.memstore.upperLimit": "0.4", "zookeeper.session.timeout": "30000", "hbase.client.scanner.caching": "100", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hfile.block.cache.size": "0.40", "hbase.hregion.max.filesize": "10737418240", "hbase.security.authentication": "simple", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-check-2.2.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-check-2.2.json b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-check-2.2.json index 55750c5..83120eb 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-check-2.2.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-check-2.2.json @@ -280,7 +280,7 @@ "hbase.regionserver.global.memstore.upperLimit": "0.4", "zookeeper.session.timeout": "30000", "hbase.client.scanner.caching": "100", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hfile.block.cache.size": "0.40", "hbase.hregion.max.filesize": "10737418240", "hbase.security.authentication": "simple", @@ -743,4 +743,4 @@ "c6402.ambari.apache.org" ] } -} +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-preupgrade.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-preupgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-preupgrade.json index afce859..0b09520 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-preupgrade.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-preupgrade.json @@ -53,7 +53,7 @@ "hbase.regionserver.global.memstore.upperLimit": "0.4", "zookeeper.session.timeout": "30000", "hbase.client.scanner.caching": "100", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hfile.block.cache.size": "0.40", "hbase.hregion.max.filesize": "10737418240", "hbase.security.authentication": "simple", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-rs-2.2.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-rs-2.2.json b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-rs-2.2.json index f3523a8..349a1cf 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-rs-2.2.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/hbase-rs-2.2.json @@ -285,7 +285,7 @@ "hbase.regionserver.global.memstore.upperLimit": "0.4", "zookeeper.session.timeout": "30000", "hbase.client.scanner.caching": "100", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hfile.block.cache.size": "0.40", "hbase.hregion.max.filesize": "10737418240", "hbase.security.authentication": "simple", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index 54d7ca8..1d40121 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -330,7 +330,7 @@ "hbase.hregion.max.filesize": "10737418240", "hbase.regionserver.global.memstore.upperLimit": "0.4", "zookeeper.session.timeout": "30000", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hbase.local.dir": "${hbase.tmp.dir}/local", "hfile.block.cache.size": "0.40", "hbase.regionserver.kerberos.principal": "hbase/_h...@example.com", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.3/configs/hbase_default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.3/configs/hbase_default.json b/ambari-server/src/test/python/stacks/2.3/configs/hbase_default.json index 0cda06e..f5a4487 100644 --- a/ambari-server/src/test/python/stacks/2.3/configs/hbase_default.json +++ b/ambari-server/src/test/python/stacks/2.3/configs/hbase_default.json @@ -253,7 +253,7 @@ "hbase.bucketcache.ioengine": "", "zookeeper.session.timeout": "90000", "hbase.regionserver.global.memstore.size": "${hbase.regionserver.global.memstore.upperLimit}", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hfile.block.cache.size": "0.40", "hbase.hregion.max.filesize": "1073741824", "hbase.client.scanner.caching": "100", http://git-wip-us.apache.org/repos/asf/ambari/blob/7eaf73c3/ambari-server/src/test/python/stacks/2.3/configs/hbase_secure.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.3/configs/hbase_secure.json b/ambari-server/src/test/python/stacks/2.3/configs/hbase_secure.json index 5240fe9..39f91c0 100644 --- a/ambari-server/src/test/python/stacks/2.3/configs/hbase_secure.json +++ b/ambari-server/src/test/python/stacks/2.3/configs/hbase_secure.json @@ -355,7 +355,7 @@ "hbase.bucketcache.ioengine": "", "zookeeper.session.timeout": "90000", "hbase.regionserver.global.memstore.size": "${hbase.regionserver.global.memstore.upperLimit}", - "hbase.tmp.dir": "/tmp/hbase-hbase", + "hbase.tmp.dir": "/hadoop/hbase", "hfile.block.cache.size": "0.40", "hbase.regionserver.kerberos.principal": "hbase/_h...@example.com", "phoenix.queryserver.kerberos.principal": "hbase/_h...@example.com",