You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/05/26 16:48:54 UTC
ambari git commit: AMBARI-16844. HBase backups fail if there is no
/user/hbase directory in HDFS (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/branch-2.4 1c32d73c8 -> 28bb59f44
AMBARI-16844. HBase backups fail if there is no /user/hbase directory in HDFS (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/28bb59f4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/28bb59f4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/28bb59f4
Branch: refs/heads/branch-2.4
Commit: 28bb59f4482fb4f7776a24140ce09fc73dcf75a3
Parents: 1c32d73
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu May 26 19:48:56 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu May 26 19:48:56 2016 +0300
----------------------------------------------------------------------
.../resource_management/libraries/functions/constants.py | 1 +
.../resource_management/libraries/functions/stack_features.py | 5 +++++
.../common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py | 7 +++++++
.../HBASE/0.96.0.2.0/package/scripts/params_linux.py | 4 ++++
.../resources/stacks/HDP/2.0.6/properties/stack_features.json | 5 +++++
5 files changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/28bb59f4/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
index 775e7eb..455fb67 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/constants.py
@@ -83,3 +83,4 @@ class StackFeature:
HIVE_METASTORE_SITE_SUPPORT = "hive_metastore_site_support"
RANGER_USERSYNC_PASSWORD_JCEKS = "ranger_usersync_password_jceks"
RANGER_LOGSEARCH_DEPENDENT = "ranger_logsearch_dependent"
+ HBASE_HOME_DIRECTORY = "hbase_home_directory"
http://git-wip-us.apache.org/repos/asf/ambari/blob/28bb59f4/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
index aa64528..e9b7e6f 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
@@ -243,6 +243,11 @@ _DEFAULT_STACK_FEATURES = {
"name": "ranger_logsearch_dependent",
"description": "Ranger audit properties should be configured to use Ambari installed LogSearch (AMBARI-16446)",
"min_version": "2.5.0.0"
+ },
+ {
+ "name": "hbase_home_directory",
+ "description": "Hbase home directory in HDFS needed for HBASE backup",
+ "min_version": "2.5.0.0"
}
]
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/28bb59f4/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 d2f28f5..20894ec 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
@@ -204,6 +204,13 @@ def hbase(name=None):
owner=params.hbase_user,
mode=0711
)
+ if params.create_hbase_home_directory:
+ params.HdfsResource(params.hbase_home_directory,
+ type="directory",
+ action="create_on_execute",
+ owner=params.hbase_user,
+ mode=0755
+ )
params.HdfsResource(None, action="execute")
if params.phoenix_enabled:
http://git-wip-us.apache.org/repos/asf/ambari/blob/28bb59f4/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 b9b49e9..05bad1c 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
@@ -381,3 +381,7 @@ if has_ranger_admin:
#For SQLA explicitly disable audit to DB for Ranger
if xa_audit_db_flavor == 'sqla':
xa_audit_db_is_enabled = False
+
+
+create_hbase_home_directory = check_stack_feature(StackFeature.HBASE_HOME_DIRECTORY, stack_version_formatted)
+hbase_home_directory = format("/user/{hbase_user}")
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/28bb59f4/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
index 3cae192..f180aca 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
@@ -225,6 +225,11 @@
"name": "ranger_logsearch_dependent",
"description": "Ranger audit properties should be configured to use Ambari installed LogSearch (AMBARI-16446)",
"min_version": "2.5.0.0"
+ },
+ {
+ "name": "hbase_home_directory",
+ "description": "Hbase home directory in HDFS needed for HBASE backup",
+ "min_version": "2.5.0.0"
}
]
}