Repository: ambari Updated Branches: refs/heads/branch-2.2 d0c083f3d -> 1a636f25c
AMBARI-14954 Adding HiveServer2 should not change "hadoop.proxyuser.webhcat.hosts" property. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b4a799d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b4a799d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b4a799d Branch: refs/heads/branch-2.2 Commit: 6b4a799d4b24c33e15f9347bec296cf3612954c2 Parents: d0c083f Author: ababiichuk <ababiic...@hortonworks.com> Authored: Mon Feb 8 14:02:35 2016 +0200 Committer: ababiichuk <ababiic...@hortonworks.com> Committed: Mon Feb 8 15:10:32 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/details.js | 38 +++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6b4a799d/ambari-web/app/controllers/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index 0be8868..96d6e12 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -424,7 +424,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow this.loadConfigs('loadHiveConfigs'); } else if (data.componentName == 'WEBHCAT_SERVER') { this.set('deleteWebHCatServer', true); - this.loadConfigs('loadHiveConfigs'); + this.loadConfigs('loadWebHCatConfigs'); } else if (data.componentName == 'HIVE_SERVER') { this.set('deleteHiveServer', true); this.loadConfigs('loadHiveConfigs'); @@ -597,7 +597,7 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow case 'WEBHCAT_SERVER': returnFunc = App.showConfirmationPopup(function () { self.set('webhcatServerHost', hostName); - self.loadConfigs("loadHiveConfigs"); + self.loadConfigs("loadWebHCatConfigs"); }, Em.I18n.t('hosts.host.addComponent.' + componentName) + manualKerberosWarning); break; case 'NIMBUS': @@ -830,6 +830,28 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow * @param {object} data * @method loadHiveConfigs */ + loadWebHCatConfigs: function (data) { + return App.ajax.send({ + name: 'admin.get.all_configurations', + sender: this, + data: { + webHCat: true, + urlParams: [ + '(type=hive-site&tag=' + data.Clusters.desired_configs['hive-site'].tag + ')', + '(type=webhcat-site&tag=' + data.Clusters.desired_configs['webhcat-site'].tag + ')', + '(type=hive-env&tag=' + data.Clusters.desired_configs['hive-env'].tag + ')', + '(type=core-site&tag=' + data.Clusters.desired_configs['core-site'].tag + ')' + ].join('|') + }, + success: 'onLoadHiveConfigs' + }); + }, + + /** + * Success callback for load configs request + * @param {object} data + * @method loadHiveConfigs + */ loadHiveConfigs: function (data) { return App.ajax.send({ name: 'admin.get.all_configurations', @@ -849,9 +871,11 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow /** * update and save Hive related configs to server * @param {object} data + * @param {object} opt + * @param {object} params * @method onLoadHiveConfigs */ - onLoadHiveConfigs: function (data) { + onLoadHiveConfigs: function (data, opt, params) { var hiveMetastoreHost = this.get('hiveMetastoreHost'), webhcatServerHost = this.get('webhcatServerHost'), @@ -879,8 +903,12 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow } configs['hive-site']['hive.metastore.uris'] = hiveMSHosts.join(','); configs['webhcat-site']['templeton.hive.properties'] = configs['webhcat-site']['templeton.hive.properties'].replace(/thrift.+[0-9]{2,},/i, hiveMSHosts.join('\\,') + ","); - configs['core-site']['hadoop.proxyuser.' + hiveUser + '.hosts'] = hiveMasterHosts; - configs['core-site']['hadoop.proxyuser.' + webhcatUser + '.hosts'] = hiveMasterHosts; + if (params.webHCat) { + configs['core-site']['hadoop.proxyuser.' + webhcatUser + '.hosts'] = hiveMasterHosts; + } else { + configs['core-site']['hadoop.proxyuser.' + hiveUser + '.hosts'] = hiveMasterHosts; + } + var groups = [ { properties: {