ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-16844. HBase backups fail if there is no /user/hbase directory in HDFS (aonishuk)
Date Thu, 26 May 2016 16:49:52 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f948e3870 -> f96969a45


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/f96969a4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f96969a4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f96969a4

Branch: refs/heads/trunk
Commit: f96969a4543ef93e5c4e0c0e4f998c8f9ebd598c
Parents: f948e38
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Thu May 26 19:48:53 2016 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Thu May 26 19:49:45 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/f96969a4/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/f96969a4/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/f96969a4/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 8467fc5..6f56512 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
@@ -211,6 +211,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/f96969a4/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/f96969a4/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"
     }
   ]
 }


Mime
View raw message