You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wa...@apache.org on 2016/10/27 19:12:04 UTC
[20/50] [abbrv] hadoop git commit: YARN-4849. [YARN-3368] cleanup
code base, integrate web UI related build to mvn, and fix licenses. (wangda)
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js
new file mode 100644
index 0000000..89858bf
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queue.js
@@ -0,0 +1,38 @@
+/**
+ * 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 Ember from 'ember';
+
+export default Ember.Route.extend({
+ model(param) {
+ return Ember.RSVP.hash({
+ selected : param.queue_name,
+ queues: this.store.findAll('yarnQueue'),
+ selectedQueue : undefined,
+ apps: undefined, // apps of selected queue
+ });
+ },
+
+ afterModel(model) {
+ model.selectedQueue = this.store.peekRecord('yarnQueue', model.selected);
+ model.apps = this.store.findAll('yarnApp');
+ model.apps.forEach(function(o) {
+ console.log(o);
+ })
+ }
+});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.js
new file mode 100644
index 0000000..7da6f6d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/index.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.
+ */
+
+export default Ember.Route.extend({
+ beforeModel() {
+ this.transitionTo('yarnQueues.root');
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js
new file mode 100644
index 0000000..3686c83
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-queues/queues-selector.js
@@ -0,0 +1,25 @@
+/**
+ * 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 Ember from 'ember';
+
+export default Ember.Route.extend({
+ model() {
+ return this.store.findAll('yarnQueue');
+ },
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-info.js
new file mode 100644
index 0000000..fad321a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-info.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: payload
+ };
+
+ return this._super(store, primaryModelClass, fixedPayload, id,
+ requestType);
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // return expected is { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+
+ // payload has apps : { app: [ {},{},{} ] }
+ // need some error handling for ex apps or app may not be defined.
+ normalizedArrayResponse.data = [
+ this.normalizeSingleResponse(store, primaryModelClass,
+ payload.clusterInfo, payload.clusterInfo.id, requestType)
+ ];
+ return normalizedArrayResponse;
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-metric.js
new file mode 100644
index 0000000..73c4bc5
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/cluster-metric.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: payload
+ };
+
+ return this._super(store, primaryModelClass, fixedPayload, id,
+ requestType);
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // return expected is { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+
+ // payload has apps : { app: [ {},{},{} ] }
+ // need some error handling for ex apps or app may not be defined.
+ normalizedArrayResponse.data = [
+ this.normalizeSingleResponse(store, primaryModelClass,
+ payload.clusterMetrics, 1, requestType)
+ ];
+ return normalizedArrayResponse;
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js
new file mode 100644
index 0000000..291589c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app-attempt.js
@@ -0,0 +1,67 @@
+/**
+ * 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';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+
+ if (payload.appAttempt) {
+ payload = payload.appAttempt;
+ }
+
+ var fixedPayload = {
+ id: payload.appAttemptId,
+ type: primaryModelClass.modelName, // yarn-app
+ attributes: {
+ startTime: Converter.timeStampToDate(payload.startTime),
+ finishedTime: Converter.timeStampToDate(payload.finishedTime),
+ containerId: payload.containerId,
+ nodeHttpAddress: payload.nodeHttpAddress,
+ nodeId: payload.nodeId,
+ state: payload.nodeId,
+ logsLink: payload.logsLink
+ }
+ };
+
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload, id, requestType);
+ return { data: p };
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // return expected is { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+
+ // payload has apps : { app: [ {},{},{} ] }
+ // need some error handling for ex apps or app may not be defined.
+ normalizedArrayResponse.data = payload.appAttempts.appAttempt.map(singleApp => {
+ return this.internalNormalizeSingleResponse(store, primaryModelClass,
+ singleApp, singleApp.id, requestType);
+ }, this);
+ return normalizedArrayResponse;
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
new file mode 100644
index 0000000..234ad24
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-app.js
@@ -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.
+ */
+
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ if (payload.app) {
+ payload = payload.app;
+ }
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName, // yarn-app
+ attributes: {
+ appName: payload.name,
+ user: payload.user,
+ queue: payload.queue,
+ state: payload.state,
+ startTime: Converter.timeStampToDate(payload.startedTime),
+ elapsedTime: Converter.msToElapsedTime(payload.elapsedTime),
+ finishedTime: Converter.timeStampToDate(payload.finishedTime),
+ finalStatus: payload.finalStatus,
+ progress: payload.progress,
+ diagnostics: payload.diagnostics,
+ amContainerLogs: payload.amContainerLogs,
+ amHostHttpAddress: payload.amHostHttpAddress,
+ logAggregationStatus: payload.logAggregationStatus,
+ unmanagedApplication: payload.unmanagedApplication,
+ amNodeLabelExpression: payload.amNodeLabelExpression,
+ priority: payload.priority,
+ allocatedMB: payload.allocatedMB,
+ allocatedVCores: payload.allocatedVCores,
+ runningContainers: payload.runningContainers,
+ memorySeconds: payload.memorySeconds,
+ vcoreSeconds: payload.vcoreSeconds,
+ preemptedResourceMB: payload.preemptedResourceMB,
+ preemptedResourceVCores: payload.preemptedResourceVCores,
+ numNonAMContainerPreempted: payload.numNonAMContainerPreempted,
+ numAMContainerPreempted: payload.numAMContainerPreempted
+ }
+ };
+
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload, id, requestType);
+ return { data: p };
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // return expected is { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+
+ // payload has apps : { app: [ {},{},{} ] }
+ // need some error handling for ex apps or app may not be defined.
+ normalizedArrayResponse.data = payload.apps.app.map(singleApp => {
+ return this.internalNormalizeSingleResponse(store, primaryModelClass,
+ singleApp, singleApp.id, requestType);
+ }, this);
+ return normalizedArrayResponse;
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container-log.js
new file mode 100644
index 0000000..9e10615
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container-log.js
@@ -0,0 +1,39 @@
+/**
+ * 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';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // Convert plain text response into JSON.
+ // ID is of the form nodeAddress!containerId!fileName
+ var splits = Converter.splitForContainerLogs(id);
+ var convertedPayload = {
+ id: id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ logs: payload,
+ containerID: splits[1],
+ logFileName: splits[2]
+ }
+ };
+ return { data: convertedPayload };
+ },
+});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js
new file mode 100644
index 0000000..6f0386f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-container.js
@@ -0,0 +1,72 @@
+/**
+ * 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';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+
+ var fixedPayload = {
+ id: payload.containerId,
+ type: primaryModelClass.modelName, // yarn-app
+ attributes: {
+ allocatedMB: payload.allocatedMB,
+ allocatedVCores: payload.allocatedVCores,
+ assignedNodeId: payload.assignedNodeId,
+ priority: payload.priority,
+ startedTime: Converter.timeStampToDate(payload.startedTime),
+ finishedTime: Converter.timeStampToDate(payload.finishedTime),
+ elapsedTime: payload.elapsedTime,
+ logUrl: payload.logUrl,
+ containerExitStatus: payload.containerExitStatus,
+ containerState: payload.containerState,
+ nodeHttpAddress: payload.nodeHttpAddress
+ }
+ };
+
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload, id, requestType);
+ return { data: p };
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // return expected is { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+
+ if (payload && payload.container) {
+ // payload has apps : { app: [ {},{},{} ] }
+ // need some error handling for ex apps or app may not be defined.
+ normalizedArrayResponse.data = payload.container.map(singleContainer => {
+ return this.internalNormalizeSingleResponse(store, primaryModelClass,
+ singleContainer, singleContainer.id, requestType);
+ }, this);
+ return normalizedArrayResponse;
+ }
+
+ normalizedArrayResponse.data = [];
+ return normalizedArrayResponse;
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-app.js
new file mode 100644
index 0000000..8b1f152
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-app.js
@@ -0,0 +1,86 @@
+/**
+ * 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.
+ */
+/**
+ * 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';
+import Ember from 'ember';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload) {
+ if (payload.app) {
+ payload = payload.app;
+ }
+
+ var fixedPayload = {
+ id: payload.id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ appId: payload.id,
+ state: payload.state,
+ user: payload.user,
+ containers: payload.containerids
+ }
+ };
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // payload is of the form {"app":{}}
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload);
+ return { data: p };
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // expected return response is of the form { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+ // payload is of the form { "apps" : { "app": [ {},{},{} ] } }
+ if (payload.apps) {
+ normalizedArrayResponse.data = payload.apps.app.map(singleApp => {
+ return this.internalNormalizeSingleResponse(store, primaryModelClass,
+ singleApp);
+ }, this);
+ } else {
+ // No container reported inside containers.
+ // Response of the form { "apps": null }
+ normalizedArrayResponse.data = Ember.makeArray({
+ id: "dummy",
+ type: primaryModelClass.modelName,
+ attributes: {}});
+ }
+ return normalizedArrayResponse;
+ }
+});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
new file mode 100644
index 0000000..528f2fe
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node-container.js
@@ -0,0 +1,74 @@
+/**
+ * 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';
+import Ember from 'ember';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload) {
+ if (payload.container) {
+ payload = payload.container;
+ }
+ var fixedPayload = {
+ id: payload.id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ containerId: payload.id,
+ state: payload.state,
+ user: payload.user,
+ diagnostics: payload.diagnostics,
+ exitCode: payload.exitCode,
+ totalMemoryNeeded: payload.totalMemoryNeededMB,
+ totalVCoresNeeded: payload.totalVCoresNeeded,
+ containerLogFiles: payload.containerLogFiles
+ }
+ };
+
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // payload is of the form {"container":{}}
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload);
+ return { data: p };
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // expected return response is of the form { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+ if (payload.containers) {
+ // payload is of the form { "containers" : { "container": [ {},{},{} ] } }
+ normalizedArrayResponse.data =
+ payload.containers.container.map(singleContainer => {
+ return this.internalNormalizeSingleResponse(store, primaryModelClass,
+ singleContainer);
+ }, this);
+ } else {
+ // No container reported inside containers.
+ // Response of the form { "containers": null }
+ normalizedArrayResponse.data = Ember.makeArray({
+ id: "dummy",
+ type: primaryModelClass.modelName,
+ attributes: {}});
+ }
+ return normalizedArrayResponse;
+ }
+});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
new file mode 100644
index 0000000..19308e2
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-node.js
@@ -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.
+ */
+
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ if (payload.nodeInfo) {
+ payload = payload.nodeInfo;
+ }
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ totalVmemAllocatedContainersMB: payload.totalVmemAllocatedContainersMB,
+ totalPmemAllocatedContainersMB: payload.totalPmemAllocatedContainersMB,
+ totalVCoresAllocatedContainers: payload.totalVCoresAllocatedContainers,
+ vmemCheckEnabled: payload.vmemCheckEnabled,
+ pmemCheckEnabled: payload.pmemCheckEnabled,
+ nodeHealthy: payload.nodeHealthy,
+ lastNodeUpdateTime: Converter.timeStampToDate(payload.lastNodeUpdateTime),
+ healthReport: payload.healthReport,
+ nmStartupTime: Converter.timeStampToDate(payload.nmStartupTime),
+ nodeManagerBuildVersion: payload.nodeManagerBuildVersion,
+ hadoopBuildVersion: payload.hadoopBuildVersion
+ }
+ };
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // payload is of the form {"nodeInfo":{}}
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload, id, requestType);
+ return { data: p };
+ },
+});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
new file mode 100644
index 0000000..1c5b7b3
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-queue.js
@@ -0,0 +1,145 @@
+/**
+ * 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.queues) {
+ payload.queues.queue.forEach(function(queue) {
+ children.push(queue.queueName);
+ });
+ }
+
+ var includedData = [];
+ var relationshipUserData = [];
+
+ // update user models
+ if (payload.users && payload.users.user) {
+ payload.users.user.forEach(function(u) {
+ includedData.push({
+ type: "YarnUser",
+ id: u.username + "_" + payload.queueName,
+ attributes: {
+ name: u.username,
+ queueName: payload.queueName,
+ usedMemoryMB: u.resourcesUsed.memory || 0,
+ usedVCore: u.resourcesUsed.vCores || 0,
+ }
+ });
+
+ relationshipUserData.push({
+ type: "YarnUser",
+ id: u.username + "_" + payload.queueName,
+ })
+ });
+ }
+
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName, // yarn-queue
+ attributes: {
+ name: payload.queueName,
+ parent: payload.myParent,
+ children: children,
+ capacity: payload.capacity,
+ usedCapacity: payload.usedCapacity,
+ maxCapacity: payload.maxCapacity,
+ absCapacity: payload.absoluteCapacity,
+ absMaxCapacity: payload.absoluteMaxCapacity,
+ absUsedCapacity: payload.absoluteUsedCapacity,
+ state: payload.state,
+ userLimit: payload.userLimit,
+ userLimitFactor: payload.userLimitFactor,
+ preemptionDisabled: payload.preemptionDisabled,
+ numPendingApplications: payload.numPendingApplications,
+ numActiveApplications: payload.numActiveApplications,
+ },
+ // Relationships
+ relationships: {
+ users: {
+ data: relationshipUserData
+ }
+ }
+ };
+
+ return {
+ queue: this._super(store, primaryModelClass, fixedPayload, id, requestType),
+ includedData: includedData
+ }
+ },
+
+ handleQueue(store, primaryModelClass, payload, id, requestType) {
+ var data = [];
+ var includedData = []
+ var result = this.normalizeSingleResponse(store, primaryModelClass,
+ payload, id, requestType);
+
+ data.push(result.queue);
+ includedData = includedData.concat(result.includedData);
+
+ if (payload.queues) {
+ for (var i = 0; i < payload.queues.queue.length; i++) {
+ var queue = payload.queues.queue[i];
+ queue.myParent = payload.queueName;
+ var childResult = this.handleQueue(store, primaryModelClass, queue,
+ queue.queueName,
+ requestType);
+
+ data = data.concat(childResult.data);
+ includedData = includedData.concat(childResult.includedData);
+ }
+ }
+
+ return {
+ data: data,
+ includedData, includedData
+ }
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ var normalizedArrayResponse = {};
+ var result = this.handleQueue(store,
+ primaryModelClass,
+ payload.scheduler.schedulerInfo, "root", requestType);
+
+ normalizedArrayResponse.data = result.data;
+ normalizedArrayResponse.included = result.includedData;
+
+ console.log(normalizedArrayResponse);
+
+ return normalizedArrayResponse;
+
+ /*
+ // return expected is { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+
+ // payload has apps : { app: [ {},{},{} ] }
+ // need some error handling for ex apps or app may not be defined.
+ normalizedArrayResponse.data = payload.apps.app.map(singleApp => {
+ return this.normalizeSingleResponse(store, primaryModelClass, singleApp, singleApp.id, requestType);
+ }, this);
+ return normalizedArrayResponse;
+ */
+ }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
new file mode 100644
index 0000000..6cb9320
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/serializers/yarn-rm-node.js
@@ -0,0 +1,77 @@
+/**
+ * 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 Ember from 'ember';
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPISerializer.extend({
+ internalNormalizeSingleResponse(store, primaryModelClass, payload, id) {
+ if (payload.node) {
+ payload = payload.node;
+ }
+
+ var fixedPayload = {
+ id: id,
+ type: primaryModelClass.modelName,
+ attributes: {
+ rack: payload.rack,
+ state: payload.state,
+ nodeHostName: payload.nodeHostName,
+ nodeHTTPAddress: payload.nodeHTTPAddress,
+ lastHealthUpdate: Converter.timeStampToDate(payload.lastHealthUpdate),
+ healthReport: payload.healthReport,
+ numContainers: payload.numContainers,
+ usedMemoryMB: payload.usedMemoryMB,
+ availMemoryMB: payload.availMemoryMB,
+ usedVirtualCores: payload.usedVirtualCores,
+ availableVirtualCores: payload.availableVirtualCores,
+ version: payload.version,
+ nodeLabels: payload.nodeLabels
+ }
+ };
+ return fixedPayload;
+ },
+
+ normalizeSingleResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // payload is of the form {"nodeInfo":{}}
+ var p = this.internalNormalizeSingleResponse(store,
+ primaryModelClass, payload, id);
+ return { data: p };
+ },
+
+ normalizeArrayResponse(store, primaryModelClass, payload, id,
+ requestType) {
+ // expected response is of the form { data: [ {}, {} ] }
+ var normalizedArrayResponse = {};
+ if (payload.nodes) {
+ // payload is of the form { "nodes": { "node": [ {},{},{} ] } }
+ normalizedArrayResponse.data = payload.nodes.node.map(singleNode => {
+ return this.internalNormalizeSingleResponse(store, primaryModelClass,
+ singleNode, singleNode.id);
+ }, this);
+ } else {
+ normalizedArrayResponse.data = Ember.makeArray({
+ id: "dummy",
+ type: primaryModelClass.modelName,
+ attributes: {}});
+ }
+ return normalizedArrayResponse;
+ }
+});
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
new file mode 100644
index 0000000..bcb6aab
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/styles/app.css
@@ -0,0 +1,159 @@
+/**
+ * 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.
+ */
+
+/*
+ Over all style
+ */
+text {
+ font: 12px sans-serif;
+}
+
+text.small {
+ font: 8px sans-serif;
+}
+
+html, body
+{
+ margin: 0px;
+ padding: 0px;
+ height: 100%;
+ width: 100%;
+}
+
+/*
+ queue's style (left banner of queues)
+ */
+
+text.queue {
+ font-family : sans-serif;
+ font-size : 15px;
+ fill : gray;
+}
+
+path.queue {
+ stroke: gray;
+ fill: none;
+}
+
+circle.queue {
+ r: 10;
+ fill: Steelblue;
+}
+
+/*
+ background style
+ */
+line.grid {
+ stroke: WhiteSmoke;
+}
+
+line.chart {
+ stroke: Gray;
+}
+
+/*
+ charts styles
+ */
+text.chart-title {
+ font-size: 30px;
+ font-family: sans-serif;
+ text-anchor: middle;
+ fill: Gray;
+}
+
+text.donut-highlight-text {
+ font-size: 20px;
+ font-family: sans-serif;
+ text-anchor: middle;
+ fill: Gray;
+ vertical-align: middle;
+}
+
+rect.chart-frame {
+ fill: none;
+ stroke: gray;
+ stroke-dasharray: 10,10;
+}
+
+line.chart-leftbanner {
+ stroke-width: 2;
+ stroke: gray;
+ stroke-dasharray: 10,10;
+}
+
+text.bar-chart-text {
+ font-size: 8px;
+ font-family: sans-serif;
+ vertical-align: middle;
+ fill: Gray;;
+}
+
+div.tooltip {
+ position: absolute;
+ text-align: center;
+ /*height: 28px;*/
+ padding: 2px;
+ font: 12px sans-serif;
+ background: lightsteelblue;
+ border: 0px;
+ border-radius: 8px;
+ pointer-events: none;
+}
+
+/*
+ * Data table
+ */
+
+table.dataTable thead .sorting {
+ background-image: url("/assets/images/datatables/sort_both.png");
+}
+table.dataTable thead .sorting_asc {
+ background-image: url("/assets/images/datatables/sort_asc.png");
+}
+table.dataTable thead .sorting_desc {
+ background-image: url("/assets/images/datatables/sort_desc.png");
+}
+table.dataTable thead .sorting_asc_disabled {
+ background-image: url("/assets/images/datatables/sort_asc_disabled.png");
+}
+table.dataTable thead .sorting_desc_disabled {
+ background-image: url("/assets/images/datatables/sort_desc_disabled.png");
+}
+
+/*
+ * Queue selector
+ */
+.node {
+ cursor: pointer;
+}
+
+.node circle {
+ fill: #fff;
+ stroke: steelblue;
+ stroke-width: 3px;
+}
+
+.node text {
+ font: 12px sans-serif;
+}
+
+.link {
+ fill: none;
+ stroke: #ccc;
+ stroke-width: 2px;
+}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
new file mode 100644
index 0000000..88702c4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/application.hbs
@@ -0,0 +1,41 @@
+{{!
+ * 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.
+}}
+
+<nav class="navbar navbar-default">
+ <div class="container-fluid">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#">Apache Hadoop YARN</a>
+ </div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ {{outputMainMenu}}
+ </ul>
+ </div><!-- /.navbar-collapse -->
+ </div><!-- /.container-fluid -->
+</nav>
+
+{{outlet}}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs
new file mode 100644
index 0000000..2094092
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/cluster-overview.hbs
@@ -0,0 +1,74 @@
+{{!
+ * 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.
+}}
+
+<div class="row">
+ <div class="col-lg-3 container-fluid" id="finishedapps-donut-chart">
+ {{donut-chart data=model.firstObject.getFinishedAppsDataForDonutChart
+ title="Finished Apps"
+ showLabels=true
+ parentId="finishedapps-donut-chart"
+ ratio=0.55
+ maxHeight=350}}
+ </div>
+
+ <div class="col-lg-3 container-fluid" id="runningapps-donut-chart">
+ {{donut-chart data=model.firstObject.getRunningAppsDataForDonutChart
+ title="Running Apps"
+ showLabels=true
+ parentId="runningapps-donut-chart"
+ ratio=0.55
+ maxHeight=350}}
+ </div>
+</div>
+
+<hr>
+
+<div class="row">
+ <div class="col-lg-3 container-fluid" id="nodes-donut-chart">
+ {{donut-chart data=model.firstObject.getNodesDataForDonutChart
+ title="Node Managers"
+ showLabels=true
+ parentId="nodes-donut-chart"
+ ratio=0.55
+ maxHeight=350}}
+ </div>
+</div>
+
+<hr>
+
+<div class="row">
+ <div class="col-lg-3 container-fluid" id="mem-donut-chart">
+ {{donut-chart data=model.firstObject.getMemoryDataForDonutChart
+ title="Resource - Memory"
+ showLabels=true
+ parentId="mem-donut-chart"
+ ratio=0.55
+ maxHeight=350}}
+ </div>
+
+ <div class="col-lg-3 container-fluid" id="vcore-donut-chart">
+ {{donut-chart data=model.firstObject.getVCoreDataForDonutChart
+ title="Resource - VCores"
+ showLabels=true
+ parentId="vcore-donut-chart"
+ ratio=0.6
+ maxHeight=350}}
+ </div>
+</div>
+
+{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-attempt-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-attempt-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-attempt-table.hbs
new file mode 100644
index 0000000..722f780
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-attempt-table.hbs
@@ -0,0 +1,46 @@
+{{!
+ * 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.
+}}
+
+<table id="app-attempt-table" class="table table-striped table-bordered" cellspacing="0" width="100%" height="100%">
+ <tbody>
+ <tr>
+ <td>Application Attempt Id</td>
+ <td>{{attempt.id}}</td>
+ </tr>
+ <tr>
+ <td>Start Time</td>
+ <td>{{attempt.startTime}}</td>
+ </tr>
+ <tr>
+ <td>AM Container Id</td>
+ <td>{{attempt.containerId}}</td>
+ </tr>
+ <tr>
+ <td>AM Node Web UI</td>
+ <td><a href={{attempt.nodeHttpAddress}}>{{attempt.nodeHttpAddress}}</a></td>
+ </tr>
+ <tr>
+ <td>AM Node Id</td>
+ <td>{{attempt.nodeId}}</td>
+ </tr>
+ <tr>
+ <td>Log</td>
+ <td><a href={{attempt.logsLink}}>link</a></td>
+ </tr>
+ </tbody>
+</table>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs
new file mode 100644
index 0000000..fb0fb6f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/app-table.hbs
@@ -0,0 +1,80 @@
+{{!
+ * 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.
+}}
+
+<table id={{table-id}} class="display table table-striped table-bordered" cellspacing="0" width="100%">
+ <thead>
+ <tr>
+ <th>Application ID</th>
+ <th>Name</th>
+ <th>User</th>
+ <th>Queue</th>
+ <th>State</th>
+ <th>Final Status</th>
+ <th>Start Time</th>
+ <th>Elapsed Time</th> <!-- idx = 7 -->
+ <th>Finished Time</th>
+ <th>Priority</th>
+ <th>Progress</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#if arr}}
+ {{#each arr as |app|}}
+ <tr>
+ <td><a href="yarnApp/{{app.id}}">{{app.id}}</a></td>
+ <td>{{app.appName}}</td>
+ <td>{{app.user}}</td>
+ <td>{{app.queue}}</td>
+ <td>{{app.state}}</td>
+ <td><span class={{app.finalStatusStyle}}>{{app.finalStatus}}</span></td>
+ <td>{{app.startTime}}</td>
+ <td>{{app.elapsedTime}}</td>
+ <td>{{app.finishedTime}}</td>
+ <td>{{app.priority}}</td>
+ <td>
+ <div class="progress" style="margin-bottom: 0;">
+ <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style={{app.progressStyle}}>
+ {{app.progress}}%
+ </div>
+ </div>
+ </td>
+ </tr>
+ {{/each}}
+ {{else}}
+ <tr>
+ <td><a href="yarnApp/{{app.id}}">{{app.id}}</a></td>
+ <td>{{app.appName}}</td>
+ <td>{{app.user}}</td>
+ <td>{{app.queue}}</td>
+ <td>{{app.state}}</td>
+ <td><span class={{app.finalStatusStyle}}>{{app.finalStatus}}</span></td>
+ <td>{{app.startTime}}</td>
+ <td>{{app.elapsedTime}}</td>
+ <td>{{app.finishedTime}}</td>
+ <td>{{app.priority}}</td>
+ <td>
+ <div class="progress" style="margin-bottom: 0;">
+ <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style={{app.progressStyle}}>
+ {{app.progress}}%
+ </div>
+ </div>
+ </td>
+ </tr>
+ {{/if}}
+ </tbody>
+</table>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs
new file mode 100644
index 0000000..dcc31da
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/container-table.hbs
@@ -0,0 +1,54 @@
+{{!
+ * 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.
+}}
+
+<table id="container-table" class="table table-striped table-bordered" cellspacing="0" width="100%" height="100%">
+ <tbody>
+ <tr>
+ <td>Start Time</td>
+ <td>{{container.startedTime}}</td>
+ </tr>
+ <tr>
+ <td>Finished Time</td>
+ <td>{{container.finishedTime}}</td>
+ </tr>
+ <tr>
+ <td>Elapsed Time</td>
+ <td>{{container.elapsedTime}}</td>
+ </tr>
+ <tr>
+ <td>Priority</td>
+ <td>{{container.priority}}</td>
+ </tr>
+ <tr>
+ <td>Log</td>
+ <td><a href={{container.logUrl}}>link</a></td>
+ </tr>
+ <tr>
+ <td>Exit Status</td>
+ <td>{{container.containerExitStatus}}</td>
+ </tr>
+ <tr>
+ <td>State</td>
+ <td>{{container.containerState}}</td>
+ </tr>
+ <tr>
+ <td>NodeManager UI</td>
+ <td>{{container.nodeHttpAddress}}</td>
+ </tr>
+ </tbody>
+</table>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs
new file mode 100644
index 0000000..9045976
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-configuration-table.hbs
@@ -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.
+}}
+
+<table id="queue-configuration-table" class="table table-striped table-bordered" cellspacing="0" width="100%" height="100%">
+ <thead>
+ <tr>
+ <td><b>Configurations</b></td>
+ <td>Value</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Queue Name</td>
+ <td>{{queue.id}}</td>
+ </tr>
+ <tr>
+ <td>Configured Capacity</td>
+ <td>{{queue.capacity}}</td>
+ </tr>
+ <tr>
+ <td>Configured Max Capacity</td>
+ <td>{{queue.maxCapacity}}</td>
+ </tr>
+ <tr>
+ <td>State</td>
+ <td>{{queue.state}}</td>
+ </tr>
+ {{#if queue.isLeafQueue}}
+ <tr>
+ <td>User Limit Percent</td>
+ <td>{{queue.userLimit}}</td>
+ </tr>
+ <tr>
+ <td>User Limit Factor</td>
+ <td>{{queue.userLimitFactor}}</td>
+ </tr>
+ <tr>
+ <td>Preemption Disabled</td>
+ <td>{{queue.preemptionDisabled}}</td>
+ </tr>
+ {{/if}}
+ </tbody>
+</table>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs
new file mode 100644
index 0000000..fb9c6c8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs
@@ -0,0 +1,36 @@
+{{!
+ * 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.
+}}
+
+<div class="row">
+ <div class="col-lg-4">
+ <select class="js-example-basic-single" width="100%" id="queue-name-selector">
+ {{item-selector element-id="queue-name-selector" prefix="Queue : " model=model}}
+ </select>
+ </div>
+</div><!-- /.row -->
+
+<!-- queue selector -->
+<div class="row">
+ <div class="col-md-12 container-fluid" id="tree-selector-container">
+ {{tree-selector model=model parentId="tree-selector-container" selected=selected}}
+ </div>
+</div>
+
+<hr>
+
+{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/timeline-view.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/timeline-view.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/timeline-view.hbs
new file mode 100644
index 0000000..2eb3441
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/timeline-view.hbs
@@ -0,0 +1,53 @@
+{{!
+ * 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.
+}}
+
+<div class="col-md-12 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{#if attemptModel}}
+ Application Attempts
+ {{else}}
+ Containers
+ {{/if}}
+ </div>
+ <div class="panel-body">
+ <div class="col-md-8 container-fluid" id={{parent-id}}>
+ </div>
+
+ <!-- diag info -->
+ <div class="col-md-4 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ {{#if selected.link}}
+ <a href={{selected.link}}>{{selected.id}}</a>
+ {{else}}
+ {{selected.id}}
+ {{/if}}
+ </div>
+ {{#if attemptModel}}
+ {{app-attempt-table attempt=selected}}
+ {{else}}
+ {{container-table container=selected}}
+ {{/if}}
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
new file mode 100644
index 0000000..c546bf7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/error.hbs
@@ -0,0 +1,19 @@
+{{!--
+ 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.
+--}}
+
+<h3 align = "center">Sorry, Error Occured.</h3>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
new file mode 100644
index 0000000..588ea44
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/notfound.hbs
@@ -0,0 +1,20 @@
+{{!--
+ 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.
+--}}
+
+<h2 align = "center">404, Not Found</h2>
+<h4 align = "center">Please Check your URL</h4>
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
new file mode 100644
index 0000000..a0343b5
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app-attempt.hbs
@@ -0,0 +1,30 @@
+{{!
+ * 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.
+}}
+
+<div class="container-fluid">
+ <div class="row">
+ {{app-attempt-table attempt=model.attempt}}
+ </div>
+
+ <!-- containers table -->
+ <div class="row">
+ {{timeline-view parent-id="containers-timeline-div" my-id="timeline-view" height="400" rmModel=model.rmContainers tsModel=model.tsContainers label="shortAppAttemptId" attemptModel=false}}
+ </div>
+</div>
+
+{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
new file mode 100644
index 0000000..d306e64
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-app.hbs
@@ -0,0 +1,163 @@
+{{!
+ * 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.
+}}
+
+<div class="container-fluid">
+ <!-- app table -->
+ <div class="row">
+ <div class="col-md-12 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Application Basic Information
+ </div>
+ {{app-table table-id="app-table" app=model.app}}
+ </div>
+ </div>
+ </div>
+
+ <!-- diag info and other infos -->
+ <div class="row">
+ <!-- diag info -->
+ <div class="col-md-4 container-fluid">
+ {{#if model.app.isFailed}}
+ <div class="panel panel-danger">
+ <div class="panel-heading">
+ Diagnostics
+ </div>
+ <div class="panel-body">{{model.app.diagnostics}}</div>
+ </div>
+ {{else}}
+ <div class="panel panel-default">
+ <div class="panel-body">
+ Diagnostics
+ </div>
+ <div class="panel-footer">{{model.app.diagnostics}}</div>
+ </div>
+ {{/if}}
+ </div>
+
+ <div class="col-md-5 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">Scheduling Info</div>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td>Allocated Resource</td>
+ <td>{{model.app.allocatedResource}}</td>
+ </tr>
+ <tr>
+ <td>Running Containers</td>
+ <td>{{model.app.runningContainers}}</td>
+ </tr>
+ <tr>
+ <td>Preempted Resource</td>
+ <td>{{model.app.preemptedResource}}</td>
+ </tr>
+ <tr>
+ <td>Num Non-AM container preempted</td>
+ <td>{{model.app.numAMContainerPreempted}}</td>
+ </tr>
+ <tr>
+ <td>Num AM container preempted</td>
+ <td>{{model.app.numAMContainerPreempted}}</td>
+ </tr>
+ <tr>
+ <td>Aggregated Resource Usage</td>
+ <td>{{model.app.aggregatedResourceUsage}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+ <!-- other info -->
+ <div class="col-md-3 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">Other Info</div>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td>AM Container Log</td>
+ <td><a href={{model.app.amContainerLogs}}>Link</a></td>
+ </tr>
+ <tr>
+ <td>AM Host Http Addr</td>
+ <td><a href={{model.app.amHostHttpAddress}}>Link</a></td>
+ </tr>
+ <tr>
+ <td>Log Aggregation Status</td>
+ <td>{{model.app.logAggregationStatus}}</td>
+ </tr>
+ <tr>
+ <td>Is Unmanaged AM</td>
+ <td>{{model.app.unmanagedApplication}}</td>
+ </tr>
+ <tr>
+ <td>AM Node Label Expression</td>
+ <td>{{model.app.amNodeLabelExpression}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+
+<!--
+ <div class="row">
+ <div class="col-md-12 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Application Attempts
+ </div>
+ <table id="app-attempt-table" class="table table-striped table-bordered" cellspacing="0" width="100%" height="100%">
+ <thead>
+ <tr>
+ <th>Start Time</th>
+ <th>Master ContainerId</th>
+ <th>Node Http Address</th>
+ <th>Node Id</th>
+ <th>Logs Link</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each model.attempts as |attempt|}}
+ <tr>
+ <td>{{attempt.startTime}}</td>
+ <td>{{attempt.containerId}}</td>
+ <td><a href={{attempt.nodeHttpAddress}}>{{attempt.nodeHttpAddress}}</a></td>
+ <td>{{attempt.nodeId}}</td>
+ <td><a href={{attempt.logsLink}}>link</a></td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+-->
+ <!-- timeline view of children -->
+ <div class="row">
+ {{timeline-view parent-id="attempt-timeline-div" my-id="timeline-view" height="100%" rmModel=model.attempts label="shortAppAttemptId" attemptModel=true}}
+ </div>
+</div>
+
+<!--
+{{simple-table table-id="app-attempt-table" paging=false bFilter=false}}
+-->
+
+
+{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
new file mode 100644
index 0000000..98b9107
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps.hbs
@@ -0,0 +1,21 @@
+{{!
+ * 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.
+}}
+
+{{app-table table-id="apps-table" arr=model}}
+{{simple-table table-id="apps-table" bFilter=true colsOrder="0,desc" colTypes="natural elapsed-time" colTargets="0 7"}}
+{{outlet}}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-container-log.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-container-log.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-container-log.hbs
new file mode 100644
index 0000000..9cc3b0f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-container-log.hbs
@@ -0,0 +1,36 @@
+{{!--
+ 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.
+--}}
+
+<div class="col-md-12 container-fluid">
+ {{node-menu path="yarnContainerLog" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
+ <div class="col-md-10">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h5 align="center"><b>{{model.containerLog.logFileName}} for {{model.containerLog.containerID}}</b></h5>
+ </div>
+ <div class="panel-body">
+ {{#if model.containerLog.logs}}
+ <pre>{{model.containerLog.logs}}</pre>
+ {{else}}
+ <p>No logs were written in {{model.containerLog.logFileName}}.</p>
+ {{/if}}
+ </div>
+ </div>
+ </div>
+</div>
+{{outlet}}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-app.hbs
new file mode 100644
index 0000000..4da64b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-app.hbs
@@ -0,0 +1,60 @@
+{{!--
+ 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.
+--}}
+
+<div class="col-md-12 container-fluid">
+ <div class="row">
+ {{node-menu path="yarnNodeApp" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
+ <div class="col-md-10 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading"><b>Application Information</b></div>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td>Application ID</td>
+ <td>{{model.nodeApp.appId}}</td>
+ </tr>
+ <tr>
+ <td>Application State</td>
+ <td>{{model.nodeApp.state}}</td>
+ </tr>
+ <tr>
+ <td>User</td>
+ <td>{{model.nodeApp.user}}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <table id="node-app-table" class="display table table-striped table-bordered" cellspacing="0">
+ <thead>
+ <tr>
+ <th>Containers for {{model.nodeApp.appId}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each model.nodeApp.containers as |container|}}
+ <tr>
+ <td><a href="yarnNodeContainer/{{model.nodeInfo.id}}/{{model.nodeInfo.addr}}/{{container}}">{{container}}</a></td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{simple-table table-id="node-app-table" bFilter=true colsOrder="0,desc" colTypes="natural" colTargets="0"}}
+ </div>
+ </div>
+ </div>
+{{outlet}}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-apps.hbs
new file mode 100644
index 0000000..c195397
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-apps.hbs
@@ -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.
+--}}
+
+<div class="col-md-12 container-fluid">
+ <div class="row">
+ {{node-menu path="yarnNodeApps" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
+ <div class="col-md-10 container-fluid">
+ <table id="node-apps-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
+ <thead>
+ <tr>
+ <th>Application ID</th>
+ <th>State</th>
+ <th>User</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#if model.apps}}
+ {{#each model.apps as |app|}}
+ {{#if app.isDummyApp}}
+ <tr><td colspan="3" align="center">No apps found on this node</td></tr>
+ {{else}}
+ <tr>
+ <td><a href="yarnNodeApp/{{model.nodeInfo.id}}/{{model.nodeInfo.addr}}/{{app.appId}}">{{app.appId}}</a></td>
+ <td><span class={{app.appStateStyle}}>{{app.state}}</span></td>
+ <td>{{app.user}}</td>
+ </tr>
+ {{/if}}
+ {{/each}}
+ {{/if}}
+ </tbody>
+ </table>
+ {{simple-table table-id="node-apps-table" bFilter=true colsOrder="0,desc" colTypes="natural" colTargets="0"}}
+ </div>
+ </div>
+</div>
+{{outlet}}
http://git-wip-us.apache.org/repos/asf/hadoop/blob/3b550eb6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-container.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-container.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-container.hbs
new file mode 100644
index 0000000..fbbb2fc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-container.hbs
@@ -0,0 +1,70 @@
+{{!--
+ 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.
+--}}
+
+<div class="col-md-12 container-fluid">
+ <div class="row">
+ {{node-menu path="yarnNodeContainer" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
+ <div class="col-md-10 container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading"><b>Container Information</b></div>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td>Container ID</td>
+ <td>{{model.nodeContainer.containerId}}</td>
+ </tr>
+ <tr>
+ <td>Container State</td>
+ <td>{{model.nodeContainer.state}}</td>
+ </tr>
+ <tr>
+ <td>Exit Code</td>
+ <td>{{model.nodeContainer.exitCode}}</td>
+ </tr>
+ <tr>
+ <td>Diagnostics</td>
+ <td>{{model.nodeContainer.diagnostics}}</td>
+ </tr>
+ <tr>
+ <td>User</td>
+ <td>{{model.nodeContainer.user}}</td>
+ </tr>
+ <tr>
+ <td>Total Memory Needed</td>
+ <td>{{model.nodeContainer.totalMemoryNeeded}} MB</td>
+ </tr>
+ <tr>
+ <td>Total VCores Needed</td>
+ <td>{{model.nodeContainer.totalVCoresNeeded}}</td>
+ </tr>
+ <tr>
+ <td>Link to Logs</td>
+ <td>
+ {{log-files-comma nodeId=model.nodeInfo.id
+ nodeAddr=model.nodeInfo.addr
+ containerId=model.nodeContainer.containerId
+ logFiles=model.nodeContainer.containerLogFiles}}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+{{outlet}}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org