You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2018/03/13 10:07:36 UTC

[ambari] branch trunk updated: AMBARI-23208. NN Federation Wizard: rename custom command (akovalenko)

This is an automated email from the ASF dual-hosted git repository.

akovalenko pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new eb23613  AMBARI-23208. NN Federation Wizard: rename custom command (akovalenko)
eb23613 is described below

commit eb2361376144e445e6fe461773b474f0bc30f8c0
Author: Aleksandr Kovalenko <ak...@apache.org>
AuthorDate: Mon Mar 12 17:59:37 2018 +0200

    AMBARI-23208. NN Federation Wizard: rename custom command (akovalenko)
---
 .../app/controllers/main/admin/federation/step1_controller.js     | 5 +++++
 .../app/controllers/main/admin/federation/step3_controller.js     | 3 +--
 ambari-web/app/messages.js                                        | 1 +
 ambari-web/app/templates/main/admin/federation/step1.hbs          | 8 ++++++++
 ambari-web/app/utils/ajax/ajax.js                                 | 2 +-
 5 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/ambari-web/app/controllers/main/admin/federation/step1_controller.js b/ambari-web/app/controllers/main/admin/federation/step1_controller.js
index eb3655e..67c45f4 100644
--- a/ambari-web/app/controllers/main/admin/federation/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step1_controller.js
@@ -22,6 +22,11 @@ var validator = require('utils/validator');
 App.NameNodeFederationWizardStep1Controller = Em.Controller.extend({
   name: "nameNodeFederationWizardStep1Controller",
 
+  existingNameServices: function () {
+    var isMetricsLoaded = App.router.get('clusterController.isHostComponentMetricsLoaded');
+    return isMetricsLoaded ? App.HDFSService.find().objectAt(0).get('masterComponentGroups').mapProperty('name').join(', ') : '';
+  }.property('App.router.clusterController.isHostComponentMetricsLoaded'),
+
   isNameServiceIdValid: function () {
     return validator.isValidNameServiceId(this.get('content.nameServiceId'));
   }.property('content.nameServiceId'),
diff --git a/ambari-web/app/controllers/main/admin/federation/step3_controller.js b/ambari-web/app/controllers/main/admin/federation/step3_controller.js
index 993cecc..b372587 100644
--- a/ambari-web/app/controllers/main/admin/federation/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step3_controller.js
@@ -82,8 +82,7 @@ App.NameNodeFederationWizardStep3Controller = Em.Controller.extend(App.Blueprint
     var configsFromServer = this.get('serverConfigData.items');
     var journalNodes = App.HostComponent.find().filterProperty('componentName', 'JOURNALNODE');
     var nameNodes = this.get('content.masterComponentHosts').filterProperty('component', 'NAMENODE');
-    // todo: replace with real data
-    ret.nameservice1 = 'ns1';
+    ret.nameservice1 = App.HDFSService.find().objectAt(0).get('masterComponentGroups')[0].name;
     ret.nameservice2 = this.get('content.nameServiceId');
     ret.namenode1 = nameNodes.filterProperty('isInstalled').mapProperty('hostName')[0];
     ret.namenode2 = nameNodes.filterProperty('isInstalled').mapProperty('hostName')[1];
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index c98d6f0..188972b 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1672,6 +1672,7 @@ Em.I18n.translations = {
   'admin.nameNodeFederation.wizard.step1.body':'This wizard will walk you through the process of setting up a new Highly Available NameNode pair that will be used to create a new HDFS namespace, allowing you to use Ambari to manage multiple HDFS namespaces and take advantage of HDFS Federation.',
   'admin.nameNodeFederation.wizard.step1.alert':'If you have HBase running, please exit this wizard and stop HBase first.',
   'admin.nameNodeFederation.wizard.step1.nameserviceid':'New Nameservice ID',
+  'admin.nameNodeFederation.wizard.step1.nameserviceid.existing':'Existing Nameservice ID',
   'admin.nameNodeFederation.wizard.step1.nameserviceid.error':'Must consist of letters, numbers, and hyphens. Cannot begin or end with a hyphen.',
   'admin.nameNodeFederation.wizard.step2.header': 'Select Hosts',
   'admin.nameNodeFederation.wizard.step3.header': 'Review',
diff --git a/ambari-web/app/templates/main/admin/federation/step1.hbs b/ambari-web/app/templates/main/admin/federation/step1.hbs
index 568f150..41324b3 100644
--- a/ambari-web/app/templates/main/admin/federation/step1.hbs
+++ b/ambari-web/app/templates/main/admin/federation/step1.hbs
@@ -28,6 +28,14 @@
       <div {{bindAttr class=":form-group view.showInputError:has-error :form-horizontal"}}>
         <div class="row">
           <div class="col-md-2">
+            <label>{{t admin.nameNodeFederation.wizard.step1.nameserviceid.existing}}:</label>
+          </div>
+          <div class="col-md-10">
+            {{controller.existingNameServices}}
+          </div>
+        </div>
+        <div class="row">
+          <div class="col-md-2">
             <label class="control-label">{{t admin.nameNodeFederation.wizard.step1.nameserviceid}}:</label>
           </div>
           <div class="col-md-3">
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 318be8a..86b02e3 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -3164,7 +3164,7 @@ var urls = {
         type: 'POST',
         data: JSON.stringify({
           "RequestInfo": {
-            "command" : "BOOTSTRAP", "context" : "Bootstrap NameNode"
+            "command" : "BOOTSTRAP_STANDBY", "context" : "Bootstrap NameNode"
           },
           "Requests/resource_filters": [{
             "service_name" : "HDFS",

-- 
To stop receiving notification emails like this one, please contact
akovalenko@apache.org.