diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/capacity-queue.js
similarity index 86%
rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.js
rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/capacity-queue.js
index 436c6d81b11..7eb9f76b0af 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/capacity-queue.js
@@ -16,10 +16,8 @@
* limitations under the License.
*/
-import Ember from 'ember';
+import YarnQueueAdapter from './yarn-queue';
-export default Ember.Route.extend({
- beforeModel() {
- this.transitionTo('yarn-queues.root');
- }
-});
\ No newline at end of file
+export default YarnQueueAdapter.extend({
+
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/fair-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/fair-queue.js
new file mode 100644
index 00000000000..7eb9f76b0af
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/fair-queue.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import YarnQueueAdapter from './yarn-queue';
+
+export default YarnQueueAdapter.extend({
+
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/fifo-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/fifo-queue.js
new file mode 100644
index 00000000000..7eb9f76b0af
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/fifo-queue.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import YarnQueueAdapter from './yarn-queue';
+
+export default YarnQueueAdapter.extend({
+
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/yarn-queue.js
similarity index 96%
rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/yarn-queue.js
index f2017df5bc4..8184c39cf09 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue/yarn-queue.js
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-import AbstractAdapter from './abstract';
+import AbstractAdapter from '../abstract';
export default AbstractAdapter.extend({
address: "rmWebAddress",
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js
index 3d72b2fbbf7..1a81a321ffb 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js
@@ -39,6 +39,9 @@ export default Ember.Component.extend({
// mainSvg
mainSvg: undefined,
+ used: undefined,
+ max: undefined,
+
// Init data
initData: function() {
this.map = { };
@@ -52,7 +55,8 @@ export default Ember.Component.extend({
}.bind(this));
// var selected = this.get("selected");
-
+ this.used = this.get("used");
+ this.max = this.get("max");
this.initQueue("root", 1, this.treeData);
},
@@ -81,7 +85,6 @@ export default Ember.Component.extend({
// Queue is not existed
return;
}
-
if (depth > this.maxDepth) {
this.maxDepth = this.maxDepth + 1;
}
@@ -149,7 +152,9 @@ export default Ember.Component.extend({
nodeEnter.append("circle")
.attr("r", 1e-6)
.style("fill", function(d) {
- var usedCap = d.queueData.get("usedCapacity");
+ var maxCap = d.queueData.get(this.max);
+ maxCap = maxCap == undefined ? 100 : maxCap;
+ var usedCap = d.queueData.get(this.used) / maxCap * 100.0;
if (usedCap <= 60.0) {
return "LimeGreen";
} else if (usedCap <= 100.0) {
@@ -157,7 +162,7 @@ export default Ember.Component.extend({
} else {
return "LightCoral";
}
- });
+ }.bind(this));
// append percentage
nodeEnter.append("text")
@@ -166,13 +171,15 @@ export default Ember.Component.extend({
.attr("fill", "white")
.attr("text-anchor", function() { return "middle"; })
.text(function(d) {
- var usedCap = d.queueData.get("usedCapacity");
+ var maxCap = d.queueData.get(this.max);
+ maxCap = maxCap == undefined ? 100 : maxCap;
+ var usedCap = d.queueData.get(this.used) / maxCap * 100.0;
if (usedCap >= 100.0) {
return usedCap.toFixed(0) + "%";
} else {
return usedCap.toFixed(1) + "%";
}
- })
+ }.bind(this))
.style("fill-opacity", 1e-6);
// append queue name
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/eq.js
similarity index 89%
rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js
rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/eq.js
index 5d14c6f39e1..7c7e5230b9a 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/eq.js
@@ -18,8 +18,6 @@
import Ember from 'ember';
-export default Ember.Route.extend({
- model() {
- return this.store.findAll('yarn-queue');
- },
-});
\ No newline at end of file
+const eq = (params) => params[0] === params[1];
+
+export default Ember.Helper.helper(eq);
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js
similarity index 94%
rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js
rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js
index 27c48f79cb8..dc8d7e57f47 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/capacity-queue.js
@@ -59,7 +59,7 @@ export default DS.Model.extend({
value: this.get("name") === "root" ? 100 : this.get("absMaxCapacity")
}
];
- }.property("absCapacity", "absUsedCapacity", "absMaxCapacity"),
+ }.property("absCapacity", "usedCapacity", "absMaxCapacity"),
userUsagesDonutChartData: function() {
var data = [];
@@ -77,7 +77,7 @@ export default DS.Model.extend({
hasUserUsages: function() {
return this.get("userUsagesDonutChartData").length > 0;
- }.property(),
+ }.property("userUsagesDonutChartData"),
numOfApplicationsDonutChartData: function() {
return [
@@ -90,5 +90,5 @@ export default DS.Model.extend({
value: this.get("numActiveApplications") || 0
}
];
- }.property()
+ }.property("numPendingApplications", "numActiveApplications")
});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/fair-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/fair-queue.js
new file mode 100644
index 00000000000..3dd401ba1ee
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/fair-queue.js
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+ name: DS.attr('string'),
+ children: DS.attr('array'),
+ parent: DS.attr('string'),
+ maxApps: DS.attr('number'),
+ minResources: DS.attr(),
+ maxResources: DS.attr(),
+ usedResources: DS.attr(),
+ demandResources: DS.attr(),
+ steadyFairResources: DS.attr(),
+ fairResources: DS.attr(),
+ clusterResources: DS.attr(),
+ pendingContainers: DS.attr('number'),
+ allocatedContainers: DS.attr('number'),
+ reservedContainers: DS.attr('number'),
+ schedulingPolicy: DS.attr('string'),
+ preemptable: DS.attr('number'),
+ numPendingApplications: DS.attr('number'),
+ numActiveApplications: DS.attr('number'),
+
+ isLeafQueue: function() {
+ var len = this.get("children.length");
+ if (!len) {
+ return true;
+ }
+ return len <= 0;
+ }.property("children"),
+
+ capacitiesBarChartData: function() {
+ return [
+ {
+ label: "Steady Fair Memory",
+ value: this.get("steadyFairResources.memory")
+ },
+ {
+ label: "Used Memory",
+ value: this.get("usedResources.memory")
+ },
+ {
+ label: "Maximum Memory",
+ value: this.get("maxResources.memory")
+ }
+ ];
+ }.property("maxResources.memory", "usedResources.memory", "maxResources.memory"),
+
+ numOfApplicationsDonutChartData: function() {
+ return [
+ {
+ label: "Pending Apps",
+ value: this.get("numPendingApplications") || 0 // TODO, fix the REST API so root will return #applications as well.
+ },
+ {
+ label: "Active Apps",
+ value: this.get("numActiveApplications") || 0
+ }
+ ];
+ }.property()
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/fifo-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/fifo-queue.js
new file mode 100644
index 00000000000..82241444043
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/fifo-queue.js
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+ name: DS.attr('string'),
+ capacity: DS.attr('number'),
+ usedCapacity: DS.attr('number'),
+ state: DS.attr('string'),
+ minQueueMemoryCapacity: DS.attr('number'),
+ maxQueueMemoryCapacity: DS.attr('number'),
+ numNodes: DS.attr('number'),
+ usedNodeCapacity: DS.attr('number'),
+ availNodeCapacity: DS.attr('number'),
+ totalNodeCapacity: DS.attr('number'),
+ numContainers: DS.attr('number'),
+
+ capacitiesBarChartData: function() {
+ return [
+ {
+ label: "Available Capacity",
+ value: this.get("availNodeCapacity")
+ },
+ {
+ label: "Used Capacity",
+ value: this.get("usedNodeCapacity")
+ },
+ {
+ label: "Total Capacity",
+ value: this.get("totalNodeCapacity")
+ }
+ ];
+ }.property("availNodeCapacity", "usedNodeCapacity", "totalNodeCapacity")
+
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/yarn-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/yarn-queue.js
new file mode 100644
index 00000000000..dcf5f48776f
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue/yarn-queue.js
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+ type: DS.attr('string')
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js
index b5db17db051..3c6abd4cfda 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js
@@ -28,7 +28,7 @@ export default AbstractRoute.extend({
{
state: "RUNNING"
}),
- queues: this.store.query('yarn-queue', {}),
+ queues: this.store.query('yarn-queue.yarn-queue', {}),
});
},
@@ -39,6 +39,6 @@ export default AbstractRoute.extend({
unloadAll() {
this.store.unloadAll('ClusterMetric');
this.store.unloadAll('yarn-app');
- this.store.unloadAll('yarn-queue');
+ this.store.unloadAll('yarn-queue.yarn-queue');
}
});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js
index 1c4546cae0e..7e6efbf1558 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js
@@ -22,22 +22,30 @@ import AbstractRoute from './abstract';
export default AbstractRoute.extend({
model(param) {
- return Ember.RSVP.hash({
- selected : param.queue_name,
- queues: this.store.query('yarn-queue', {}),
- selectedQueue : undefined,
- apps: this.store.query('yarn-app', {
- queue: param.queue_name
- })
- });
+ return Ember.RSVP.hash({
+ selected : param.queue_name,
+ queue: this.store.query('yarn-queue.yarn-queue', {}),
+ capacityQueue: this.store.query('yarn-queue.capacity-queue', {}),
+ fairQueue: this.store.query('yarn-queue.fair-queue', {}),
+ fifoQueue: this.store.query('yarn-queue.fifo-queue', {}),
+ selectedQueue : undefined,
+ apps: this.store.query('yarn-app', {
+ queue: param.queue_name
+ })
+ });
},
afterModel(model) {
- model.selectedQueue = this.store.peekRecord('yarn-queue', model.selected);
+ var type = model.queue.get('firstObject').get('type');
+ var queue = "yarn-queue." + type + '-queue';
+ model.selectedQueue = this.store.peekRecord(queue, model.selected);
},
unloadAll() {
- this.store.unloadAll('yarn-queue');
+ this.store.unloadAll('yarn-queue.yarn-queue');
+ this.store.unloadAll('yarn-queue.capacity-queue');
+ this.store.unloadAll('yarn-queue.fair-queue');
+ this.store.unloadAll('yarn-queue.fifo-queue');
this.store.unloadAll('yarn-app');
}
});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js
index e4f145d00b6..406335bed9e 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues.js
@@ -30,17 +30,24 @@ export default AbstractRoute.extend({
}
return Ember.RSVP.hash({
selected : queueName,
- queues: this.store.query('yarn-queue', {}),
+ queue: this.store.query('yarn-queue.yarn-queue', {}),
+ capacityQueue: this.store.query('yarn-queue.capacity-queue', {}),
+ fairQueue: this.store.query('yarn-queue.fair-queue', {}),
+ fifoQueue: this.store.query('yarn-queue.fifo-queue', {}),
selectedQueue : undefined
});
},
afterModel(model) {
- model.selectedQueue = this.store.peekRecord('yarn-queue', model.selected);
+ var type = model.queue.get('firstObject').get('type');
+ model.selectedQueue = this.store.peekRecord("yarn-queue." + type + '-queue', model.selected);
},
unloadAll() {
- this.store.unloadAll('yarn-queue');
+ this.store.unloadAll('yarn-queue.yarn-queue');
+ this.store.unloadAll('yarn-queue.fair-queue');
+ this.store.unloadAll('yarn-queue.capacity-queue');
+ this.store.unloadAll('yarn-queue.fifo-queue');
this.store.unloadAll('yarn-app');
},
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js
similarity index 99%
rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js
index 4fc1a29ad0e..df962aeac6d 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/capacity-queue.js
@@ -81,7 +81,6 @@ export default DS.JSONAPISerializer.extend({
}
}
};
-
return {
queue: this._super(store, primaryModelClass, fixedPayload, id, requestType),
includedData: includedData
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/fair-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/fair-queue.js
new file mode 100644
index 00000000000..4b01c165808
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/fair-queue.js
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+export default DS.JSONAPISerializer.extend({
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ var children = [];
+ if (payload.childQueues) {
+ payload.childQueues.queue.forEach(function(queue) {
+ children.push(queue.queueName);
+ });
+ }
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ name: payload.queueName,
+ parent: payload.myParent,
+ children: children,
+ maxApps: payload.maxApps,
+ minResources: payload.minResources,
+ maxResources: payload.maxResources,
+ usedResources: payload.usedResources,
+ demandResources: payload.demandResources,
+ steadyFairResources: payload.steadyFairResources,
+ fairResources: payload.fairResources,
+ clusterResources: payload.clusterResources,
+ pendingContainers: payload.pendingContainers,
+ allocatedContainers: payload.allocatedContainers,
+ reservedContainers: payload.reservedContainers,
+ schedulingPolicy: payload.schedulingPolicy,
+ preemptable: payload.preemptable,
+ numPendingApplications: payload.numPendingApps,
+ numActiveApplications: payload.numActiveApps
+ },
+ };
+ return this._super(store, primaryModelClass, fixedPayload, id, requestType);
+ },
+
+ handleQueue(store, primaryModelClass, payload, id, requestType) {
+ var data = [];
+ var includedData = [];
+ if(!payload) return data;
+ var result = this.normalizeSingleResponse(store, primaryModelClass,
+ payload, id, requestType);
+
+ data.push(result);
+
+ if (payload.childQueues) {
+ for (var i = 0; i < payload.childQueues.queue.length; i++) {
+ var queue = payload.childQueues.queue[i];
+ queue.myParent = payload.queueName;
+ var childResult = this.handleQueue(store, primaryModelClass, queue,
+ queue.queueName,
+ requestType);
+
+ data = data.concat(childResult);
+ }
+ }
+
+ return data;
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {
+ var normalizedArrayResponse = {};
+ var result = this.handleQueue(store, primaryModelClass,
+ payload.scheduler.schedulerInfo.rootQueue, "root", requestType);
+
+ normalizedArrayResponse.data = result;
+
+ return normalizedArrayResponse;
+ }
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/fifo-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/fifo-queue.js
new file mode 100644
index 00000000000..b53061f4ea8
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/fifo-queue.js
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+export default DS.JSONAPISerializer.extend({
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ name: id,
+ capacity: payload.capacity * 100,
+ usedCapacity: payload.usedCapacity * 100,
+ usedNodeCapacity: payload.usedNodeCapacity,
+ availNodeCapacity: payload.availNodeCapacity,
+ totalNodeCapacity: payload.totalNodeCapacity,
+ numNodes: payload.numNodes,
+ numContainers: payload.numContainers,
+ state: payload.qstate,
+ minQueueMemoryCapacity: payload.minQueueMemoryCapacity,
+ maxQueueMemoryCapacity: payload.maxQueueMemoryCapacity
+ },
+
+ };
+
+ return this._super(store, primaryModelClass, fixedPayload, id,
+ requestType);
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {
+ var normalizedArrayResponse = {};
+ normalizedArrayResponse.data = [
+ this.normalizeSingleResponse(store, primaryModelClass,
+ payload.scheduler.schedulerInfo, "root", requestType)
+ ];
+
+ return normalizedArrayResponse;
+ }
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/yarn-queue.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/yarn-queue.js
new file mode 100644
index 00000000000..b2e0f2f4298
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue/yarn-queue.js
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import DS from 'ember-data';
+
+export default DS.JSONAPISerializer.extend({
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ type: payload.type.split(/(?=[A-Z])/)[0]
+ }
+ };
+ return this._super(store, primaryModelClass, fixedPayload, id,
+ requestType);
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) {
+ var normalizedArrayResponse = {};
+
+ normalizedArrayResponse.data = [
+ this.normalizeSingleResponse(store, primaryModelClass,
+ payload.scheduler.schedulerInfo, "root", requestType)
+ ];
+
+ return normalizedArrayResponse;
+ }
+});
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs
index d8dd236f6ac..26173c92473 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs
@@ -20,9 +20,12 @@
- {{tree-selector model=model parentId="tree-selector-container" selected=selected}}
+
+ Scheduler: {{type}}
+
+ {{tree-selector model=model parentId="tree-selector-container" selected=selected used=used max=max}}
-{{outlet}}
\ No newline at end of file
+{{outlet}}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue-conf-table.hbs
similarity index 99%
rename from hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs
rename to hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue-conf-table.hbs
index 17a1e1ab39e..3f6017ff9cb 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue-conf-table.hbs
@@ -51,4 +51,4 @@
{{/if}}
-
\ No newline at end of file
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue-info.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue-info.hbs
new file mode 100644
index 00000000000..7d44e69aee2
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue-info.hbs
@@ -0,0 +1,84 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+
+
+
+
+
+ Queue Capacities: {{model.selected}}
+
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData
+ title=""
+ parentId="capacity-bar-chart"
+ textWidth=170
+ ratio=0.55
+ maxHeight=350}}
+
+
+
+
+
+
+
+ Queue Information: {{model.selected}}
+
+ {{yarn-queue.capacity-queue-conf-table queue=model.selectedQueue}}
+
+
+
+
+
+
+
+
+
+
+ Running Apps: {{model.selected}}
+
+
+ {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData
+ showLabels=true
+ parentId="numapplications-donut-chart"
+ ratio=0.6
+ maxHeight=350}}
+
+
+
+
+ {{#if model.selectedQueue.hasUserUsages}}
+
+
+
+ User Usages: {{model.selected}}
+
+
+ {{donut-chart data=model.selectedQueue.userUsagesDonutChartData
+ showLabels=true
+ parentId="userusage-donut-chart"
+ type="memory"
+ ratio=0.6
+ maxHeight=350}}
+
+
+
+ {{/if}}
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue.hbs
new file mode 100644
index 00000000000..e94095c2ac0
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/capacity-queue.hbs
@@ -0,0 +1,63 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+{{queue-navigator model=model.capacityQueue type=model.queue.firstObject.type
+ selected=model.selected used="usedCapacity" max="absMaxCapacity"}}
+
+
+
+
+
+ Queue Information: {{model.selected}}
+
+ {{yarn-queue.capacity-queue-conf-table queue=model.selectedQueue}}
+
+
+
+
+
+
+ Queue Capacities: {{model.selected}}
+
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData
+ title=""
+ parentId="capacity-bar-chart"
+ textWidth=175
+ ratio=0.55
+ maxHeight=350}}
+
+
+
+
+
+
+
+ Running Apps: {{model.selected}}
+
+
+ {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData
+ showLabels=true
+ parentId="numapplications-donut-chart"
+ ratio=0.6
+ maxHeight=350}}
+
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue-conf-table.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue-conf-table.hbs
new file mode 100644
index 00000000000..8dfd9603894
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue-conf-table.hbs
@@ -0,0 +1,52 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+
+
+
+ | Configurations |
+ Value |
+
+
+
+
+ | Fair Memory , VCores |
+ {{queue.fairResources.memory}} MB, {{queue.fairResources.vCores}} |
+
+
+ | Minimum Memory , VCores |
+ {{queue.minResources.memory}} MB, {{queue.minResources.vCores}} |
+
+
+ | Cluster Memory , VCores |
+ {{queue.clusterResources.memory}} MB, {{queue.clusterResources.vCores}} |
+
+
+ | Pending , Allocated , Reserved Containers |
+ {{queue.pendingContainers}} , {{queue.allocatedContainers}} , {{queue.reservedContainers}} |
+
+
+ | Scheduling Policy |
+ {{queue.schedulingPolicy}} |
+
+
+ | Preemption Enabled |
+ {{queue.preemptable}} |
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue-info.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue-info.hbs
new file mode 100644
index 00000000000..a770bfe1641
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue-info.hbs
@@ -0,0 +1,66 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+
+
+
+
+
+ Queue Capacities: {{model.selected}}
+
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData
+ title=""
+ parentId="capacity-bar-chart"
+ textWidth=170
+ ratio=0.55
+ maxHeight=350}}
+
+
+
+
+
+
+
+ Queue Information: {{model.selected}}
+
+ {{yarn-queue.fair-queue-conf-table queue=model.selectedQueue}}
+
+
+
+
+
+
+
+
+
+
+ Running Apps: {{model.selected}}
+
+
+ {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData
+ showLabels=true
+ parentId="numapplications-donut-chart"
+ ratio=0.6
+ maxHeight=350}}
+
+
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue.hbs
new file mode 100644
index 00000000000..70c9b7c4f86
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fair-queue.hbs
@@ -0,0 +1,63 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+{{queue-navigator model=model.fairQueue type=model.queue.firstObject.type
+ selected=model.selected used="usedResources.memory" max="clusterResources.memory"}}
+
+
+
+
+
+ Queue Information: {{model.selected}}
+
+ {{yarn-queue.fair-queue-conf-table queue=model.selectedQueue}}
+
+
+
+
+
+
+ Queue Capacities: {{model.selected}}
+
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData
+ title=""
+ parentId="capacity-bar-chart"
+ textWidth=150
+ ratio=0.55
+ maxHeight=350}}
+
+
+
+
+
+
+
+ Running Apps: {{model.selected}}
+
+
+ {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData
+ showLabels=true
+ parentId="numapplications-donut-chart"
+ ratio=0.6
+ maxHeight=350}}
+
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue-conf-table.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue-conf-table.hbs
new file mode 100644
index 00000000000..4ced3e70c86
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue-conf-table.hbs
@@ -0,0 +1,56 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+
+
+
+ | Configurations |
+ Value |
+
+
+
+
+ | Configured Capacity |
+ {{queue.capacity}} |
+
+
+ | Used Capacity |
+ {{queue.usedCapacity}} |
+
+
+ | State |
+ {{queue.state}} |
+
+
+ | Minimum Queue Memory Capacity |
+ {{queue.minQueueMemoryCapacity}} |
+
+
+ | Maximum Queue Memory Capacity |
+ {{queue.maxQueueMemoryCapacity}} |
+
+
+ | Number of Nodes |
+ {{queue.numNodes}} |
+
+
+ | Number of Containers |
+ {{queue.numContainers}} |
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue-info.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue-info.hbs
new file mode 100644
index 00000000000..7f4e8a7996a
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue-info.hbs
@@ -0,0 +1,47 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+
+
+
+
+
+ Queue Capacities: {{model.selected}}
+
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData
+ title=""
+ parentId="capacity-bar-chart"
+ textWidth=170
+ ratio=0.55
+ maxHeight=350}}
+
+
+
+
+
+
+
+ Queue Information: {{model.selected}}
+
+ {{yarn-queue.fifo-queue-conf-table queue=model.selectedQueue}}
+
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue.hbs
new file mode 100644
index 00000000000..b8dfb235840
--- /dev/null
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-queue/fifo-queue.hbs
@@ -0,0 +1,48 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+{{queue-navigator model=model.fifoQueue type=model.queue.firstObject.type
+ selected=model.selected used="usedNodeCapacity" max="totalNodeCapacity"}}
+
+
+
+
+
+ Queue Information: {{model.selected}}
+
+ {{yarn-queue.fifo-queue-conf-table queue=model.selectedQueue}}
+
+
+
+
+
+
+ Queue Capacities: {{model.selected}}
+
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData
+ title=""
+ parentId="capacity-bar-chart"
+ textWidth=150
+ ratio=0.55
+ maxHeight=350}}
+
+
+
+
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/info.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/info.hbs
index c112ef9b3df..d777053de46 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/info.hbs
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue/info.hbs
@@ -16,69 +16,10 @@
* limitations under the License.
}}
-
-
-
-
-
- Queue Capacities: {{model.selected}}
-
-
-
- {{bar-chart data=model.selectedQueue.capacitiesBarChartData
- title=""
- parentId="capacity-bar-chart"
- textWidth=170
- ratio=0.55
- maxHeight=350}}
-
-
-
-
-
-
-
- Queue Information: {{model.selected}}
-
- {{queue-configuration-table queue=model.selectedQueue}}
-
-
-
-
-
-
-
-
-
-
- Running Apps: {{model.selected}}
-
-
- {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData
- showLabels=true
- parentId="numapplications-donut-chart"
- ratio=0.6
- maxHeight=350}}
-
-
-
-
- {{#if model.selectedQueue.hasUserUsages}}
-
-
-
- User Usages: {{model.selected}}
-
-
- {{donut-chart data=model.selectedQueue.userUsagesDonutChartData
- showLabels=true
- parentId="userusage-donut-chart"
- type="memory"
- ratio=0.6
- maxHeight=350}}
-
-
-
- {{/if}}
-
-
+{{#if (eq model.queue.firstObject.type "capacity")}}
+ {{yarn-queue.capacity-queue-info model=model}}
+{{else if (eq model.queue.firstObject.type "fair")}}
+ {{yarn-queue.fair-queue-info model=model}}
+{{else}}
+ {{yarn-queue.fifo-queue-info model=model}}
+{{/if}}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs
index 6dfb22014eb..7d109a20261 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs
@@ -17,54 +17,14 @@
}}
{{breadcrumb-bar breadcrumbs=breadcrumbs}}
-
- {{queue-navigator model=model.queues selected=model.selected}}
-
-
-
-
-
-
- Queue Information: {{model.selected}}
-
- {{queue-configuration-table queue=model.selectedQueue}}
-
-
-
-
-
-
- Queue Capacities: {{model.selected}}
-
-
-
- {{bar-chart data=model.selectedQueue.capacitiesBarChartData
- title=""
- parentId="capacity-bar-chart"
- textWidth=150
- ratio=0.55
- maxHeight=350}}
-
-
-
-
-
-
-
- Running Apps: {{model.selected}}
-
-
- {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData
- showLabels=true
- parentId="numapplications-donut-chart"
- ratio=0.6
- maxHeight=350}}
-
-
-
-
-
+ {{#if (eq model.queue.firstObject.type "capacity")}}
+ {{yarn-queue.capacity-queue model=model}}
+ {{else if (eq model.queue.firstObject.type "fair")}}
+ {{yarn-queue.fair-queue model=model}}
+ {{else}}
+ {{yarn-queue.fifo-queue model=model}}
+ {{/if}}
{{outlet}}
diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/color-utils.js hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/color-utils.js
index 6c0cfee214c..af0cdf4dd63 100644
--- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/color-utils.js
+++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/color-utils.js
@@ -55,7 +55,6 @@ export default {
}
}
- console.log(colors);
return colors;
},