You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/02/05 22:56:53 UTC

[38/40] ambari git commit: AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)

AMBARI-14910: HAWQ hdfs-client.xml should be updated when NN HA in enabled (mithmatt via jaoki)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 26ad97b6406008981ce8bec6158f6a47bb1459a4
Parents: bb864df
Author: Jun Aoki <ja...@apache.org>
Authored: Fri Feb 5 13:23:36 2016 -0800
Committer: Jun Aoki <ja...@apache.org>
Committed: Fri Feb 5 13:23:36 2016 -0800

----------------------------------------------------------------------
 .../nameNode/rollback_controller.js             | 24 +++----
 .../nameNode/step3_controller.js                |  3 +
 .../nameNode/step9_controller.js                | 23 ++++---
 ambari-web/app/data/HDP2/ha_properties.js       | 68 +++++++++++++++++++-
 .../nameNode/step3_controller_test.js           | 49 ++++++++++++--
 5 files changed, 139 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
index 465a1d2..6895c6c 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/rollback_controller.js
@@ -251,17 +251,19 @@ App.HighAvailabilityRollbackController = App.HighAvailabilityProgressPageControl
     });
   },
   restoreHawqConfigs: function(){
-    this.loadConfigTag("hawqSiteTag");
-    var hawqSiteTag = this.get("content.hawqSiteTag");
-    App.ajax.send({
-      name: 'admin.high_availability.load_hawq_configs',
-      sender: this,
-      data: {
-        hawqSiteTag: hawqSiteTag
-      },
-      success: 'onLoadHawqConfigs',
-      error: 'onTaskError'
-    });
+    var tags = ['hawqSiteTag', 'hdfsClientTag'];
+    tags.forEach(function (tagName) {
+      var tag = this.get("content." + tagName);
+      App.ajax.send({
+        name: 'admin.high_availability.load_hawq_configs',
+        sender: this,
+        data: {
+          tagName: tag
+        },
+        success: 'onLoadHawqConfigs',
+        error: 'onTaskError'
+      });
+    }, this);
   },
 
   deletePXF: function(){

http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
index b420687..4e4df60 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step3_controller.js
@@ -100,6 +100,9 @@ App.HighAvailabilityWizardStep3Controller = Em.Controller.extend({
       var hawqSiteTag = data.Clusters.desired_configs['hawq-site'].tag;
       urlParams.push('(type=hawq-site&tag=' + hawqSiteTag + ')');
       this.set("hawqSiteTag", {name : "hawqSiteTag", value : hawqSiteTag});
+      var hdfsClientTag = data.Clusters.desired_configs['hdfs-client'].tag;
+      urlParams.push('(type=hdfs-client&tag=' + hdfsClientTag + ')');
+      this.set("hdfsClientTag", {name : "hdfsClientTag", value : hdfsClientTag});
     }
     App.ajax.send({
       name: 'admin.get.all_configurations',

http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
index 7745c6b..934d133 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/nameNode/step9_controller.js
@@ -118,16 +118,19 @@ App.HighAvailabilityWizardStep9Controller = App.HighAvailabilityProgressPageCont
 
   reconfigureHawq: function () {
     var data = this.get('content.serviceConfigProperties');
-    var configData = this.reconfigureSites(['hawq-site'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('NAMENODE')));
-    App.ajax.send({
-      name: 'common.service.configurations',
-      sender: this,
-      data: {
-        desired_config: configData
-      },
-      success: 'saveConfigTag',
-      error: 'onTaskError'
-    });
+    var reconfigureFiles = ['hawq-site', 'hdfs-client'];
+    reconfigureFiles.forEach(function (fileName) {
+      var configData = this.reconfigureSites([fileName], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('NAMENODE')));
+      App.ajax.send({
+        name: 'common.service.configurations',
+        sender: this,
+        data: {
+          desired_config: configData
+        },
+        success: 'saveConfigTag',
+        error: 'onTaskError'
+      });
+    }, this);
   },
 
   saveConfigTag: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/app/data/HDP2/ha_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/ha_properties.js b/ambari-web/app/data/HDP2/ha_properties.js
index 8b2960d..9d268d9 100644
--- a/ambari-web/app/data/HDP2/ha_properties.js
+++ b/ambari-web/app/data/HDP2/ha_properties.js
@@ -28,7 +28,7 @@ module.exports =
       App.ServiceConfigCategory.create({ name: 'AMBARI_METRICS', displayName: 'Ambari Metrics'}),
       App.ServiceConfigCategory.create({ name: 'HAWQ', displayName: 'HAWQ'})
     ],
-    sites: ['core-site', 'hdfs-site', 'hbase-site', 'accumulo-site', 'ams-hbase-site', 'hawq-site'],
+    sites: ['core-site', 'hdfs-site', 'hbase-site', 'accumulo-site', 'ams-hbase-site', 'hawq-site', 'hdfs-client'],
     configs: [
     /**********************************************HDFS***************************************/
       {
@@ -263,6 +263,72 @@ module.exports =
         "category": "HAWQ",
         "filename": "hawq-site",
         "serviceName": 'MISC'
+      },
+      {
+        "name": "dfs.nameservices",
+        "displayName": "dfs.nameservices",
+        "description": "Comma-separated list of nameservices.",
+        "isReconfigurable": false,
+        "recommendedValue": "haCluster",
+        "value": "haCluster",
+        "category": "HAWQ",
+        "filename": "hdfs-client",
+        "serviceName": 'MISC'
+      },
+      {
+        "name": "dfs.ha.namenodes.${dfs.nameservices}",
+        "displayName": "dfs.ha.namenodes.${dfs.nameservices}",
+        "description": "The prefix for a given nameservice, contains a comma-separated list of namenodes for a given nameservice.",
+        "isReconfigurable": false,
+        "recommendedValue": "nn1,nn2",
+        "value": "nn1,nn2",
+        "category": "HAWQ",
+        "filename": "hdfs-client",
+        "serviceName": 'MISC'
+      },
+      {
+        "name": "dfs.namenode.rpc-address.${dfs.nameservices}.nn1",
+        "displayName": "dfs.namenode.rpc-address.${dfs.nameservices}.nn1",
+        "description": "RPC address that handles all clients requests for nn1.",
+        "isReconfigurable": false,
+        "recommendedValue": "0.0.0.0:8020",
+        "value": "0.0.0.0:8020",
+        "category": "HAWQ",
+        "filename": "hdfs-client",
+        "serviceName": 'MISC'
+      },
+      {
+        "name": "dfs.namenode.rpc-address.${dfs.nameservices}.nn2",
+        "displayName": "dfs.namenode.rpc-address.${dfs.nameservices}.nn2",
+        "description": "RPC address that handles all clients requests for nn2.",
+        "isReconfigurable": false,
+        "recommendedValue": "0.0.0.0:8020",
+        "value": "0.0.0.0:8020",
+        "category": "HAWQ",
+        "filename": "hdfs-client",
+        "serviceName": 'MISC'
+      },
+      {
+        "name": "dfs.namenode.http-address.${dfs.nameservices}.nn1",
+        "displayName": "dfs.namenode.http-address.${dfs.nameservices}.nn1",
+        "description": "The fully-qualified HTTP address for nn1 NameNode.",
+        "isReconfigurable": false,
+        "recommendedValue": "0.0.0.0:50070",
+        "value": "0.0.0.0:50070",
+        "category": "HAWQ",
+        "filename": "hdfs-client",
+        "serviceName": 'MISC'
+      },
+      {
+        "name": "dfs.namenode.http-address.${dfs.nameservices}.nn2",
+        "displayName": "dfs.namenode.http-address.${dfs.nameservices}.nn2",
+        "description": "The fully-qualified HTTP address for nn2 NameNode.",
+        "isReconfigurable": false,
+        "recommendedValue": "0.0.0.0:50070",
+        "value": "0.0.0.0:50070",
+        "category": "HAWQ",
+        "filename": "hdfs-client",
+        "serviceName": 'MISC'
       }
     ]
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/26ad97b6/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js
index 938b2c9..8067320 100644
--- a/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js
@@ -237,42 +237,79 @@ describe('App.HighAvailabilityWizardStep3Controller', function() {
     Em.A([
       {
         config: {
-          name: 'dfs.namenode.rpc-address.${dfs.nameservices}.nn1'
+          name: 'dfs.namenode.rpc-address.${dfs.nameservices}.nn1',
+          filename: 'hdfs-site'
         },
         value: 'h1:1111',
         name: 'dfs.namenode.rpc-address.' + nameServiceId + '.nn1'
       },
       {
         config: {
-          name: 'dfs.namenode.rpc-address.${dfs.nameservices}.nn2'
+          name: 'dfs.namenode.rpc-address.${dfs.nameservices}.nn2',
+          filename: 'hdfs-site'
         },
         value: 'h2:8020',
         name: 'dfs.namenode.rpc-address.' + nameServiceId + '.nn2'
       },
       {
         config: {
-          name: 'dfs.namenode.http-address.${dfs.nameservices}.nn1'
+          name: 'dfs.namenode.http-address.${dfs.nameservices}.nn1',
+          filename: 'hdfs-site'
         },
         value: 'h1:1234',
         name: 'dfs.namenode.http-address.' + nameServiceId + '.nn1'
       },
       {
         config: {
-          name: 'dfs.namenode.http-address.${dfs.nameservices}.nn2'
+          name: 'dfs.namenode.http-address.${dfs.nameservices}.nn2',
+          filename: 'hdfs-site'
+        },
+        value: 'h2:50070',
+        name: 'dfs.namenode.http-address.' + nameServiceId + '.nn2'
+      },{
+        config: {
+          name: 'dfs.namenode.rpc-address.${dfs.nameservices}.nn1',
+          filename: 'hdfs-client'
+        },
+        value: 'h1:1111',
+        name: 'dfs.namenode.rpc-address.' + nameServiceId + '.nn1'
+      },
+      {
+        config: {
+          name: 'dfs.namenode.rpc-address.${dfs.nameservices}.nn2',
+          filename: 'hdfs-client'
+        },
+        value: 'h2:8020',
+        name: 'dfs.namenode.rpc-address.' + nameServiceId + '.nn2'
+      },
+      {
+        config: {
+          name: 'dfs.namenode.http-address.${dfs.nameservices}.nn1',
+          filename: 'hdfs-client'
+        },
+        value: 'h1:1234',
+        name: 'dfs.namenode.http-address.' + nameServiceId + '.nn1'
+      },
+      {
+        config: {
+          name: 'dfs.namenode.http-address.${dfs.nameservices}.nn2',
+          filename: 'hdfs-client'
         },
         value: 'h2:50070',
         name: 'dfs.namenode.http-address.' + nameServiceId + '.nn2'
       },
       {
         config: {
-          name: 'dfs.namenode.https-address.${dfs.nameservices}.nn1'
+          name: 'dfs.namenode.https-address.${dfs.nameservices}.nn1',
+          filename: 'hdfs-site'
         },
         value: 'h1:4321',
         name: 'dfs.namenode.https-address.' + nameServiceId + '.nn1'
       },
       {
         config: {
-          name: 'dfs.namenode.https-address.${dfs.nameservices}.nn2'
+          name: 'dfs.namenode.https-address.${dfs.nameservices}.nn2',
+          filename: 'hdfs-site'
         },
         value: 'h2:50470',
         name: 'dfs.namenode.https-address.' + nameServiceId + '.nn2'