ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-12668. Not possible to do rolling restart of NodeManagers if YARN is in MM (akovalenko)
Date Fri, 07 Aug 2015 11:15:57 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6ce594e04 -> db7149dd2


AMBARI-12668. Not possible to do rolling restart of NodeManagers if YARN is in MM (akovalenko)


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

Branch: refs/heads/trunk
Commit: db7149dd2ea6b2b9ee01ff1ac3a52329debff0f6
Parents: 6ce594e
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Fri Aug 7 14:03:09 2015 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Fri Aug 7 14:15:13 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/mappers/service_mapper.js         | 16 +++++++++++-----
 ambari-web/app/mappers/service_metrics_mapper.js |  1 +
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/db7149dd/ambari-web/app/mappers/service_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_mapper.js b/ambari-web/app/mappers/service_mapper.js
index 2109604..e62ab33 100644
--- a/ambari-web/app/mappers/service_mapper.js
+++ b/ambari-web/app/mappers/service_mapper.js
@@ -22,32 +22,32 @@ App.serviceMapper = App.QuickDataMapper.create({
   config: {
     id: 'ServiceInfo.service_name',
     service_name: 'ServiceInfo.service_name',
-    work_status: 'ServiceInfo.state',
-    passive_state: 'ServiceInfo.passive_state'
+    work_status: 'ServiceInfo.state'
   },
   initialAppLoad: false,
+  passiveStateMap: {},
   map: function (json) {
     console.time("App.serviceMapper execution time");
     var self = this;
+    var passiveStateMap = this.get('passiveStateMap');
     json.items.forEach(function (service) {
       var cachedService = App.cache['services'].findProperty('ServiceInfo.service_name',
service.ServiceInfo.service_name);
       if (cachedService) {
         // restore service workStatus
         App.Service.find(cachedService.ServiceInfo.service_name).set('workStatus', service.ServiceInfo.state);
         cachedService.ServiceInfo.state = service.ServiceInfo.state;
-        cachedService.ServiceInfo.passive_state = service.ServiceInfo.maintenance_state;
       } else {
         var serviceData = {
           ServiceInfo: {
             service_name: service.ServiceInfo.service_name,
-            state: service.ServiceInfo.state,
-            passive_state: service.ServiceInfo.maintenance_state
+            state: service.ServiceInfo.state
           },
           host_components: [],
           components: []
         };
         App.cache['services'].push(serviceData);
       }
+      passiveStateMap[service.ServiceInfo.service_name] = service.ServiceInfo.maintenance_state;
     });
 
     if (!this.get('initialAppLoad')) {
@@ -59,6 +59,12 @@ App.serviceMapper = App.QuickDataMapper.create({
       App.store.commit();
       this.set('initialAppLoad', true);
     }
+
+    for (var service in passiveStateMap) {
+      if (passiveStateMap.hasOwnProperty(service)) {
+        App.Service.find(service).set('passiveState', passiveStateMap[service]);
+      }
+    }
     console.timeEnd("App.serviceMapper execution time");
   }
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/db7149dd/ambari-web/app/mappers/service_metrics_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/service_metrics_mapper.js b/ambari-web/app/mappers/service_metrics_mapper.js
index bb9c17e..1f1aa3a 100644
--- a/ambari-web/app/mappers/service_metrics_mapper.js
+++ b/ambari-web/app/mappers/service_metrics_mapper.js
@@ -236,6 +236,7 @@ App.serviceMetricsMapper = App.QuickDataMapper.create({
 
         var extendedModelInfo = this.mapExtendedModel(item);
         if (extendedModelInfo) {
+          extendedModelInfo.passive_state = App.Service.find(item.ServiceInfo.service_name).get('passiveState');
           result.push(extendedModelInfo);
         }
       }, this);


Mime
View raw message