ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-9319. HBase fails to start after adding HBase Service to a cluster that has NameNode HA already enabled (alexantonenko)
Date Sat, 24 Jan 2015 16:18:09 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk c0167f89d -> 48a759cce


AMBARI-9319. HBase fails to start after adding HBase Service to a cluster that has NameNode
HA already enabled (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 48a759ccec2090ed686e8ae775f7fbc786804b55
Parents: c0167f8
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Sat Jan 24 15:26:41 2015 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Sat Jan 24 18:16:24 2015 +0200

----------------------------------------------------------------------
 .../app/controllers/wizard/step7_controller.js     | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/48a759cc/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 29c07ce..9789153 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -705,14 +705,25 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin,
{
           this.setSecureConfigs(serviceConfigObj, serviceName);
         }
       }, this);
-      // Remove SNameNode if HA is enabled
+      // if HA is enabled -> Remove SNameNode, hbase.rootdir should use Name Service ID
       if (App.get('isHaEnabled')) {
-        var c = serviceConfigs.findProperty('serviceName', 'HDFS').configs;
-        var removedConfigs = c.filterProperty('category', 'SECONDARY_NAMENODE');
+        var c = serviceConfigs.findProperty('serviceName', 'HDFS').configs,
+          nameServiceId = c.findProperty('name', 'dfs.nameservices'),
+          removedConfigs = c.filterProperty('category', 'SECONDARY_NAMENODE');
         removedConfigs.map(function (config) {
           c = c.without(config);
         });
         serviceConfigs.findProperty('serviceName', 'HDFS').configs = c;
+
+        if(this.get('selectedServiceNames').contains('HBASE') && nameServiceId){
+          var hRootDir = serviceConfigs.findProperty('serviceName', 'HBASE').configs.findProperty('name','hbase.rootdir'),
+            valueToChange = hRootDir.get('value').replace(/\/\/.*:/i, '//' + nameServiceId.get('value')
+ ':');
+
+          hRootDir.setProperties({
+            'value':  valueToChange,
+            'defaultValue' : valueToChange
+          });
+        }
       }
     }
 


Mime
View raw message