AMBARI-13700. hbase.root dir for metrics server does not get updated after NN 
HA is enabled (alexantonenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: b36dc287a0bb469823475e5d60c37ea6cdb94f79
Parents: 503d28e
Author: Alex Antonenko <hiv...@gmail.com>
Authored: Wed Jan 13 17:32:22 2016 +0200
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Thu Jan 14 11:43:28 2016 -0500

----------------------------------------------------------------------
 ambari-web/app/utils/configs/nn_ha_config_initializer.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b36dc287/ambari-web/app/utils/configs/nn_ha_config_initializer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/nn_ha_config_initializer.js 
b/ambari-web/app/utils/configs/nn_ha_config_initializer.js
index ce3e1c5..5126a3b 100644
--- a/ambari-web/app/utils/configs/nn_ha_config_initializer.js
+++ b/ambari-web/app/utils/configs/nn_ha_config_initializer.js
@@ -277,8 +277,10 @@ App.NnHaConfigInitializer = 
App.HaConfigInitializerClass.create(App.HostsBasedIn
     if (localDB.installedServices.contains('AMBARI_METRICS')) {
       var value = dependencies.serverConfigs.findProperty('type', 
'ams-hbase-site').properties['hbase.rootdir'];
       var currentNameNodeHost = 
localDB.masterComponentHosts.filterProperty('component', 
'NAMENODE').findProperty('isInstalled', true).hostName;
-      value = (value == "hdfs://" + currentNameNodeHost) ? "hdfs://" + 
dependencies.namespaceId : value;
-      configProperty.isVisible = configProperty.value != value;
+      if(value.contains("hdfs://" + currentNameNodeHost)){
+        value = value.replace(/\/\/[^\/]*/, '//' + dependencies.namespaceId);
+        configProperty.isVisible = true;
+      }
       Em.setProperties(configProperty, {
         value: value,
         recommendedValue: value

Reply via email to