ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject git commit: AMBARI-5213. HCat client configs can be refreshed only on host/component level, but not on service level. (srimanth)
Date Tue, 25 Mar 2014 20:18:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.5.0 617254e27 -> fa2985a85


AMBARI-5213. HCat client configs can be refreshed only on host/component level, but not on
service level. (srimanth)


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

Branch: refs/heads/branch-1.5.0
Commit: fa2985a857e5246c821a0037d33479d702148630
Parents: 617254e
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Tue Mar 25 13:04:17 2014 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Tue Mar 25 13:06:45 2014 -0700

----------------------------------------------------------------------
 ambari-web/app/models/service.js                 | 12 ++++++++++++
 ambari-web/app/utils/batch_scheduled_requests.js | 12 ++++++++++++
 2 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fa2985a8/ambari-web/app/models/service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service.js b/ambari-web/app/models/service.js
index 805bb64..26d1def 100644
--- a/ambari-web/app/models/service.js
+++ b/ambari-web/app/models/service.js
@@ -105,6 +105,18 @@ App.Service = DS.Model.extend({
    */
   isRestartRequired: function () {
     var rhc = this.get('hostComponents').filterProperty('staleConfigs', true);
+
+    // HCatalog components are technically owned by Hive.
+    if (this.get('serviceName') == 'HIVE') {
+      var hcatService = App.Service.find('HCATALOG');
+      if (hcatService != null && hcatService.get('isLoaded')) {
+        var hcatStaleHcs = hcatService.get('hostComponents').filterProperty('staleConfigs',
true);
+        if (hcatStaleHcs != null) {
+          rhc.pushObjects(hcatStaleHcs);
+        }
+      }
+    }
+
     var hc = {};
     rhc.forEach(function(_rhc) {
       var hostName = _rhc.get('host.publicHostName');

http://git-wip-us.apache.org/repos/asf/ambari/blob/fa2985a8/ambari-web/app/utils/batch_scheduled_requests.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/batch_scheduled_requests.js b/ambari-web/app/utils/batch_scheduled_requests.js
index c4401c0..53f9ebb 100644
--- a/ambari-web/app/utils/batch_scheduled_requests.js
+++ b/ambari-web/app/utils/batch_scheduled_requests.js
@@ -74,6 +74,18 @@ module.exports = {
     var context = staleConfigsOnly ? Em.I18n.t('rollingrestart.context.allWithStaleConfigsForSelectedService').format(serviceName)
: Em.I18n.t('rollingrestart.context.allForSelectedService').format(serviceName);
     if (service) {
       var hostComponents = service.get('hostComponents').filterProperty('host.passiveState','OFF');
+
+      // HCatalog components are technically owned by Hive.
+      if (serviceName == 'HIVE') {
+        var hcatService = App.Service.find('HCATALOG');
+        if (hcatService != null && hcatService.get('isLoaded')) {
+          var hcatHcs = hcatService.get('hostComponents').filterProperty('host.passiveState',
'OFF');
+          if (hcatHcs != null) {
+            hostComponents.pushObjects(hcatHcs);
+          }
+        }
+      }
+
       if (staleConfigsOnly) {
         hostComponents = hostComponents.filterProperty('staleConfigs', true);
       }


Mime
View raw message