Example #1
0
 }, function (data) {
   var hostComponents = [];
   data.items.forEach(function (host) {
     host.host_components.forEach(function (hostComponent) {
       hostComponents.push(Em.Object.create({
         componentName: hostComponent.HostRoles.component_name,
         hostName: host.Hosts.host_name
       }));
     })
   });
   // if NameNode included, check HDFS NameNode checkpoint before restart NN
   var nn_count = hostComponents.filterProperty('componentName', 'NAMENODE').get('length');
   if (nn_count == 1 && App.Service.find().filterProperty('serviceName', 'HDFS').someProperty('workStatus', App.HostComponentStatus.started)) {
     var hostName = hostComponents.findProperty('componentName', 'NAMENODE').get('hostName');
     App.router.get('mainHostDetailsController').checkNnLastCheckpointTime(function () {
       batchUtils.restartHostComponents(hostComponents, Em.I18n.t('rollingrestart.context.allOnSelectedHosts'), "HOST");
     }, hostName);
   } else if (nn_count == 2 && App.Service.find().filterProperty('serviceName', 'HDFS').someProperty('workStatus', App.HostComponentStatus.started)) {
     // HA enabled
     App.router.get('mainServiceItemController').checkNnLastCheckpointTime(function () {
       batchUtils.restartHostComponents(hostComponents, Em.I18n.t('rollingrestart.context.allOnSelectedHosts'), "HOST");
     });
   } else {
     batchUtils.restartHostComponents(hostComponents, Em.I18n.t('rollingrestart.context.allOnSelectedHosts'), "HOST");
   }
 });
Example #2
0
 }, function (data) {
   var hostComponents = [];
   data.items.forEach(function (host) {
     host.host_components.forEach(function (hostComponent) {
       hostComponents.push(Em.Object.create({
         componentName: hostComponent.HostRoles.component_name,
         hostName: host.Hosts.host_name
       }));
     })
   });
   batchUtils.restartHostComponents(hostComponents, Em.I18n.t('rollingrestart.context.allOnSelectedHosts'), "HOST");
 });
Example #3
0
        }, function (data) {
          var hostComponents = [];

          data.items.forEach(function (host) {
            host.host_components.forEach(function (hostComponent) {
              hostComponents.push(Em.Object.create({
                componentName: hostComponent.HostRoles.component_name,
                hostName: host.Hosts.host_name
              }))
            });
          });
          batchUtils.restartHostComponents(hostComponents, Em.I18n.t('rollingrestart.context.allForSelectedService').format(self.get('content.serviceName')), "SERVICE", query);
        })
Example #4
0
 App.router.get('mainServiceItemController').checkNnLastCheckpointTime(function () {
   batchUtils.restartHostComponents(hostComponents, Em.I18n.t('rollingrestart.context.allOnSelectedHosts'), "HOST");
 });