|
@@ -71,7 +71,8 @@ App.Service = DS.Model.extend({
|
|
|
serviceName = this.get('serviceName'),
|
|
|
isRunning = true,
|
|
|
runningHCs = [],
|
|
|
- unknownHCs = [];
|
|
|
+ unknownHCs = [],
|
|
|
+ hdfsHealthStatus;
|
|
|
|
|
|
//look through all components to find out common statuses
|
|
|
this.get('hostComponents').forEach(function (_hostComponent) {
|
|
@@ -132,21 +133,16 @@ App.Service = DS.Model.extend({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Both App.HDFSService and its parent (App.Service) can hit this block.
|
|
|
- * We need a property: App.HDFSService.hdfsHealthStatus to store the correct status.
|
|
|
- * When App.HDFSService get in, we store the status in that property based on if activeNN existed.
|
|
|
- * When App.Service get in, we get correct health status from that property.
|
|
|
- */
|
|
|
if (isGreen && serviceName === 'HDFS' && masterComponents.length == 5) { // enabled HA
|
|
|
var activeNN = this.get('activeNameNode');
|
|
|
var nameNode = this.get('nameNode');
|
|
|
+
|
|
|
if (nameNode && !activeNN) { //hdfs model but no active NN
|
|
|
- App.HDFSService.hdfsHealthStatus = 'red';
|
|
|
+ hdfsHealthStatus = 'red';
|
|
|
} else if (nameNode && activeNN) {
|
|
|
- App.HDFSService.hdfsHealthStatus = 'green';
|
|
|
+ hdfsHealthStatus = 'green';
|
|
|
}
|
|
|
- this.set('healthStatus', App.HDFSService.hdfsHealthStatus);
|
|
|
+ this.set('healthStatus', hdfsHealthStatus);
|
|
|
}
|
|
|
|
|
|
this.set('isStarted', everyStarted);
|