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/04/08 20:31:12 UTC

[01/20] hadoop git commit: YARN-4756. Unnecessary wait in Node Status Updater during reboot. (Eric Badger via kasha) [Forced Update!]

Repository: hadoop
Updated Branches:
  refs/heads/YARN-3368 e7ef482a1 -> 3a8a182bd (forced update)


YARN-4756. Unnecessary wait in Node Status Updater during reboot. (Eric Badger via kasha)


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

Branch: refs/heads/YARN-3368
Commit: e82f961a3925aadf9e53a009820a48ba9e4f78b6
Parents: a62637a
Author: Karthik Kambatla <ka...@cloudera.com>
Authored: Thu Apr 7 17:05:29 2016 -0700
Committer: Karthik Kambatla <ka...@cloudera.com>
Committed: Thu Apr 7 17:05:29 2016 -0700

----------------------------------------------------------------------
 .../nodemanager/NodeStatusUpdaterImpl.java      |  1 +
 .../nodemanager/TestNodeManagerResync.java      | 33 +++++++++++++-------
 2 files changed, 23 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e82f961a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
index ad983fe..72769bf 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
@@ -284,6 +284,7 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
         return;
       }
       this.isStopped = true;
+      sendOutofBandHeartBeat();
       try {
         statusUpdater.join();
         registerWithRM();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e82f961a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
index e8c4634..b3d44f5 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java
@@ -108,6 +108,7 @@ public class TestNodeManagerResync {
   static final String user = "nobody";
   private FileContext localFS;
   private CyclicBarrier syncBarrier;
+  private CyclicBarrier updateBarrier;
   private AtomicBoolean assertionFailedInThread = new AtomicBoolean(false);
   private AtomicBoolean isNMShutdownCalled = new AtomicBoolean(false);
   private final NodeManagerEvent resyncEvent =
@@ -125,6 +126,7 @@ public class TestNodeManagerResync {
     remoteLogsDir.mkdirs();
     nmLocalDir.mkdirs();
     syncBarrier = new CyclicBarrier(2);
+    updateBarrier = new CyclicBarrier(2);
   }
 
   @After
@@ -803,9 +805,11 @@ public class TestNodeManagerResync {
                 .getContainerStatuses(gcsRequest).getContainerStatuses().get(0);
             assertEquals(Resource.newInstance(1024, 1),
                 containerStatus.getCapability());
+            updateBarrier.await();
             // Call the actual rebootNodeStatusUpdaterAndRegisterWithRM().
             // This function should be synchronized with
             // increaseContainersResource().
+            updateBarrier.await();
             super.rebootNodeStatusUpdaterAndRegisterWithRM();
             // Check status after registerWithRM
             containerStatus = getContainerManager()
@@ -831,17 +835,24 @@ public class TestNodeManagerResync {
         List<Token> increaseTokens = new ArrayList<Token>();
         // Add increase request.
         Resource targetResource = Resource.newInstance(4096, 2);
-        try {
-          increaseTokens.add(getContainerToken(targetResource));
-          IncreaseContainersResourceRequest increaseRequest =
-              IncreaseContainersResourceRequest.newInstance(increaseTokens);
-          IncreaseContainersResourceResponse increaseResponse =
-              getContainerManager()
-                  .increaseContainersResource(increaseRequest);
-          Assert.assertEquals(
-              1, increaseResponse.getSuccessfullyIncreasedContainers()
-                  .size());
-          Assert.assertTrue(increaseResponse.getFailedRequests().isEmpty());
+        try{
+          try {
+            updateBarrier.await();
+            increaseTokens.add(getContainerToken(targetResource));
+            IncreaseContainersResourceRequest increaseRequest =
+                IncreaseContainersResourceRequest.newInstance(increaseTokens);
+            IncreaseContainersResourceResponse increaseResponse =
+                getContainerManager()
+                    .increaseContainersResource(increaseRequest);
+            Assert.assertEquals(
+                1, increaseResponse.getSuccessfullyIncreasedContainers()
+                    .size());
+            Assert.assertTrue(increaseResponse.getFailedRequests().isEmpty());
+          } catch (Exception e) {
+            e.printStackTrace();
+          } finally {
+            updateBarrier.await();
+          }
         } catch (Exception e) {
           e.printStackTrace();
         }


[06/20] hadoop git commit: YARN-4733. [YARN-3368] Initial commit of new YARN web UI. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js
new file mode 100644
index 0000000..d39885e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js
@@ -0,0 +1,29 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js
new file mode 100644
index 0000000..c5394d0
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js
@@ -0,0 +1,49 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js
new file mode 100644
index 0000000..a038fff
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js
@@ -0,0 +1,66 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js
new file mode 100644
index 0000000..665b9df
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js
@@ -0,0 +1,54 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js
new file mode 100644
index 0000000..ce4d775
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js
@@ -0,0 +1,127 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css
new file mode 100644
index 0000000..e1ff994
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css
@@ -0,0 +1,141 @@
+/*
+ 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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
new file mode 100644
index 0000000..252ca74
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
@@ -0,0 +1,25 @@
+<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">
+        <li class="active"><a href="yarnQueue/root">Queues<span class="sr-only">(current)</span></a></li>
+        <li class="active"><a href="yarnApps">Applications<span class="sr-only">(current)</span></a></li>
+        <li class="active"><a href="clusterOverview">Cluster Overview<span class="sr-only">(current)</span></a></li>
+      </ul>
+    </div><!-- /.navbar-collapse -->
+  </div><!-- /.container-fluid -->
+</nav>
+
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs
new file mode 100644
index 0000000..81c11e9
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs
@@ -0,0 +1,56 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs
new file mode 100644
index 0000000..633d363
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs
@@ -0,0 +1,28 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs
new file mode 100644
index 0000000..92e9d05
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs
@@ -0,0 +1,62 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs
new file mode 100644
index 0000000..70d3fc4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs
@@ -0,0 +1,36 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs
new file mode 100644
index 0000000..fb9f1a0
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs
@@ -0,0 +1,40 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs
new file mode 100644
index 0000000..4ef22902
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs
@@ -0,0 +1,18 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs
new file mode 100644
index 0000000..657f6e8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs
@@ -0,0 +1,35 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs
new file mode 100644
index 0000000..afcfa4f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs
@@ -0,0 +1,12 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs
new file mode 100644
index 0000000..0ba6749
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs
@@ -0,0 +1,145 @@
+<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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
new file mode 100644
index 0000000..e58d6bd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
@@ -0,0 +1,3 @@
+{{app-table table-id="apps-table" arr=model}}
+{{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}}
+{{outlet}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs
new file mode 100644
index 0000000..11bb6f4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs
@@ -0,0 +1,48 @@
+<div class="container-fluid">
+  {{queue-navigator model=model.queues selected=model.selected}}
+</div>
+
+<div class="row">
+  <div class="col-lg-3 container-fluid">
+    {{queue-configuration-table queue=model.selectedQueue}}
+  </div>
+
+  <div class="col-lg-3 container-fluid" id="capacity-bar-chart">
+    {{bar-chart data=model.selectedQueue.capacitiesBarChartData 
+        title="Queue Capacities" 
+        parentId="capacity-bar-chart"
+        textWidth=150
+        ratio=0.5
+        maxHeight=350}}
+  </div>
+
+{{#if model.selectedQueue.hasUserUsages}}
+  <div class="col-lg-3 container-fluid" id="userusage-donut-chart">
+    {{donut-chart data=model.selectedQueue.userUsagesDonutChartData 
+        title="User Usages" 
+        showLabels=true
+        parentId="userusage-donut-chart"
+        maxHeight=350}}
+  </div>
+{{/if}}
+
+  <div class="col-lg-3 container-fluid" id="numapplications-donut-chart">
+    {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData 
+        title="Running Apps" 
+        showLabels=true
+        parentId="numapplications-donut-chart"
+        ratio=0.5
+        maxHeight=350}}
+  </div>
+</div>
+
+<hr>
+
+<div class="row">
+  <div class="col-md-12 container-fluid">
+    {{app-table table-id="apps-table" arr=model.apps}}
+    {{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}}
+  </div>
+</div>
+
+{{outlet}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
new file mode 100644
index 0000000..41e6c9c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
@@ -0,0 +1,74 @@
+export default {
+  containerIdToAttemptId: function(containerId) {
+    if (containerId) {
+      var arr = containerId.split('_');
+      var attemptId = ["appattempt", arr[1], 
+        arr[2], this.padding(arr[3], 6)];
+      return attemptId.join('_');
+    }
+  },
+  attemptIdToAppId: function(attemptId) {
+    if (attemptId) {
+      var arr = attemptId.split('_');
+      var appId = ["application", arr[1], 
+        arr[2]].join('_');
+      return appId;
+    }
+  },
+  padding: function(str, toLen=2) {
+    str = str.toString();
+    if (str.length >= toLen) {
+      return str;
+    }
+    return '0'.repeat(toLen - str.length) + str;
+  },
+  resourceToString: function(mem, cpu) {
+    mem = Math.max(0, mem);
+    cpu = Math.max(0, cpu);
+    return mem + " MBs, " + cpu + " VCores";
+  },
+  msToElapsedTime: function(timeInMs) {
+    var sec_num = timeInMs / 1000; // don't forget the second param
+    var hours = Math.floor(sec_num / 3600);
+    var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
+    var seconds = sec_num - (hours * 3600) - (minutes * 60);
+
+    var timeStrArr = [];
+
+    if (hours > 0) {
+      timeStrArr.push(hours + ' Hrs');
+    }
+    if (minutes > 0) {
+      timeStrArr.push(minutes + ' Mins');
+    }
+    if (seconds > 0) {
+      timeStrArr.push(Math.round(seconds) + " Secs");
+    }
+    return timeStrArr.join(' : ');
+  },
+  elapsedTimeToMs: function(elapsedTime) {
+    elapsedTime = elapsedTime.toLowerCase();
+    var arr = elapsedTime.split(' : ');
+    var total = 0;
+    for (var i = 0; i < arr.length; i++) {
+      if (arr[i].indexOf('hr') > 0) {
+        total += parseInt(arr[i].substring(0, arr[i].indexOf(' '))) * 3600;
+      } else if (arr[i].indexOf('min') > 0) {
+        total += parseInt(arr[i].substring(0, arr[i].indexOf(' '))) * 60;
+      } else if (arr[i].indexOf('sec') > 0) {
+        total += parseInt(arr[i].substring(0, arr[i].indexOf(' ')));
+      }
+    }
+    return total * 1000;
+  },
+  timeStampToDate: function(timeStamp) {
+    var dateTimeString = moment(parseInt(timeStamp)).format("YYYY/MM/DD HH:mm:ss");
+    return dateTimeString;
+  },
+  dateToTimeStamp: function(date) {
+    if (date) {
+      var ts = moment(date, "YYYY/MM/DD HH:mm:ss").valueOf();
+      return ts;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
new file mode 100644
index 0000000..981429b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
@@ -0,0 +1,15 @@
+import Converter from 'yarn-ui/utils/converter';
+
+export default {
+  _initElapsedTimeSorter: function() {
+    jQuery.extend(jQuery.fn.dataTableExt.oSort, {
+      "elapsed-time-pre": function (a) {
+         return Converter.padding(Converter.elapsedTimeToMs(a), 20);
+      },
+    });
+  },
+
+  initDataTableSorter: function() {
+    this._initElapsedTimeSorter();
+  },
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
new file mode 100644
index 0000000..ec587bb
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
@@ -0,0 +1,22 @@
+{
+  "name": "yarn-ui",
+  "dependencies": {
+    "ember": "2.0.1",
+    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4",
+    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
+    "ember-data": "2.0.0",
+    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6",
+    "ember-qunit": "0.4.9",
+    "ember-qunit-notifications": "0.0.7",
+    "ember-resolver": "~0.1.18",
+    "jquery": "^1.11.3",
+    "loader.js": "ember-cli/loader.js#3.2.1",
+    "qunit": "~1.18.0",
+    "bootstrap": "~3.3.2",
+    "d3": "~3.5.6",
+    "datatables": "~1.10.8",
+    "spin.js": "~2.3.2",
+    "momentjs": "~2.10.6",
+    "select2": "4.0.0"
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
new file mode 100644
index 0000000..b898e0d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
@@ -0,0 +1,47 @@
+/* jshint node: true */
+
+module.exports = function(environment) {
+  var ENV = {
+    modulePrefix: 'yarn-ui',
+    environment: environment,
+    baseURL: '/',
+    locationType: 'auto',
+    EmberENV: {
+      FEATURES: {
+        // Here you can enable experimental features on an ember canary build
+        // e.g. 'with-controller': true
+      }
+    },
+
+    APP: {
+      // Here you can pass flags/options to your application instance
+      // when it is created
+    }
+  };
+
+  if (environment === 'development') {
+    // ENV.APP.LOG_RESOLVER = true;
+    // ENV.APP.LOG_ACTIVE_GENERATION = true;
+    // ENV.APP.LOG_TRANSITIONS = true;
+    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
+    // ENV.APP.LOG_VIEW_LOOKUPS = true;
+  }
+
+  if (environment === 'test') {
+    // Testem prefers this...
+    ENV.baseURL = '/';
+    ENV.locationType = 'none';
+
+    // keep test console output quieter
+    ENV.APP.LOG_ACTIVE_GENERATION = false;
+    ENV.APP.LOG_VIEW_LOOKUPS = false;
+
+    ENV.APP.rootElement = '#ember-testing';
+  }
+
+  if (environment === 'production') {
+
+  }
+
+  return ENV;
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js
new file mode 100644
index 0000000..2fa2032
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js
@@ -0,0 +1,29 @@
+/* global require, module */
+var EmberApp = require('ember-cli/lib/broccoli/ember-app');
+
+module.exports = function(defaults) {
+  var app = new EmberApp(defaults, {
+    // Add options here
+  });
+
+  app.import("bower_components/datatables/media/css/jquery.dataTables.min.css");
+  app.import("bower_components/datatables/media/js/jquery.dataTables.min.js");
+  app.import("bower_components/momentjs/min/moment.min.js");
+  app.import("bower_components/select2/dist/css/select2.min.css");
+  app.import("bower_components/select2/dist/js/select2.min.js");
+
+  // Use `app.import` to add additional libraries to the generated
+  // output files.
+  //
+  // If you need to use different assets in different
+  // environments, specify an object as the first parameter. That
+  // object's keys should be the environment name and the values
+  // should be the asset to use in that environment.
+  //
+  // If the library that you are including contains AMD or ES6
+  // modules that you would like to import into your application
+  // please specify an object with the list of modules as keys
+  // along with the exports of each module as its value.
+
+  return app.toTree();
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json
new file mode 100644
index 0000000..875bb90
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json
@@ -0,0 +1,6 @@
+{
+    "compilerOptions": {
+        "target": "ES6",
+        "module": "commonjs"
+    }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json
new file mode 100644
index 0000000..5500dcf
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json
@@ -0,0 +1,44 @@
+{
+  "name": "yarn-ui",
+  "version": "0.0.0",
+  "description": "Small description for yarn-ui goes here",
+  "private": true,
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "scripts": {
+    "build": "ember build",
+    "start": "ember server",
+    "test": "ember test"
+  },
+  "repository": "",
+  "engines": {
+    "node": ">= 0.10.0"
+  },
+  "author": "",
+  "license": "MIT",
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.1.2",
+    "ember-bootstrap": "0.2.0",
+    "ember-cli": "1.13.8",
+    "ember-cli-app-version": "0.5.0",
+    "ember-cli-babel": "^5.1.3",
+    "ember-cli-content-security-policy": "0.4.0",
+    "ember-cli-dependency-checker": "^1.0.1",
+    "ember-cli-htmlbars": "0.7.9",
+    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
+    "ember-cli-ic-ajax": "0.2.1",
+    "ember-cli-inject-live-reload": "^1.3.1",
+    "ember-cli-qunit": "^1.0.0",
+    "ember-cli-release": "0.2.3",
+    "ember-cli-sri": "^1.0.3",
+    "ember-cli-uglify": "^1.2.0",
+    "ember-d3": "0.1.0",
+    "ember-data": "1.13.8",
+    "ember-disable-proxy-controllers": "^1.0.0",
+    "ember-export-application-global": "^1.0.3",
+    "ember-spin-spinner": "0.2.3",
+    "select2": "4.0.0"
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/Sorting icons.psd
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/Sorting icons.psd b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/Sorting icons.psd
new file mode 100644
index 0000000..53b2e06
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/Sorting icons.psd differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/favicon.ico
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/favicon.ico b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/favicon.ico
new file mode 100644
index 0000000..6eeaa2a
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc.png
new file mode 100644
index 0000000..e1ba61a
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc_disabled.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc_disabled.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc_disabled.png
new file mode 100644
index 0000000..fb11dfe
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_asc_disabled.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_both.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_both.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_both.png
new file mode 100644
index 0000000..af5bc7c
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_both.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc.png
new file mode 100644
index 0000000..0e156de
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc_disabled.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc_disabled.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc_disabled.png
new file mode 100644
index 0000000..c9fdd8a
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/assets/images/datatables/sort_desc_disabled.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/crossdomain.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/crossdomain.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/crossdomain.xml
new file mode 100644
index 0000000..0c16a7a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/crossdomain.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+  <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
+
+  <!-- Most restrictive policy: -->
+  <site-control permitted-cross-domain-policies="none"/>
+
+  <!-- Least restrictive policy: -->
+  <!--
+  <site-control permitted-cross-domain-policies="all"/>
+  <allow-access-from domain="*" to-ports="*" secure="false"/>
+  <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
+  -->
+</cross-domain-policy>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt
new file mode 100644
index 0000000..f591645
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt
@@ -0,0 +1,3 @@
+# http://www.robotstxt.org
+User-agent: *
+Disallow:

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json
new file mode 100644
index 0000000..0f35392
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json
@@ -0,0 +1,12 @@
+{
+  "framework": "qunit",
+  "test_page": "tests/index.html?hidepassed",
+  "disable_watching": true,
+  "launch_in_ci": [
+    "PhantomJS"
+  ],
+  "launch_in_dev": [
+    "PhantomJS",
+    "Chrome"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc
new file mode 100644
index 0000000..6ec0b7c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc
@@ -0,0 +1,52 @@
+{
+  "predef": [
+    "document",
+    "window",
+    "location",
+    "setTimeout",
+    "$",
+    "-Promise",
+    "define",
+    "console",
+    "visit",
+    "exists",
+    "fillIn",
+    "click",
+    "keyEvent",
+    "triggerEvent",
+    "find",
+    "findWithAssert",
+    "wait",
+    "DS",
+    "andThen",
+    "currentURL",
+    "currentPath",
+    "currentRouteName"
+  ],
+  "node": false,
+  "browser": false,
+  "boss": true,
+  "curly": true,
+  "debug": false,
+  "devel": false,
+  "eqeqeq": true,
+  "evil": true,
+  "forin": false,
+  "immed": false,
+  "laxbreak": false,
+  "newcap": true,
+  "noarg": true,
+  "noempty": false,
+  "nonew": false,
+  "nomen": false,
+  "onevar": false,
+  "plusplus": false,
+  "regexp": false,
+  "undef": true,
+  "sub": true,
+  "strict": false,
+  "white": false,
+  "eqnull": true,
+  "esnext": true,
+  "unused": true
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js
new file mode 100644
index 0000000..28f4ece
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js
@@ -0,0 +1,11 @@
+import Resolver from 'ember/resolver';
+import config from '../../config/environment';
+
+var resolver = Resolver.create();
+
+resolver.namespace = {
+  modulePrefix: config.modulePrefix,
+  podModulePrefix: config.podModulePrefix
+};
+
+export default resolver;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js
new file mode 100644
index 0000000..0f7aab1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js
@@ -0,0 +1,18 @@
+import Ember from 'ember';
+import Application from '../../app';
+import config from '../../config/environment';
+
+export default function startApp(attrs) {
+  var application;
+
+  var attributes = Ember.merge({}, config.APP);
+  attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
+
+  Ember.run(function() {
+    application = Application.create(attributes);
+    application.setupForTesting();
+    application.injectTestHelpers();
+  });
+
+  return application;
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html
new file mode 100644
index 0000000..33f7045
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>YarnUi Tests</title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    {{content-for 'head'}}
+    {{content-for 'test-head'}}
+
+    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/yarn-ui.css">
+    <link rel="stylesheet" href="assets/test-support.css">
+
+    {{content-for 'head-footer'}}
+    {{content-for 'test-head-footer'}}
+  </head>
+  <body>
+
+    {{content-for 'body'}}
+    {{content-for 'test-body'}}
+    <script src="assets/vendor.js"></script>
+    <script src="assets/test-support.js"></script>
+    <script src="assets/yarn-ui.js"></script>
+    <script src="testem.js"></script>
+    <script src="assets/test-loader.js"></script>
+
+    {{content-for 'body-footer'}}
+    {{content-for 'test-body-footer'}}
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js
new file mode 100644
index 0000000..e6cfb70
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js
@@ -0,0 +1,6 @@
+import resolver from './helpers/resolver';
+import {
+  setResolver
+} from 'ember-qunit';
+
+setResolver(resolver);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js
new file mode 100644
index 0000000..5683d5a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-app', 'Unit | Adapter | yarn app', {
+  // Specify the other units that are required for this test.
+  // needs: ['serializer:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var adapter = this.subject();
+  assert.ok(adapter);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js
new file mode 100644
index 0000000..d25f72d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:yarn-apps', {
+  // Specify the other units that are required for this test.
+  // needs: ['controller:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var controller = this.subject();
+  assert.ok(controller);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js
new file mode 100644
index 0000000..313dfdd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js
@@ -0,0 +1,12 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:yarn-queues', {
+  // Specify the other units that are required for this test.
+  // needs: ['controller:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var controller = this.subject();
+  assert.ok(controller);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js
new file mode 100644
index 0000000..b4f3503
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js
@@ -0,0 +1,12 @@
+import Ember from 'ember';
+import ChartsMixin from '../../../mixins/charts';
+import { module, test } from 'qunit';
+
+module('Unit | Mixin | charts');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  var ChartsObject = Ember.Object.extend(ChartsMixin);
+  var subject = ChartsObject.create();
+  assert.ok(subject);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js
new file mode 100644
index 0000000..e3261e2
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js
@@ -0,0 +1,12 @@
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-app', 'Unit | Model | yarn app', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('it exists', function(assert) {
+  var model = this.subject();
+  // var store = this.store();
+  assert.ok(!!model);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js
new file mode 100644
index 0000000..a438b2e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js
@@ -0,0 +1,11 @@
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-apps', 'Unit | Route | yarn apps', {
+  // Specify the other units that are required for this test.
+  // needs: ['controller:foo']
+});
+
+test('it exists', function(assert) {
+  var route = this.subject();
+  assert.ok(route);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js
new file mode 100644
index 0000000..a169fd5
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js
@@ -0,0 +1,15 @@
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-app', 'Unit | Serializer | yarn app', {
+  // Specify the other units that are required for this test.
+  needs: ['serializer:yarn-app']
+});
+
+// Replace this with your real tests.
+test('it serializes records', function(assert) {
+  var record = this.subject();
+
+  var serializedRecord = record.serialize();
+
+  assert.ok(serializedRecord);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
new file mode 100644
index 0000000..55cf71d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
@@ -0,0 +1,10 @@
+import converter from '../../../utils/converter';
+import { module, test } from 'qunit';
+
+module('Unit | Utility | converter');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  var result = converter();
+  assert.ok(result);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep
new file mode 100644
index 0000000..e69de29


[12/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-container-log-test.js
new file mode 100644
index 0000000..4e68da0
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-container-log-test.js
@@ -0,0 +1,120 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+import Constants from 'yarn-ui/constants';
+
+moduleFor('route:yarn-container-log', 'Unit | Route | ContainerLog', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting container log', function(assert) {
+  var response = {
+      logs: "This is syslog",
+      containerID: "container_e32_1456000363780_0002_01_000001",
+      logFileName: "syslog"};
+  var store = {
+    findRecord: function(type) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      }
+    )}
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model({node_id: "localhost:64318",
+      node_addr: "localhost:8042",
+      container_id: "container_e32_1456000363780_0002_01_000001",
+      filename: "syslog"});
+   model.then(function(value) {
+     assert.ok(value);
+     assert.ok(value.containerLog);
+     assert.deepEqual(value.containerLog, response);
+     assert.ok(value.nodeInfo);
+     assert.equal(value.nodeInfo.addr, 'localhost:8042');
+     assert.equal(value.nodeInfo.id, 'localhost:64318');
+   });
+});
+
+/**
+ * This can happen when an empty response is sent from server
+ */
+test('Test non HTTP error while getting container log', function(assert) {
+  var error = {};
+  var response = {
+      logs: "",
+      containerID: "container_e32_1456000363780_0002_01_000001",
+      logFileName: "syslog"};
+  var store = {
+    findRecord: function(type) {
+      return new Ember.RSVP.Promise(function(resolve, reject) {
+        reject(error);
+      }
+    )}
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model({node_id: "localhost:64318",
+      node_addr: "localhost:8042",
+      container_id: "container_e32_1456000363780_0002_01_000001",
+      filename: "syslog"});
+   model.then(function(value) {
+     assert.ok(value);
+     assert.ok(value.containerLog);
+     assert.deepEqual(value.containerLog, response);
+     assert.ok(value.nodeInfo);
+     assert.equal(value.nodeInfo.addr, 'localhost:8042');
+     assert.equal(value.nodeInfo.id, 'localhost:64318');
+   });
+});
+
+test('Test HTTP error while getting container log', function(assert) {
+  var error = {errors: [{status: 404, responseText: 'Not Found'}]};
+  var response = {
+      logs: "",
+      containerID: "container_e32_1456000363780_0002_01_000001",
+      logFileName: "syslog"};
+  var store = {
+    findRecord: function(type) {
+      return new Ember.RSVP.Promise(function(resolve, reject) {
+        reject(error);
+      }
+    )}
+  };
+  assert.expect(5);
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model({node_id: "localhost:64318",
+      node_addr: "localhost:8042",
+      container_id: "container_e32_1456000363780_0002_01_000001",
+      filename: "syslog"});
+   model.then(function(value) {
+     assert.ok(value);
+     assert.ok(value.errors);
+     assert.equal(value.errors.length, 1);
+     assert.equal(value.errors[0].status, 404);
+     assert.equal(value.errors[0].responseText, 'Not Found');
+   });
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-app-test.js
new file mode 100644
index 0000000..8e5acf9
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-app-test.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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-app', 'Unit | Route | NodeApp', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting specific app on a node', function(assert) {
+  var response =
+      {id:"application_1456251210105_0001", state:"FINISHED", user:"root"};
+  var store = {
+    queryRecord: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      });
+    }
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042",
+          app_id:"application_1456251210105_0001"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.nodeApp);
+          assert.deepEqual(value.nodeApp, response);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-apps-test.js
new file mode 100644
index 0000000..44d9995
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-apps-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-apps', 'Unit | Route | NodeApps', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting apps on a node', function(assert) {
+  var response = [
+      {id:"application_1456251210105_0001", state:"FINISHED", user:"root"},
+      {id:"application_1456251210105_0002", state:"RUNNING",user:"root",
+      containerids:["container_e38_1456251210105_0002_01_000001",
+      "container_e38_1456251210105_0002_01_000002"]}];
+  var store = {
+    query: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response.slice());
+      });
+    }
+  };
+  assert.expect(8);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.apps);
+          assert.equal(value.apps.length, 2);
+          assert.deepEqual(response[0], value.apps[0]);
+          assert.deepEqual(response[1], value.apps[1]);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-container-test.js
new file mode 100644
index 0000000..f0b68fc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-container-test.js
@@ -0,0 +1,61 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-container', 'Unit | Route | NodeContainer', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting specific container on a node', function(assert) {
+  var response =
+      {id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+      "stdout"]};
+  var store = {
+    queryRecord: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      });
+    }
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042",
+          container_id:"container_e32_1456000363780_0002_01_000001"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.nodeContainer);
+          assert.deepEqual(value.nodeContainer, response);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-containers-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-containers-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-containers-test.js
new file mode 100644
index 0000000..8359713
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-containers-test.js
@@ -0,0 +1,68 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-containers', 'Unit | Route | NodeContainers', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting apps on a node', function(assert) {
+  var response =
+      [{id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+      "stdout"]},
+      {id:"container_e32_1456000363780_0002_01_000003", state:"RUNNING",
+      exitCode:-1000, diagnostics:"", user:"root", totalMemoryNeededMB:1024,
+      totalVCoresNeeded:1,containerLogsLink:"http://localhost:8042/node" +
+      "/containerlogs/container_e32_1456000363780_0002_01_000003/root",
+      nodeId:"localhost:64318",containerLogFiles:["syslog","stderr",
+      "syslog.shuffle","stdout"]}];
+  var store = {
+    query: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response.slice());
+      });
+    }
+  };
+  assert.expect(8);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.containers);
+          assert.equal(value.containers.length, 2);
+          assert.deepEqual(value.containers[0], response[0]);
+          assert.deepEqual(value.containers[1], response[1]);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-test.js
new file mode 100644
index 0000000..4e82f1b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-node-test.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 { moduleFor, test } from 'ember-qunit';
+import Ember from 'ember';
+
+moduleFor('route:yarn-node', 'Unit | Route | Node', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting a node', function(assert) {
+  var nodeResponse =
+      {healthReport: "Healthy", totalVmemAllocatedContainersMB: 344064,
+      totalPmemAllocatedContainersMB: 163840,
+      totalVCoresAllocatedContainers: 160,
+      vmemCheckEnabled: true, pmemCheckEnabled: true,
+      lastNodeUpdateTime: 1456250210310, nodeHealthy: true,
+      nodeManagerVersion: "3.0.0-SNAPSHOT",
+      nodeManagerBuildVersion: "3.0.0-SNAPSHOT",
+      nodeManagerVersionBuiltOn: "2000-01-01T00:00Z",
+      hadoopVersion: "3.0.0-SNAPSHOT",
+      hadoopBuildVersion: "3.0.0-SNAPSHOT",
+      hadoopVersionBuiltOn: "2000-01-01T00:00Z",
+      id: "localhost:64318", nodeHostName: "192.168.0.102",
+      nmStartupTime: 1456250208231};
+  var rmNodeResponse =
+      {rack: "/default-rack", state: "RUNNING", id: "localhost:64318",
+      nodeHostName: "localhost", nodeHTTPAddress: "localhost:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 0,
+      availMemoryMB: 163840, usedVirtualCores: 0,
+      availableVirtualCores: 160,
+      resourceUtilization: {
+      nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+      nodeCPUUsage: 0.14995001256465912,
+      aggregatedContainersPhysicalMemoryMB: 0,
+      aggregatedContainersVirtualMemoryMB: 0,
+      containersCPUUsage: 0
+      }};
+
+  // Create store which returns appropriate responses.
+  var store = {
+    findRecord: function(type) {
+      if (type == 'yarnNode') {
+        return new Ember.RSVP.Promise(function(resolve) {
+          resolve(nodeResponse);
+        });
+      } else if (type == 'yarnRmNode') {
+        return new Ember.RSVP.Promise(function(resolve) {
+          resolve(rmNodeResponse);
+        });
+      }
+    }
+  };
+  var route = this.subject();
+  assert.expect(4);
+  route.set('store', store);
+  var model = route.model(
+      {node_addr:"localhost:8042", node_id:"localhost:64318"})._result;
+  assert.ok(model.node);
+  assert.deepEqual(model.node, nodeResponse);
+  assert.ok(model.rmNode);
+  assert.deepEqual(model.rmNode, rmNodeResponse);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-nodes-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-nodes-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-nodes-test.js
new file mode 100644
index 0000000..baa5bd6
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-nodes-test.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 { moduleFor, test } from 'ember-qunit';
+import Ember from 'ember';
+
+moduleFor('route:yarn-nodes', 'Unit | Route | Nodes', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting nodes', function(assert) {
+  var response = [{
+      rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
+      nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 0,
+      availMemoryMB: 163840, usedVirtualCores: 0,
+      availableVirtualCores: 160,
+      resourceUtilization: {
+        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+        nodeCPUUsage: 0.14995001256465912,
+        aggregatedContainersPhysicalMemoryMB: 0,
+        aggregatedContainersVirtualMemoryMB: 0,
+        containersCPUUsage: 0
+      }},
+      {rack: "/default-rack", state: "RUNNING", id: "192.168.1.2:64318",
+      nodeHostName: "192.168.1.2", nodeHTTPAddress: "192.168.1.2:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 0,
+      availMemoryMB: 163840, usedVirtualCores: 0,
+      availableVirtualCores: 160,
+      resourceUtilization: {
+        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+        nodeCPUUsage: 0.14995001256465912,
+        aggregatedContainersPhysicalMemoryMB: 0,
+        aggregatedContainersVirtualMemoryMB: 0,
+        containersCPUUsage: 0
+      }}];
+  var store = {
+    findAll: function(type) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      });
+    }
+  };
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model()._result;
+  assert.expect(4);
+  assert.ok(model);
+  assert.equal(model.length, 2);
+  assert.deepEqual(response[0], model[0]);
+  assert.deepEqual(response[1], model[1]);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-app-test.js
new file mode 100644
index 0000000..4158612
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-app-test.js
@@ -0,0 +1,33 @@
+/**
+ * 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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-app', 'Unit | Serializer | yarn app', {
+  // Specify the other units that are required for this test.
+  needs: ['serializer:yarn-app']
+});
+
+// Replace this with your real tests.
+test('it serializes records', function(assert) {
+  var record = this.subject();
+
+  var serializedRecord = record.serialize();
+
+  assert.ok(serializedRecord);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-container-log-test.js
new file mode 100644
index 0000000..2349dc2
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-container-log-test.js
@@ -0,0 +1,49 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-container-log', 'Unit | Serializer | ContainerLog', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-container-log"
+  },
+  payload = "This is syslog";
+  var id = "localhost:64318!container_e32_1456000363780_0002_01_000001!syslog";
+  assert.expect(6);
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
+  assert.ok(response.data);
+  assert.equal(response.data.id, id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.logs, payload);
+  assert.equal(response.data.attributes.containerID,
+      "container_e32_1456000363780_0002_01_000001");
+  assert.equal(response.data.attributes.logFileName, "syslog");
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-app-test.js
new file mode 100644
index 0000000..21a715c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-app-test.js
@@ -0,0 +1,102 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-node-app', 'Unit | Serializer | NodeApp', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.normalizeArrayResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeArrayResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-app"
+  },
+  payload = {
+    apps: {
+      app: [{
+        id:"application_1456251210105_0001", state:"FINISHED", user:"root"
+      },{
+        id:"application_1456251210105_0002", state:"RUNNING",user:"root",
+        containerids:["container_e38_1456251210105_0002_01_000001",
+        "container_e38_1456251210105_0002_01_000002"]
+      }]
+    }
+  };
+  assert.expect(15);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 2);
+  assert.equal(response.data[0].attributes.containers, undefined);
+  assert.equal(response.data[1].attributes.containers.length, 2);
+  assert.deepEqual(response.data[1].attributes.containers,
+      payload.apps.app[1].containerids);
+  for (var i = 0; i < 2; i++) {
+    assert.equal(response.data[i].type, modelClass.modelName);
+    assert.equal(response.data[i].id, payload.apps.app[i].id);
+    assert.equal(response.data[i].attributes.appId, payload.apps.app[i].id);
+    assert.equal(response.data[i].attributes.state, payload.apps.app[i].state);
+    assert.equal(response.data[i].attributes.user, payload.apps.app[i].user);
+  }
+});
+
+test('normalizeArrayResponse no apps test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-app"
+  },
+  payload = { apps: null };
+  assert.expect(5);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 1);
+  assert.equal(response.data[0].type, modelClass.modelName);
+  assert.equal(response.data[0].id, "dummy");
+  assert.equal(response.data[0].attributes.appId, undefined);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-app"
+  },
+  payload = {
+    app: {id:"application_1456251210105_0001", state:"FINISHED", user:"root"}
+  };
+  assert.expect(7);
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(payload.app.id, response.data.id);
+  assert.equal(modelClass.modelName, response.data.type);
+  assert.equal(payload.app.id, response.data.attributes.appId);
+  assert.equal(payload.app.state, response.data.attributes.state);
+  assert.equal(payload.app.user, response.data.attributes.user);
+  assert.equal(response.data.attributes.containers, undefined);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-container-test.js
new file mode 100644
index 0000000..1f08467
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-container-test.js
@@ -0,0 +1,128 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-node-container', 'Unit | Serializer | NodeContainer', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.normalizeArrayResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeArrayResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-container"
+  },
+  payload = {
+    containers: {
+      container: [{
+        id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+        exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+        totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+        "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+        nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+        "stdout"]
+      },{
+        id:"container_e32_1456000363780_0002_01_000003", state:"RUNNING",
+        exitCode:-1000, diagnostics:"", user:"root", totalMemoryNeededMB:1024,
+        totalVCoresNeeded:1,containerLogsLink:"http://localhost:8042/node" +
+        "/containerlogs/container_e32_1456000363780_0002_01_000003/root",
+        nodeId:"localhost:64318",containerLogFiles:["syslog","stderr",
+        "syslog.shuffle","stdout"]
+      }]
+    }
+  };
+  assert.expect(14);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 2);
+  assert.equal(response.data[0].id,
+      "container_e32_1456000363780_0002_01_000001");
+  assert.equal(response.data[1].id,
+      "container_e32_1456000363780_0002_01_000003");
+  assert.equal(response.data[0].attributes.containerLogFiles.length, 3);
+  assert.equal(response.data[1].attributes.containerLogFiles.length, 4);
+  for (var i = 0; i < 2; i++) {
+    assert.equal(response.data[i].type, modelClass.modelName);
+    assert.deepEqual(response.data[i].attributes.containerLogFiles,
+        payload.containers.container[i].containerLogFiles);
+    assert.equal(response.data[i].attributes.state,
+        payload.containers.container[i].state);
+    assert.equal(response.data[i].attributes.user,
+        payload.containers.container[i].user);
+  }
+});
+
+test('normalizeArrayResponse no containers test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-container"
+  },
+  payload = { containers: null };
+  assert.expect(5);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 1);
+  assert.equal(response.data[0].type, modelClass.modelName);
+  assert.equal(response.data[0].id, "dummy");
+  assert.equal(response.data[0].attributes.containerId, undefined);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-container"
+  },
+  payload = {
+    container: {
+      id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+      "stdout"]
+    }
+  };
+  assert.expect(11);
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.id, payload.container.id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.containerId, payload.container.id);
+  assert.equal(response.data.attributes.state, payload.container.state);
+  assert.equal(response.data.attributes.user, payload.container.user);
+  assert.equal(response.data.attributes.exitCode, payload.container.exitCode);
+  assert.equal(response.data.attributes.totalMemoryNeededMB,
+      payload.container.totalMemoryNeeded);
+  assert.equal(response.data.attributes.totalVCoresNeeded,
+      payload.container.totalVCoresNeeded);
+  assert.equal(response.data.attributes.containerLogFiles.length, 3);
+  assert.deepEqual(response.data.attributes.containerLogFiles,
+      payload.container.containerLogFiles);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-test.js
new file mode 100644
index 0000000..0e76ccb
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-node-test.js
@@ -0,0 +1,69 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+import Converter from 'yarn-ui/utils/converter';
+
+moduleFor('serializer:yarn-node', 'Unit | Serializer | Node', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node"
+  },
+  payload = {
+    nodeInfo: {
+      healthReport: "Healthy", totalVmemAllocatedContainersMB: 344064,
+      totalPmemAllocatedContainersMB: 163840,
+      totalVCoresAllocatedContainers: 160,
+      vmemCheckEnabled: true, pmemCheckEnabled: true,
+      lastNodeUpdateTime: 1456250210310, nodeHealthy: true,
+      nodeManagerVersion: "3.0.0-SNAPSHOT",
+      nodeManagerBuildVersion: "3.0.0-SNAPSHOT",
+      nodeManagerVersionBuiltOn: "2000-01-01T00:00Z",
+      hadoopVersion: "3.0.0-SNAPSHOT",
+      hadoopBuildVersion: "3.0.0-SNAPSHOT",
+      hadoopVersionBuiltOn: "2000-01-01T00:00Z",
+      id: "localhost:64318", nodeHostName: "192.168.0.102",
+      nmStartupTime: 1456250208231
+    }
+  };
+  assert.expect(6);
+  var id = "localhost:64318";
+  var response = serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
+  assert.equal(response.data.id, id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.totalVmemAllocatedContainersMB,
+      payload.nodeInfo.totalVmemAllocatedContainersMB);
+  assert.equal(response.data.attributes.totalPmemAllocatedContainersMB,
+      payload.nodeInfo.totalPmemAllocatedContainersMB);
+  assert.equal(response.data.attributes.totalVCoresAllocatedContainers,
+      payload.nodeInfo.totalVCoresAllocatedContainers);
+  assert.equal(response.data.attributes.nmStartupTime,
+      Converter.timeStampToDate(payload.nodeInfo.nmStartupTime));
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-rm-node-test.js
new file mode 100644
index 0000000..bc6397d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/serializers/yarn-rm-node-test.js
@@ -0,0 +1,153 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-rm-node', 'Unit | Serializer | RMNode', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.normalizeArrayResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeArrayResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-rm-node"
+  },
+  payload = {
+    nodes: {
+      node: [{
+        rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
+        nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
+        lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+        healthReport: "", numContainers: 0, usedMemoryMB: 2048,
+        availMemoryMB: 161792, usedVirtualCores: 2,
+        availableVirtualCores: 158, nodeLabels: ["x"],
+        resourceUtilization: {
+          nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+          nodeCPUUsage: 0.14995001256465912,
+          aggregatedContainersPhysicalMemoryMB: 0,
+          aggregatedContainersVirtualMemoryMB: 0,
+          containersCPUUsage: 0
+        }
+      },{
+        rack: "/default-rack", state: "RUNNING", id: "192.168.1.2:64318",
+        nodeHostName: "192.168.1.2", nodeHTTPAddress: "192.168.1.2:8042",
+        lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+        healthReport: "", numContainers: 0, usedMemoryMB: 0,
+        availMemoryMB: 163840, usedVirtualCores: 0,
+        availableVirtualCores: 160, nodeLabels: ["y"],
+        resourceUtilization: {
+          nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+          nodeCPUUsage: 0.14995001256465912,
+          aggregatedContainersPhysicalMemoryMB: 0,
+          aggregatedContainersVirtualMemoryMB: 0,
+          containersCPUUsage: 0
+        }
+      }]
+    }
+  };
+  assert.expect(12);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 2);
+  assert.equal(response.data[0].id, "192.168.1.1:64318");
+  assert.equal(response.data[1].id, "192.168.1.2:64318");
+  for (var i = 0; i < 2; i++) {
+    assert.equal(response.data[i].type, modelClass.modelName);
+    assert.equal(response.data[i].attributes.nodeHostName,
+        payload.nodes.node[i].nodeHostName);
+    assert.equal(response.data[i].attributes.nodeHTTPAddress,
+        payload.nodes.node[i].nodeHTTPAddress);
+    assert.deepEqual(response.data[i].attributes.nodeLabels,
+        payload.nodes.node[i].nodeLabels);
+  }
+});
+
+test('normalizeArrayResponse no nodes test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-rm-node"
+  },
+  payload = { nodes: null };
+  assert.expect(5);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  console.log(response);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 1);
+  assert.equal(response.data[0].type, modelClass.modelName);
+  assert.equal(response.data[0].id, "dummy");
+  assert.equal(response.data[0].attributes.nodeHostName, undefined);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-rm-node"
+  },
+  payload = {
+    node: {
+      rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
+      nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 2048,
+      availMemoryMB: 161792, usedVirtualCores: 2,
+      availableVirtualCores: 158, nodeLabels: ["x"],
+      resourceUtilization: {
+        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+        nodeCPUUsage: 0.14995001256465912,
+        aggregatedContainersPhysicalMemoryMB: 0,
+        aggregatedContainersVirtualMemoryMB: 0,
+        containersCPUUsage: 0
+      }
+    }
+  };
+  assert.expect(13);
+  var id = "localhost:64318";
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
+  assert.ok(response.data);
+  assert.equal(response.data.id, id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.rack, payload.node.rack);
+  assert.equal(response.data.attributes.state, payload.node.state);
+  assert.equal(response.data.attributes.nodeHostName,
+      payload.node.nodeHostName);
+  assert.equal(response.data.attributes.nodeHTTPAddress,
+      payload.node.nodeHTTPAddress);
+  assert.equal(response.data.attributes.version, payload.node.version);
+  assert.equal(response.data.attributes.availMemoryMB,
+      payload.node.availMemoryMB);
+  assert.equal(response.data.attributes.usedMemoryMB,
+      payload.node.usedMemoryMB);
+  assert.equal(response.data.attributes.availableVirtualCores,
+      payload.node.availableVirtualCores);
+  assert.equal(response.data.attributes.usedVirtualCores,
+      payload.node.usedVirtualCores);
+  assert.deepEqual(response.data.attributes.nodeLabels,
+      payload.node.nodeLabels);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/converter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/converter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/converter-test.js
new file mode 100644
index 0000000..481537d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/converter-test.js
@@ -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.
+ */
+
+import converter from '../../../utils/converter';
+import { module, test } from 'qunit';
+
+module('Unit | Utility | Converter');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  assert.ok(converter);
+  assert.ok(converter.splitForContainerLogs);
+});
+
+test('split for container logs', function(assert) {
+  var id = "localhost:64318!container_e32_1456000363780_0002_01_000001!" +
+      "syslog";
+  var arr = converter.splitForContainerLogs(id);
+  assert.ok(arr);
+  assert.deepEqual(arr, ["localhost:64318",
+      "container_e32_1456000363780_0002_01_000001", "syslog"]);
+  id = "localhost:64318!container_e32_1456000363780_0002_01_000001!" +
+      "syslog!logs";
+  arr = converter.splitForContainerLogs(id);
+  assert.ok(arr);
+  assert.deepEqual(arr, ["localhost:64318",
+      "container_e32_1456000363780_0002_01_000001", "syslog!logs"]);
+  id = "localhost:64318!container_e32_1456000363780_0002_01_000001";
+  arr = converter.splitForContainerLogs(id);
+  assert.notOk(arr);
+  id = null;
+  arr = converter.splitForContainerLogs(id);
+  assert.notOk(arr);
+  id = undefined;
+  arr = converter.splitForContainerLogs(id);
+  assert.notOk(arr);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/sorter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/sorter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/sorter-test.js
new file mode 100644
index 0000000..8f17380
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/utils/sorter-test.js
@@ -0,0 +1,26 @@
+/**
+ * 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 Sorter from 'yarn-ui/utils/sorter';
+import { module, test } from 'qunit';
+
+module('Unit | Utility | Sorter');
+
+test('Basic creation test', function(assert) {
+  assert.ok(Sorter);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json
deleted file mode 100644
index 0f35392..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/testem.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "framework": "qunit",
-  "test_page": "tests/index.html?hidepassed",
-  "disable_watching": true,
-  "launch_in_ci": [
-    "PhantomJS"
-  ],
-  "launch_in_dev": [
-    "PhantomJS",
-    "Chrome"
-  ]
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc
deleted file mode 100644
index 6ec0b7c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc
+++ /dev/null
@@ -1,52 +0,0 @@
-{
-  "predef": [
-    "document",
-    "window",
-    "location",
-    "setTimeout",
-    "$",
-    "-Promise",
-    "define",
-    "console",
-    "visit",
-    "exists",
-    "fillIn",
-    "click",
-    "keyEvent",
-    "triggerEvent",
-    "find",
-    "findWithAssert",
-    "wait",
-    "DS",
-    "andThen",
-    "currentURL",
-    "currentPath",
-    "currentRouteName"
-  ],
-  "node": false,
-  "browser": false,
-  "boss": true,
-  "curly": true,
-  "debug": false,
-  "devel": false,
-  "eqeqeq": true,
-  "evil": true,
-  "forin": false,
-  "immed": false,
-  "laxbreak": false,
-  "newcap": true,
-  "noarg": true,
-  "noempty": false,
-  "nonew": false,
-  "nomen": false,
-  "onevar": false,
-  "plusplus": false,
-  "regexp": false,
-  "undef": true,
-  "sub": true,
-  "strict": false,
-  "white": false,
-  "eqnull": true,
-  "esnext": true,
-  "unused": true
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js
deleted file mode 100644
index 28f4ece..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/resolver.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import Resolver from 'ember/resolver';
-import config from '../../config/environment';
-
-var resolver = Resolver.create();
-
-resolver.namespace = {
-  modulePrefix: config.modulePrefix,
-  podModulePrefix: config.podModulePrefix
-};
-
-export default resolver;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js
deleted file mode 100644
index 0f7aab1..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/helpers/start-app.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import Ember from 'ember';
-import Application from '../../app';
-import config from '../../config/environment';
-
-export default function startApp(attrs) {
-  var application;
-
-  var attributes = Ember.merge({}, config.APP);
-  attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
-
-  Ember.run(function() {
-    application = Application.create(attributes);
-    application.setupForTesting();
-    application.injectTestHelpers();
-  });
-
-  return application;
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html
deleted file mode 100644
index 33f7045..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/index.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <title>YarnUi Tests</title>
-    <meta name="description" content="">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-
-    {{content-for 'head'}}
-    {{content-for 'test-head'}}
-
-    <link rel="stylesheet" href="assets/vendor.css">
-    <link rel="stylesheet" href="assets/yarn-ui.css">
-    <link rel="stylesheet" href="assets/test-support.css">
-
-    {{content-for 'head-footer'}}
-    {{content-for 'test-head-footer'}}
-  </head>
-  <body>
-
-    {{content-for 'body'}}
-    {{content-for 'test-body'}}
-    <script src="assets/vendor.js"></script>
-    <script src="assets/test-support.js"></script>
-    <script src="assets/yarn-ui.js"></script>
-    <script src="testem.js"></script>
-    <script src="assets/test-loader.js"></script>
-
-    {{content-for 'body-footer'}}
-    {{content-for 'test-body-footer'}}
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js
deleted file mode 100644
index e6cfb70..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/test-helper.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import resolver from './helpers/resolver';
-import {
-  setResolver
-} from 'ember-qunit';
-
-setResolver(resolver);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js
deleted file mode 100644
index 5683d5a..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-app-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('adapter:yarn-app', 'Unit | Adapter | yarn app', {
-  // Specify the other units that are required for this test.
-  // needs: ['serializer:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
-  var adapter = this.subject();
-  assert.ok(adapter);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js
deleted file mode 100644
index e6e7b43..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-import Constants from 'yarn-ui/constants';
-
-moduleFor('adapter:yarn-container-log', 'Unit | Adapter | ContainerLog', {
-});
-
-test('Basic creation', function(assert) {
-  let adapter = this.subject();
-
-  assert.ok(adapter);
-  assert.ok(adapter.urlForFindRecord);
-  assert.ok(adapter.ajax);
-  assert.ok(adapter.headers);
-  assert.ok(adapter.host);
-  assert.ok(adapter.namespace);
-  assert.equal(adapter.headers.Accept, "text/plain");
-  assert.equal(adapter.namespace, "ws/v1/node");
-});
-
-test('urlForFindRecord test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(adapter.urlForFindRecord("localhost:8042" +
-      Constants.PARAM_SEPARATOR + "container_e27_11111111111_0001_01_000001" +
-      Constants.PARAM_SEPARATOR + "syslog"),
-      host + "localhost:8042/ws/v1/node/containerlogs/" +
-      "container_e27_11111111111_0001_01_000001/syslog");
-});
-
-test('ajaxOptions test', function(assert) {
-  let adapter = this.subject();
-  var hash = adapter.ajaxOptions('/containerlogs', 'type', {});
-  assert.equal(hash.dataType, 'text');
-});
-
-test('findRecord test', function(assert) {
-  let adapter = this.subject(),
-      testModel = { modelName: "testModel" },
-      testStore = {},
-      testSnapshot = {};
-  let host = adapter.host;
-  let testId = "localhost:8042" + Constants.PARAM_SEPARATOR +
-      "container_e27_11111111111_0001_01_000001" + Constants.PARAM_SEPARATOR +
-      "syslog";
-  assert.expect(2);
-
-  adapter.ajax = function (url, method) {
-    assert.equal(url, host + "localhost:8042/ws/v1/node/containerlogs/" +
-        "container_e27_11111111111_0001_01_000001/syslog");
-    assert.equal(method, 'GET');
-  };
-
-  adapter.findRecord(testStore, testModel, testId, testSnapshot);
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js
deleted file mode 100644
index 3a25996..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('adapter:yarn-node-app', 'Unit | Adapter | NodeApp', {
-});
-
-test('Basic creation', function(assert) {
-  let adapter = this.subject();
-  assert.expect(11);
-  assert.ok(adapter);
-  assert.ok(adapter.urlForQueryRecord);
-  assert.ok(adapter.queryRecord);
-  assert.ok(adapter.urlForQuery);
-  assert.ok(adapter.query);
-  assert.ok(adapter.ajax);
-  assert.ok(adapter.headers);
-  assert.ok(adapter.host);
-  assert.ok(adapter.namespace);
-  assert.equal("application/json", adapter.headers.Accept);
-  assert.equal("ws/v1/node", adapter.namespace);
-});
-
-test('urlForQueryRecord test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(
-      host + "localhost:8042/ws/v1/node/apps/application_1111111111_1111",
-      adapter.urlForQueryRecord(
-      {nodeAddr: "localhost:8042", appId: "application_1111111111_1111"}));
-});
-
-test('urlForQuery test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(host + "localhost:8042/ws/v1/node/apps",
-      adapter.urlForQuery({nodeAddr: "localhost:8042"}));
-});
-
-test('query test', function(assert) {
-  let adapter = this.subject(),
-      testModel = { modelName: "testModel" },
-      testStore = {},
-      testQuery = {nodeAddr: "localhost:8042"};
-  let host = adapter.host;
-  assert.expect(3);
-
-  adapter.ajax = function (url, method, hash) {
-    assert.equal(host + "localhost:8042/ws/v1/node/apps", url);
-    assert.equal('GET', method);
-    assert.equal(null, hash.data);
-  };
-
-  adapter.query(testStore, testModel, testQuery);
-});
-
-test('queryRecord test', function(assert) {
-  let adapter = this.subject(),
-      testModel = { modelName: "testModel" },
-      testStore = {},
-      testQuery = {
-        nodeAddr: "localhost:8042",
-        appId: "application_1111111111_1111"
-      };
-  let host = adapter.host;
-  assert.expect(3);
-
-  adapter.ajax = function (url, method, hash) {
-    assert.equal(
-        host + "localhost:8042/ws/v1/node/apps/application_1111111111_1111",
-        url);
-    assert.equal('GET', method);
-    assert.equal(null, hash.data);
-  };
-
-  adapter.queryRecord(testStore, testModel, testQuery);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js
deleted file mode 100644
index 7d2bb2d..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('adapter:yarn-node-container', 'Unit | Adapter | NodeContainer', {
-});
-
-test('Basic creation', function(assert) {
-  let adapter = this.subject();
-  assert.expect(11);
-  assert.ok(adapter);
-  assert.ok(adapter.urlForQueryRecord);
-  assert.ok(adapter.queryRecord);
-  assert.ok(adapter.urlForQuery);
-  assert.ok(adapter.query);
-  assert.ok(adapter.ajax);
-  assert.ok(adapter.headers);
-  assert.ok(adapter.host);
-  assert.ok(adapter.namespace);
-  assert.equal("application/json", adapter.headers.Accept);
-  assert.equal("ws/v1/node", adapter.namespace);
-});
-
-test('urlForQueryRecord test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(host + "localhost:8042/ws/v1/node/containers/" +
-      "container_e27_11111111111_0001_01_000001",
-      adapter.urlForQueryRecord(
-      {nodeHttpAddr: "localhost:8042",
-      containerId: "container_e27_11111111111_0001_01_000001"}));
-});
-
-test('urlForQuery test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(host + "localhost:8042/ws/v1/node/containers",
-      adapter.urlForQuery({nodeHttpAddr: "localhost:8042"}));
-});
-
-test('query test', function(assert) {
-  let adapter = this.subject(),
-      testModel = { modelName: "testModel" },
-      testStore = {},
-      testQuery = {nodeHttpAddr: "localhost:8042"};
-  let host = adapter.host;
-  assert.expect(3);
-
-  adapter.ajax = function (url, method, hash) {
-    assert.equal(host + "localhost:8042/ws/v1/node/containers", url);
-    assert.equal('GET', method);
-    assert.equal(null, hash.data);
-  };
-
-  adapter.query(testStore, testModel, testQuery);
-});
-
-test('queryRecord test', function(assert) {
-  let adapter = this.subject(),
-      testModel = { modelName: "testModel" },
-      testStore = {},
-      testQuery = {
-        nodeHttpAddr: "localhost:8042",
-        containerId: "container_e27_11111111111_0001_01_000001"
-      };
-  let host = adapter.host;
-  assert.expect(3);
-
-  adapter.ajax = function (url, method, hash) {
-    assert.equal(host + "localhost:8042/ws/v1/node/containers/" +
-        "container_e27_11111111111_0001_01_000001", url);
-    assert.equal('GET', method);
-    assert.equal(null, hash.data);
-  };
-
-  adapter.queryRecord(testStore, testModel, testQuery);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js
deleted file mode 100644
index 15aefef..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('adapter:yarn-node', 'Unit | Adapter | Node', {
-});
-
-test('Basic creation', function(assert) {
-  let adapter = this.subject();
-
-  assert.ok(adapter);
-  assert.ok(adapter.urlForFindRecord);
-  assert.ok(adapter.ajax);
-  assert.ok(adapter.headers);
-  assert.ok(adapter.host);
-  assert.ok(adapter.namespace);
-  assert.equal(adapter.headers.Accept, "application/json");
-  assert.equal(adapter.namespace, "ws/v1/node");
-});
-
-test('urlForFindRecord test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(adapter.urlForFindRecord("localhost:8042"),
-      host + "localhost:8042/ws/v1/node");
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js
deleted file mode 100644
index bf009d4..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('adapter:yarn-rm-node', 'Unit | Adapter | RMNode', {
-  // Specify the other units that are required for this test.
-  // needs: ['serializer:foo']
-});
-
-test('Basic creation', function(assert) {
-  let adapter = this.subject();
-
-  assert.ok(adapter);
-  assert.ok(adapter.urlForFindRecord);
-  assert.ok(adapter.ajax);
-  assert.ok(adapter.headers);
-  assert.ok(adapter.host);
-  assert.ok(adapter.namespace);
-  assert.equal(adapter.headers.Accept, "application/json");
-  assert.equal(adapter.namespace, "ws/v1/cluster");
-});
-
-test('urlForFindRecord test', function(assert) {
-  let adapter = this.subject();
-  let host = adapter.host;
-  assert.equal(adapter.urlForFindRecord("localhost:8042"),
-      host + "/ws/v1/cluster/nodes/localhost:8042");
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js
deleted file mode 100644
index d25f72d..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-apps-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:yarn-apps', {
-  // Specify the other units that are required for this test.
-  // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
-  var controller = this.subject();
-  assert.ok(controller);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js
deleted file mode 100644
index 313dfdd..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/controllers/yarn-queues-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('controller:yarn-queues', {
-  // Specify the other units that are required for this test.
-  // needs: ['controller:foo']
-});
-
-// Replace this with your real tests.
-test('it exists', function(assert) {
-  var controller = this.subject();
-  assert.ok(controller);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js
deleted file mode 100644
index b4f3503..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/mixins/charts-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Ember from 'ember';
-import ChartsMixin from '../../../mixins/charts';
-import { module, test } from 'qunit';
-
-module('Unit | Mixin | charts');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
-  var ChartsObject = Ember.Object.extend(ChartsMixin);
-  var subject = ChartsObject.create();
-  assert.ok(subject);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js
deleted file mode 100644
index e3261e2..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-app-test.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-app', 'Unit | Model | yarn app', {
-  // Specify the other units that are required for this test.
-  needs: []
-});
-
-test('it exists', function(assert) {
-  var model = this.subject();
-  // var store = this.store();
-  assert.ok(!!model);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js
deleted file mode 100644
index 45808a5..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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 { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-container-log', 'Unit | Model | ContainerLog', {
-  // Specify the other units that are required for this test.
-  needs: []
-});
-
-test('Basic creation test', function(assert) {
-  let model = this.subject();
-  assert.ok(model);
-  assert.ok(model._notifyProperties);
-  assert.ok(model.didLoad);
-  assert.ok(model.logs);
-  assert.ok(model.containerID);
-  assert.ok(model.logFileName);
-});
-
-test('test fields', function(assert) {
-  let model = this.subject();
-
-  Ember.run(function () {
-    model.set("logs", "This is syslog");
-    model.set("containerID", "container_e32_1456000363780_0002_01_000001");
-    model.set("logFileName", "syslog");
-    assert.equal(model.get("logs"), "This is syslog");
-    assert.equal(model.get("containerID"), "container_e32_1456000363780_0002_01_000001");
-    assert.equal(model.get("logFileName"), "syslog");
-  });
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js
deleted file mode 100644
index 7e2e62f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * 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 { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-node-app', 'Unit | Model | NodeApp', {
-  // Specify the other units that are required for this test.
-  needs: []
-});
-
-test('Basic creation test', function(assert) {
-  let model = this.subject();
-
-  assert.ok(model);
-  assert.ok(model._notifyProperties);
-  assert.ok(model.didLoad);
-  assert.ok(model.appId);
-  assert.ok(model.state);
-  assert.ok(model.user);
-  assert.ok(model.containers);
-});
-
-test('test fields', function(assert) {
-  let model = this.subject();
-
-  assert.expect(9);
-  Ember.run(function () {
-    model.set("appId", "application_1456251210105_0002");
-    model.set("id", "application_1456251210105_0002");
-    model.set("state", "RUNNING");
-    model.set("user", "hadoop");
-    model.set("containers", ["container_e38_1456251210105_0002_01_000001",
-        "container_e38_1456251210105_0002_01_000002"]);
-    assert.equal(model.get("appId"), "application_1456251210105_0002");
-    assert.equal(model.get("state"), "RUNNING");
-    assert.equal(model.get("user"), "hadoop");
-    assert.deepEqual(model.get("containers"),
-        ["container_e38_1456251210105_0002_01_000001",
-        "container_e38_1456251210105_0002_01_000002"]);
-    assert.equal(model.get("appStateStyle"), "label label-primary");
-    assert.equal(model.get("isDummyApp"), false);
-    model.set("id", "dummy");
-    assert.equal(model.get("isDummyApp"), true);
-    model.set("state", "FINISHED");
-    assert.equal(model.get("appStateStyle"), "label label-success");
-    model.set("state", "NEW");
-    assert.equal(model.get("appStateStyle"), "label label-default");
-  });
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js
deleted file mode 100644
index 88bf233..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * 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 { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-node-container', 'Unit | Model | NodeContainer', {
-  // Specify the other units that are required for this test.
-  needs: []
-});
-
-test('Basic creation test', function(assert) {
-  let model = this.subject();
-
-  assert.ok(model);
-  assert.ok(model._notifyProperties);
-  assert.ok(model.didLoad);
-  assert.ok(model.containerId);
-  assert.ok(model.state);
-  assert.ok(model.user);
-  assert.ok(model.exitCode);
-  assert.ok(model.totalMemoryNeeded);
-  assert.ok(model.totalVCoresNeeded);
-  assert.ok(model.containerLogFiles);
-  assert.ok(model.isDummyContainer);
-  assert.ok(model.containerStateStyle);
-});
-
-test('test fields', function(assert) {
-  let model = this.subject();
-
-  Ember.run(function () {
-    model.set("containerId", "container_e32_1456000363780_0002_01_000003");
-    model.set("state", "RUNNING");
-    model.set("exitCode", "-1000");
-    model.set("user", "hadoop");
-    model.set("id", "container_e32_1456000363780_0002_01_000003");
-    model.set("totalMemoryNeeded", 1024);
-    model.set("totalVCoresNeeded", 1);
-    model.set("containerLogFiles", ["syslog", "stderr", "stdout"]);
-    assert.equal(model.get("containerId"), "container_e32_1456000363780_0002_01_000003");
-    assert.equal(model.get("id"), "container_e32_1456000363780_0002_01_000003");
-    assert.equal(model.get("totalMemoryNeeded"), 1024);
-    assert.equal(model.get("totalVCoresNeeded"), 1);
-    assert.equal(model.get("user"), "hadoop");
-    assert.equal(model.get("exitCode"), "-1000");
-    assert.equal(model.get("containerLogFiles").length, 3);
-    assert.deepEqual(model.get("containerLogFiles"), ["syslog", "stderr", "stdout"]);
-    assert.equal(model.get("isDummyContainer"), false);
-    assert.equal(model.get("containerStateStyle"), "label label-primary");
-    model.set("id", "dummy");
-    assert.equal(model.get("isDummyContainer"), true);
-    model.set("state", "EXITED_WITH_SUCCESS");
-    assert.equal(model.get("containerStateStyle"), "label label-success");
-    model.set("state", "EXITED_WITH_FAILURE");
-    assert.equal(model.get("containerStateStyle"), "label label-danger");
-    model.set("state", "DONE");
-    model.set("exitCode", "0");
-    assert.equal(model.get("containerStateStyle"), "label label-success");
-    model.set("exitCode", "-105");
-    assert.equal(model.get("containerStateStyle"), "label label-danger");
-  });
-});
-


[11/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js
deleted file mode 100644
index 5877589..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 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 { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-node', 'Unit | Model | Node', {
-  // Specify the other units that are required for this test.
-  needs: []
-});
-
-test('Basic creation test', function(assert) {
-  let model = this.subject();
-
-  assert.ok(model);
-  assert.ok(model._notifyProperties);
-  assert.ok(model.didLoad);
-  assert.ok(model.totalVmemAllocatedContainersMB);
-  assert.ok(model.vmemCheckEnabled);
-  assert.ok(model.pmemCheckEnabled);
-  assert.ok(model.nodeHealthy);
-  assert.ok(model.lastNodeUpdateTime);
-  assert.ok(model.healthReport);
-  assert.ok(model.nmStartupTime);
-  assert.ok(model.nodeManagerBuildVersion);
-  assert.ok(model.hadoopBuildVersion);
-});
-
-test('test fields', function(assert) {
-  let model = this.subject();
-
-  assert.expect(4);
-  Ember.run(function () {
-    model.set("totalVmemAllocatedContainersMB", 4096);
-    model.set("totalPmemAllocatedContainersMB", 2048);
-    model.set("totalVCoresAllocatedContainers", 4);
-    model.set("hadoopBuildVersion", "3.0.0-SNAPSHOT");
-    assert.equal(model.get("totalVmemAllocatedContainersMB"), 4096);
-    assert.equal(model.get("totalPmemAllocatedContainersMB"), 2048);
-    assert.equal(model.get("totalVCoresAllocatedContainers"), 4);
-    assert.equal(model.get("hadoopBuildVersion"), "3.0.0-SNAPSHOT");
-  });
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js
deleted file mode 100644
index 4fd2517..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * 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 { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-rm-node', 'Unit | Model | RMNode', {
-  // Specify the other units that are required for this test.
-  needs: []
-});
-
-test('Basic creation test', function(assert) {
-  let model = this.subject();
-
-  assert.ok(model);
-  assert.ok(model._notifyProperties);
-  assert.ok(model.didLoad);
-  assert.ok(model.rack);
-  assert.ok(model.state);
-  assert.ok(model.nodeHostName);
-  assert.ok(model.nodeHTTPAddress);
-  assert.ok(model.lastHealthUpdate);
-  assert.ok(model.healthReport);
-  assert.ok(model.numContainers);
-  assert.ok(model.usedMemoryMB);
-  assert.ok(model.availMemoryMB);
-  assert.ok(model.usedVirtualCores);
-  assert.ok(model.availableVirtualCores);
-  assert.ok(model.version);
-  assert.ok(model.nodeLabels);
-  assert.ok(model.nodeLabelsAsString);
-  assert.ok(model.nodeStateStyle);
-  assert.ok(model.isDummyNode);
-  assert.ok(model.getMemoryDataForDonutChart);
-  assert.ok(model.getVCoreDataForDonutChart);
-});
-
-test('test fields', function(assert) {
-  let model = this.subject();
-
-  Ember.run(function () {
-    model.set("rack", "/default-rack");
-    model.set("state", "RUNNING");
-    model.set("nodeHostName", "localhost");
-    model.set("id", "localhost:64318");
-    model.set("nodeHTTPAddress", "localhost:8042");
-    model.set("usedMemoryMB", 1024);
-    model.set("availMemoryMB", 7168);
-    model.set("usedVirtualCores", 1);
-    model.set("availableVirtualCores", 7);
-    model.set("nodeLabels", ["x"]);
-    assert.equal(model.get("rack"), "/default-rack");
-    assert.equal(model.get("state"), "RUNNING");
-    assert.equal(model.get("nodeHostName"), "localhost");
-    assert.equal(model.get("id"), "localhost:64318");
-    assert.equal(model.get("nodeHTTPAddress"), "localhost:8042");
-    assert.equal(model.get("usedMemoryMB"), 1024);
-    assert.equal(model.get("availMemoryMB"), 7168);
-    assert.equal(model.get("usedVirtualCores"), 1);
-    assert.equal(model.get("availableVirtualCores"), 7);
-    assert.equal(model.get("isDummyNode"), false);
-    assert.deepEqual(model.get("nodeLabels"), ["x"]);
-    assert.equal(model.get("nodeLabelsAsString"), "x");
-    assert.deepEqual(model.get("nodeStateStyle"), "label label-success");
-    assert.deepEqual(model.get("getMemoryDataForDonutChart"),
-        [{label: "Used", value: 1024}, {label: "Available", value: 7168}]);
-    assert.deepEqual(model.get("getVCoreDataForDonutChart"),
-        [{label: "Used", value: 1}, {label: "Available", value: 7}]);
-    model.set("state", "SHUTDOWN");
-    assert.deepEqual(model.get("nodeStateStyle"), "label label-danger");
-    model.set("state", "REBOOTED");
-    assert.deepEqual(model.get("nodeStateStyle"), "label label-warning");
-    model.set("state", "NEW");
-    assert.deepEqual(model.get("nodeStateStyle"), "label label-default");
-    model.set("nodeLabels", ["x","y"]);
-    assert.equal(model.get("nodeLabelsAsString"), "x");
-    model.set("nodeLabels", undefined);
-    assert.equal(model.get("nodeLabelsAsString"), "");
-  });
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js
deleted file mode 100644
index a438b2e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-apps-test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:yarn-apps', 'Unit | Route | yarn apps', {
-  // Specify the other units that are required for this test.
-  // needs: ['controller:foo']
-});
-
-test('it exists', function(assert) {
-  var route = this.subject();
-  assert.ok(route);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js
deleted file mode 100644
index 4e68da0..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-import Constants from 'yarn-ui/constants';
-
-moduleFor('route:yarn-container-log', 'Unit | Route | ContainerLog', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting container log', function(assert) {
-  var response = {
-      logs: "This is syslog",
-      containerID: "container_e32_1456000363780_0002_01_000001",
-      logFileName: "syslog"};
-  var store = {
-    findRecord: function(type) {
-      return new Ember.RSVP.Promise(function(resolve) {
-        resolve(response);
-      }
-    )}
-  };
-  assert.expect(6);
-  var route = this.subject();
-  route.set('store', store);
-  var model = route.model({node_id: "localhost:64318",
-      node_addr: "localhost:8042",
-      container_id: "container_e32_1456000363780_0002_01_000001",
-      filename: "syslog"});
-   model.then(function(value) {
-     assert.ok(value);
-     assert.ok(value.containerLog);
-     assert.deepEqual(value.containerLog, response);
-     assert.ok(value.nodeInfo);
-     assert.equal(value.nodeInfo.addr, 'localhost:8042');
-     assert.equal(value.nodeInfo.id, 'localhost:64318');
-   });
-});
-
-/**
- * This can happen when an empty response is sent from server
- */
-test('Test non HTTP error while getting container log', function(assert) {
-  var error = {};
-  var response = {
-      logs: "",
-      containerID: "container_e32_1456000363780_0002_01_000001",
-      logFileName: "syslog"};
-  var store = {
-    findRecord: function(type) {
-      return new Ember.RSVP.Promise(function(resolve, reject) {
-        reject(error);
-      }
-    )}
-  };
-  assert.expect(6);
-  var route = this.subject();
-  route.set('store', store);
-  var model = route.model({node_id: "localhost:64318",
-      node_addr: "localhost:8042",
-      container_id: "container_e32_1456000363780_0002_01_000001",
-      filename: "syslog"});
-   model.then(function(value) {
-     assert.ok(value);
-     assert.ok(value.containerLog);
-     assert.deepEqual(value.containerLog, response);
-     assert.ok(value.nodeInfo);
-     assert.equal(value.nodeInfo.addr, 'localhost:8042');
-     assert.equal(value.nodeInfo.id, 'localhost:64318');
-   });
-});
-
-test('Test HTTP error while getting container log', function(assert) {
-  var error = {errors: [{status: 404, responseText: 'Not Found'}]};
-  var response = {
-      logs: "",
-      containerID: "container_e32_1456000363780_0002_01_000001",
-      logFileName: "syslog"};
-  var store = {
-    findRecord: function(type) {
-      return new Ember.RSVP.Promise(function(resolve, reject) {
-        reject(error);
-      }
-    )}
-  };
-  assert.expect(5);
-  var route = this.subject();
-  route.set('store', store);
-  var model = route.model({node_id: "localhost:64318",
-      node_addr: "localhost:8042",
-      container_id: "container_e32_1456000363780_0002_01_000001",
-      filename: "syslog"});
-   model.then(function(value) {
-     assert.ok(value);
-     assert.ok(value.errors);
-     assert.equal(value.errors.length, 1);
-     assert.equal(value.errors[0].status, 404);
-     assert.equal(value.errors[0].responseText, 'Not Found');
-   });
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js
deleted file mode 100644
index 8e5acf9..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:yarn-node-app', 'Unit | Route | NodeApp', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting specific app on a node', function(assert) {
-  var response =
-      {id:"application_1456251210105_0001", state:"FINISHED", user:"root"};
-  var store = {
-    queryRecord: function(type, query) {
-      return new Ember.RSVP.Promise(function(resolve) {
-        resolve(response);
-      });
-    }
-  };
-  assert.expect(6);
-  var route = this.subject();
-  route.set('store', store);
-  var model =
-      route.model({node_id:"localhost:64318", node_addr:"localhost:8042",
-          app_id:"application_1456251210105_0001"}).
-      then(
-        function(value){
-          assert.ok(value);
-          assert.ok(value.nodeApp);
-          assert.deepEqual(value.nodeApp, response);
-          assert.ok(value.nodeInfo);
-          assert.equal(value.nodeInfo.addr, 'localhost:8042');
-          assert.equal(value.nodeInfo.id, 'localhost:64318');
-        }
-      );
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js
deleted file mode 100644
index 44d9995..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:yarn-node-apps', 'Unit | Route | NodeApps', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting apps on a node', function(assert) {
-  var response = [
-      {id:"application_1456251210105_0001", state:"FINISHED", user:"root"},
-      {id:"application_1456251210105_0002", state:"RUNNING",user:"root",
-      containerids:["container_e38_1456251210105_0002_01_000001",
-      "container_e38_1456251210105_0002_01_000002"]}];
-  var store = {
-    query: function(type, query) {
-      return new Ember.RSVP.Promise(function(resolve) {
-        resolve(response.slice());
-      });
-    }
-  };
-  assert.expect(8);
-  var route = this.subject();
-  route.set('store', store);
-  var model =
-      route.model({node_id:"localhost:64318", node_addr:"localhost:8042"}).
-      then(
-        function(value){
-          assert.ok(value);
-          assert.ok(value.apps);
-          assert.equal(value.apps.length, 2);
-          assert.deepEqual(response[0], value.apps[0]);
-          assert.deepEqual(response[1], value.apps[1]);
-          assert.ok(value.nodeInfo);
-          assert.equal(value.nodeInfo.addr, 'localhost:8042');
-          assert.equal(value.nodeInfo.id, 'localhost:64318');
-        }
-      );
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js
deleted file mode 100644
index f0b68fc..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:yarn-node-container', 'Unit | Route | NodeContainer', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting specific container on a node', function(assert) {
-  var response =
-      {id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
-      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
-      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
-      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
-      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
-      "stdout"]};
-  var store = {
-    queryRecord: function(type, query) {
-      return new Ember.RSVP.Promise(function(resolve) {
-        resolve(response);
-      });
-    }
-  };
-  assert.expect(6);
-  var route = this.subject();
-  route.set('store', store);
-  var model =
-      route.model({node_id:"localhost:64318", node_addr:"localhost:8042",
-          container_id:"container_e32_1456000363780_0002_01_000001"}).
-      then(
-        function(value){
-          assert.ok(value);
-          assert.ok(value.nodeContainer);
-          assert.deepEqual(value.nodeContainer, response);
-          assert.ok(value.nodeInfo);
-          assert.equal(value.nodeInfo.addr, 'localhost:8042');
-          assert.equal(value.nodeInfo.id, 'localhost:64318');
-        }
-      );
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js
deleted file mode 100644
index 8359713..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('route:yarn-node-containers', 'Unit | Route | NodeContainers', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting apps on a node', function(assert) {
-  var response =
-      [{id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
-      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
-      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
-      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
-      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
-      "stdout"]},
-      {id:"container_e32_1456000363780_0002_01_000003", state:"RUNNING",
-      exitCode:-1000, diagnostics:"", user:"root", totalMemoryNeededMB:1024,
-      totalVCoresNeeded:1,containerLogsLink:"http://localhost:8042/node" +
-      "/containerlogs/container_e32_1456000363780_0002_01_000003/root",
-      nodeId:"localhost:64318",containerLogFiles:["syslog","stderr",
-      "syslog.shuffle","stdout"]}];
-  var store = {
-    query: function(type, query) {
-      return new Ember.RSVP.Promise(function(resolve) {
-        resolve(response.slice());
-      });
-    }
-  };
-  assert.expect(8);
-  var route = this.subject();
-  route.set('store', store);
-  var model =
-      route.model({node_id:"localhost:64318", node_addr:"localhost:8042"}).
-      then(
-        function(value){
-          assert.ok(value);
-          assert.ok(value.containers);
-          assert.equal(value.containers.length, 2);
-          assert.deepEqual(value.containers[0], response[0]);
-          assert.deepEqual(value.containers[1], response[1]);
-          assert.ok(value.nodeInfo);
-          assert.equal(value.nodeInfo.addr, 'localhost:8042');
-          assert.equal(value.nodeInfo.id, 'localhost:64318');
-        }
-      );
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js
deleted file mode 100644
index 4e82f1b..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-import Ember from 'ember';
-
-moduleFor('route:yarn-node', 'Unit | Route | Node', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting a node', function(assert) {
-  var nodeResponse =
-      {healthReport: "Healthy", totalVmemAllocatedContainersMB: 344064,
-      totalPmemAllocatedContainersMB: 163840,
-      totalVCoresAllocatedContainers: 160,
-      vmemCheckEnabled: true, pmemCheckEnabled: true,
-      lastNodeUpdateTime: 1456250210310, nodeHealthy: true,
-      nodeManagerVersion: "3.0.0-SNAPSHOT",
-      nodeManagerBuildVersion: "3.0.0-SNAPSHOT",
-      nodeManagerVersionBuiltOn: "2000-01-01T00:00Z",
-      hadoopVersion: "3.0.0-SNAPSHOT",
-      hadoopBuildVersion: "3.0.0-SNAPSHOT",
-      hadoopVersionBuiltOn: "2000-01-01T00:00Z",
-      id: "localhost:64318", nodeHostName: "192.168.0.102",
-      nmStartupTime: 1456250208231};
-  var rmNodeResponse =
-      {rack: "/default-rack", state: "RUNNING", id: "localhost:64318",
-      nodeHostName: "localhost", nodeHTTPAddress: "localhost:8042",
-      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
-      healthReport: "", numContainers: 0, usedMemoryMB: 0,
-      availMemoryMB: 163840, usedVirtualCores: 0,
-      availableVirtualCores: 160,
-      resourceUtilization: {
-      nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
-      nodeCPUUsage: 0.14995001256465912,
-      aggregatedContainersPhysicalMemoryMB: 0,
-      aggregatedContainersVirtualMemoryMB: 0,
-      containersCPUUsage: 0
-      }};
-
-  // Create store which returns appropriate responses.
-  var store = {
-    findRecord: function(type) {
-      if (type == 'yarnNode') {
-        return new Ember.RSVP.Promise(function(resolve) {
-          resolve(nodeResponse);
-        });
-      } else if (type == 'yarnRmNode') {
-        return new Ember.RSVP.Promise(function(resolve) {
-          resolve(rmNodeResponse);
-        });
-      }
-    }
-  };
-  var route = this.subject();
-  assert.expect(4);
-  route.set('store', store);
-  var model = route.model(
-      {node_addr:"localhost:8042", node_id:"localhost:64318"})._result;
-  assert.ok(model.node);
-  assert.deepEqual(model.node, nodeResponse);
-  assert.ok(model.rmNode);
-  assert.deepEqual(model.rmNode, rmNodeResponse);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js
deleted file mode 100644
index baa5bd6..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-import Ember from 'ember';
-
-moduleFor('route:yarn-nodes', 'Unit | Route | Nodes', {
-});
-
-test('Basic creation test', function(assert) {
-  let route = this.subject();
-  assert.ok(route);
-  assert.ok(route.model);
-});
-
-test('Test getting nodes', function(assert) {
-  var response = [{
-      rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
-      nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
-      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
-      healthReport: "", numContainers: 0, usedMemoryMB: 0,
-      availMemoryMB: 163840, usedVirtualCores: 0,
-      availableVirtualCores: 160,
-      resourceUtilization: {
-        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
-        nodeCPUUsage: 0.14995001256465912,
-        aggregatedContainersPhysicalMemoryMB: 0,
-        aggregatedContainersVirtualMemoryMB: 0,
-        containersCPUUsage: 0
-      }},
-      {rack: "/default-rack", state: "RUNNING", id: "192.168.1.2:64318",
-      nodeHostName: "192.168.1.2", nodeHTTPAddress: "192.168.1.2:8042",
-      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
-      healthReport: "", numContainers: 0, usedMemoryMB: 0,
-      availMemoryMB: 163840, usedVirtualCores: 0,
-      availableVirtualCores: 160,
-      resourceUtilization: {
-        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
-        nodeCPUUsage: 0.14995001256465912,
-        aggregatedContainersPhysicalMemoryMB: 0,
-        aggregatedContainersVirtualMemoryMB: 0,
-        containersCPUUsage: 0
-      }}];
-  var store = {
-    findAll: function(type) {
-      return new Ember.RSVP.Promise(function(resolve) {
-        resolve(response);
-      });
-    }
-  };
-  var route = this.subject();
-  route.set('store', store);
-  var model = route.model()._result;
-  assert.expect(4);
-  assert.ok(model);
-  assert.equal(model.length, 2);
-  assert.deepEqual(response[0], model[0]);
-  assert.deepEqual(response[1], model[1]);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js
deleted file mode 100644
index a169fd5..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-app-test.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import { moduleForModel, test } from 'ember-qunit';
-
-moduleForModel('yarn-app', 'Unit | Serializer | yarn app', {
-  // Specify the other units that are required for this test.
-  needs: ['serializer:yarn-app']
-});
-
-// Replace this with your real tests.
-test('it serializes records', function(assert) {
-  var record = this.subject();
-
-  var serializedRecord = record.serialize();
-
-  assert.ok(serializedRecord);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js
deleted file mode 100644
index 2349dc2..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('serializer:yarn-container-log', 'Unit | Serializer | ContainerLog', {
-});
-
-test('Basic creation test', function(assert) {
-  let serializer = this.subject();
-
-  assert.ok(serializer);
-  assert.ok(serializer.normalizeSingleResponse);
-});
-
-test('normalizeSingleResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-container-log"
-  },
-  payload = "This is syslog";
-  var id = "localhost:64318!container_e32_1456000363780_0002_01_000001!syslog";
-  assert.expect(6);
-  var response =
-      serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
-  assert.ok(response.data);
-  assert.equal(response.data.id, id);
-  assert.equal(response.data.type, modelClass.modelName);
-  assert.equal(response.data.attributes.logs, payload);
-  assert.equal(response.data.attributes.containerID,
-      "container_e32_1456000363780_0002_01_000001");
-  assert.equal(response.data.attributes.logFileName, "syslog");
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js
deleted file mode 100644
index 21a715c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('serializer:yarn-node-app', 'Unit | Serializer | NodeApp', {
-});
-
-test('Basic creation test', function(assert) {
-  let serializer = this.subject();
-
-  assert.ok(serializer);
-  assert.ok(serializer.normalizeSingleResponse);
-  assert.ok(serializer.normalizeArrayResponse);
-  assert.ok(serializer.internalNormalizeSingleResponse);
-});
-
-test('normalizeArrayResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node-app"
-  },
-  payload = {
-    apps: {
-      app: [{
-        id:"application_1456251210105_0001", state:"FINISHED", user:"root"
-      },{
-        id:"application_1456251210105_0002", state:"RUNNING",user:"root",
-        containerids:["container_e38_1456251210105_0002_01_000001",
-        "container_e38_1456251210105_0002_01_000002"]
-      }]
-    }
-  };
-  assert.expect(15);
-  var response =
-      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(response.data.length, 2);
-  assert.equal(response.data[0].attributes.containers, undefined);
-  assert.equal(response.data[1].attributes.containers.length, 2);
-  assert.deepEqual(response.data[1].attributes.containers,
-      payload.apps.app[1].containerids);
-  for (var i = 0; i < 2; i++) {
-    assert.equal(response.data[i].type, modelClass.modelName);
-    assert.equal(response.data[i].id, payload.apps.app[i].id);
-    assert.equal(response.data[i].attributes.appId, payload.apps.app[i].id);
-    assert.equal(response.data[i].attributes.state, payload.apps.app[i].state);
-    assert.equal(response.data[i].attributes.user, payload.apps.app[i].user);
-  }
-});
-
-test('normalizeArrayResponse no apps test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node-app"
-  },
-  payload = { apps: null };
-  assert.expect(5);
-  var response =
-      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(response.data.length, 1);
-  assert.equal(response.data[0].type, modelClass.modelName);
-  assert.equal(response.data[0].id, "dummy");
-  assert.equal(response.data[0].attributes.appId, undefined);
-});
-
-test('normalizeSingleResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node-app"
-  },
-  payload = {
-    app: {id:"application_1456251210105_0001", state:"FINISHED", user:"root"}
-  };
-  assert.expect(7);
-  var response =
-      serializer.normalizeSingleResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(payload.app.id, response.data.id);
-  assert.equal(modelClass.modelName, response.data.type);
-  assert.equal(payload.app.id, response.data.attributes.appId);
-  assert.equal(payload.app.state, response.data.attributes.state);
-  assert.equal(payload.app.user, response.data.attributes.user);
-  assert.equal(response.data.attributes.containers, undefined);
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js
deleted file mode 100644
index 1f08467..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('serializer:yarn-node-container', 'Unit | Serializer | NodeContainer', {
-});
-
-test('Basic creation test', function(assert) {
-  let serializer = this.subject();
-
-  assert.ok(serializer);
-  assert.ok(serializer.normalizeSingleResponse);
-  assert.ok(serializer.normalizeArrayResponse);
-  assert.ok(serializer.internalNormalizeSingleResponse);
-});
-
-test('normalizeArrayResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node-container"
-  },
-  payload = {
-    containers: {
-      container: [{
-        id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
-        exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
-        totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
-        "containerlogs/container_e32_1456000363780_0002_01_000001/root",
-        nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
-        "stdout"]
-      },{
-        id:"container_e32_1456000363780_0002_01_000003", state:"RUNNING",
-        exitCode:-1000, diagnostics:"", user:"root", totalMemoryNeededMB:1024,
-        totalVCoresNeeded:1,containerLogsLink:"http://localhost:8042/node" +
-        "/containerlogs/container_e32_1456000363780_0002_01_000003/root",
-        nodeId:"localhost:64318",containerLogFiles:["syslog","stderr",
-        "syslog.shuffle","stdout"]
-      }]
-    }
-  };
-  assert.expect(14);
-  var response =
-      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(response.data.length, 2);
-  assert.equal(response.data[0].id,
-      "container_e32_1456000363780_0002_01_000001");
-  assert.equal(response.data[1].id,
-      "container_e32_1456000363780_0002_01_000003");
-  assert.equal(response.data[0].attributes.containerLogFiles.length, 3);
-  assert.equal(response.data[1].attributes.containerLogFiles.length, 4);
-  for (var i = 0; i < 2; i++) {
-    assert.equal(response.data[i].type, modelClass.modelName);
-    assert.deepEqual(response.data[i].attributes.containerLogFiles,
-        payload.containers.container[i].containerLogFiles);
-    assert.equal(response.data[i].attributes.state,
-        payload.containers.container[i].state);
-    assert.equal(response.data[i].attributes.user,
-        payload.containers.container[i].user);
-  }
-});
-
-test('normalizeArrayResponse no containers test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node-container"
-  },
-  payload = { containers: null };
-  assert.expect(5);
-  var response =
-      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(response.data.length, 1);
-  assert.equal(response.data[0].type, modelClass.modelName);
-  assert.equal(response.data[0].id, "dummy");
-  assert.equal(response.data[0].attributes.containerId, undefined);
-});
-
-test('normalizeSingleResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node-container"
-  },
-  payload = {
-    container: {
-      id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
-      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
-      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
-      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
-      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
-      "stdout"]
-    }
-  };
-  assert.expect(11);
-  var response =
-      serializer.normalizeSingleResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(response.data.id, payload.container.id);
-  assert.equal(response.data.type, modelClass.modelName);
-  assert.equal(response.data.attributes.containerId, payload.container.id);
-  assert.equal(response.data.attributes.state, payload.container.state);
-  assert.equal(response.data.attributes.user, payload.container.user);
-  assert.equal(response.data.attributes.exitCode, payload.container.exitCode);
-  assert.equal(response.data.attributes.totalMemoryNeededMB,
-      payload.container.totalMemoryNeeded);
-  assert.equal(response.data.attributes.totalVCoresNeeded,
-      payload.container.totalVCoresNeeded);
-  assert.equal(response.data.attributes.containerLogFiles.length, 3);
-  assert.deepEqual(response.data.attributes.containerLogFiles,
-      payload.container.containerLogFiles);
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js
deleted file mode 100644
index 0e76ccb..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-import Converter from 'yarn-ui/utils/converter';
-
-moduleFor('serializer:yarn-node', 'Unit | Serializer | Node', {
-});
-
-test('Basic creation test', function(assert) {
-  let serializer = this.subject();
-
-  assert.ok(serializer);
-  assert.ok(serializer.normalizeSingleResponse);
-  assert.ok(serializer.internalNormalizeSingleResponse);
-});
-
-test('normalizeSingleResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-node"
-  },
-  payload = {
-    nodeInfo: {
-      healthReport: "Healthy", totalVmemAllocatedContainersMB: 344064,
-      totalPmemAllocatedContainersMB: 163840,
-      totalVCoresAllocatedContainers: 160,
-      vmemCheckEnabled: true, pmemCheckEnabled: true,
-      lastNodeUpdateTime: 1456250210310, nodeHealthy: true,
-      nodeManagerVersion: "3.0.0-SNAPSHOT",
-      nodeManagerBuildVersion: "3.0.0-SNAPSHOT",
-      nodeManagerVersionBuiltOn: "2000-01-01T00:00Z",
-      hadoopVersion: "3.0.0-SNAPSHOT",
-      hadoopBuildVersion: "3.0.0-SNAPSHOT",
-      hadoopVersionBuiltOn: "2000-01-01T00:00Z",
-      id: "localhost:64318", nodeHostName: "192.168.0.102",
-      nmStartupTime: 1456250208231
-    }
-  };
-  assert.expect(6);
-  var id = "localhost:64318";
-  var response = serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
-  assert.equal(response.data.id, id);
-  assert.equal(response.data.type, modelClass.modelName);
-  assert.equal(response.data.attributes.totalVmemAllocatedContainersMB,
-      payload.nodeInfo.totalVmemAllocatedContainersMB);
-  assert.equal(response.data.attributes.totalPmemAllocatedContainersMB,
-      payload.nodeInfo.totalPmemAllocatedContainersMB);
-  assert.equal(response.data.attributes.totalVCoresAllocatedContainers,
-      payload.nodeInfo.totalVCoresAllocatedContainers);
-  assert.equal(response.data.attributes.nmStartupTime,
-      Converter.timeStampToDate(payload.nodeInfo.nmStartupTime));
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js
deleted file mode 100644
index bc6397d..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * 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 { moduleFor, test } from 'ember-qunit';
-
-moduleFor('serializer:yarn-rm-node', 'Unit | Serializer | RMNode', {
-});
-
-test('Basic creation test', function(assert) {
-  let serializer = this.subject();
-
-  assert.ok(serializer);
-  assert.ok(serializer.normalizeSingleResponse);
-  assert.ok(serializer.normalizeArrayResponse);
-  assert.ok(serializer.internalNormalizeSingleResponse);
-});
-
-test('normalizeArrayResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-rm-node"
-  },
-  payload = {
-    nodes: {
-      node: [{
-        rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
-        nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
-        lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
-        healthReport: "", numContainers: 0, usedMemoryMB: 2048,
-        availMemoryMB: 161792, usedVirtualCores: 2,
-        availableVirtualCores: 158, nodeLabels: ["x"],
-        resourceUtilization: {
-          nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
-          nodeCPUUsage: 0.14995001256465912,
-          aggregatedContainersPhysicalMemoryMB: 0,
-          aggregatedContainersVirtualMemoryMB: 0,
-          containersCPUUsage: 0
-        }
-      },{
-        rack: "/default-rack", state: "RUNNING", id: "192.168.1.2:64318",
-        nodeHostName: "192.168.1.2", nodeHTTPAddress: "192.168.1.2:8042",
-        lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
-        healthReport: "", numContainers: 0, usedMemoryMB: 0,
-        availMemoryMB: 163840, usedVirtualCores: 0,
-        availableVirtualCores: 160, nodeLabels: ["y"],
-        resourceUtilization: {
-          nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
-          nodeCPUUsage: 0.14995001256465912,
-          aggregatedContainersPhysicalMemoryMB: 0,
-          aggregatedContainersVirtualMemoryMB: 0,
-          containersCPUUsage: 0
-        }
-      }]
-    }
-  };
-  assert.expect(12);
-  var response =
-      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
-  assert.ok(response.data);
-  assert.equal(response.data.length, 2);
-  assert.equal(response.data[0].id, "192.168.1.1:64318");
-  assert.equal(response.data[1].id, "192.168.1.2:64318");
-  for (var i = 0; i < 2; i++) {
-    assert.equal(response.data[i].type, modelClass.modelName);
-    assert.equal(response.data[i].attributes.nodeHostName,
-        payload.nodes.node[i].nodeHostName);
-    assert.equal(response.data[i].attributes.nodeHTTPAddress,
-        payload.nodes.node[i].nodeHTTPAddress);
-    assert.deepEqual(response.data[i].attributes.nodeLabels,
-        payload.nodes.node[i].nodeLabels);
-  }
-});
-
-test('normalizeArrayResponse no nodes test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-rm-node"
-  },
-  payload = { nodes: null };
-  assert.expect(5);
-  var response =
-      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
-  console.log(response);
-  assert.ok(response.data);
-  assert.equal(response.data.length, 1);
-  assert.equal(response.data[0].type, modelClass.modelName);
-  assert.equal(response.data[0].id, "dummy");
-  assert.equal(response.data[0].attributes.nodeHostName, undefined);
-});
-
-test('normalizeSingleResponse test', function(assert) {
-  let serializer = this.subject(),
-  modelClass = {
-    modelName: "yarn-rm-node"
-  },
-  payload = {
-    node: {
-      rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
-      nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
-      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
-      healthReport: "", numContainers: 0, usedMemoryMB: 2048,
-      availMemoryMB: 161792, usedVirtualCores: 2,
-      availableVirtualCores: 158, nodeLabels: ["x"],
-      resourceUtilization: {
-        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
-        nodeCPUUsage: 0.14995001256465912,
-        aggregatedContainersPhysicalMemoryMB: 0,
-        aggregatedContainersVirtualMemoryMB: 0,
-        containersCPUUsage: 0
-      }
-    }
-  };
-  assert.expect(13);
-  var id = "localhost:64318";
-  var response =
-      serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
-  assert.ok(response.data);
-  assert.equal(response.data.id, id);
-  assert.equal(response.data.type, modelClass.modelName);
-  assert.equal(response.data.attributes.rack, payload.node.rack);
-  assert.equal(response.data.attributes.state, payload.node.state);
-  assert.equal(response.data.attributes.nodeHostName,
-      payload.node.nodeHostName);
-  assert.equal(response.data.attributes.nodeHTTPAddress,
-      payload.node.nodeHTTPAddress);
-  assert.equal(response.data.attributes.version, payload.node.version);
-  assert.equal(response.data.attributes.availMemoryMB,
-      payload.node.availMemoryMB);
-  assert.equal(response.data.attributes.usedMemoryMB,
-      payload.node.usedMemoryMB);
-  assert.equal(response.data.attributes.availableVirtualCores,
-      payload.node.availableVirtualCores);
-  assert.equal(response.data.attributes.usedVirtualCores,
-      payload.node.usedVirtualCores);
-  assert.deepEqual(response.data.attributes.nodeLabels,
-      payload.node.nodeLabels);
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
deleted file mode 100644
index 481537d..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * 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 converter from '../../../utils/converter';
-import { module, test } from 'qunit';
-
-module('Unit | Utility | Converter');
-
-// Replace this with your real tests.
-test('it works', function(assert) {
-  assert.ok(converter);
-  assert.ok(converter.splitForContainerLogs);
-});
-
-test('split for container logs', function(assert) {
-  var id = "localhost:64318!container_e32_1456000363780_0002_01_000001!" +
-      "syslog";
-  var arr = converter.splitForContainerLogs(id);
-  assert.ok(arr);
-  assert.deepEqual(arr, ["localhost:64318",
-      "container_e32_1456000363780_0002_01_000001", "syslog"]);
-  id = "localhost:64318!container_e32_1456000363780_0002_01_000001!" +
-      "syslog!logs";
-  arr = converter.splitForContainerLogs(id);
-  assert.ok(arr);
-  assert.deepEqual(arr, ["localhost:64318",
-      "container_e32_1456000363780_0002_01_000001", "syslog!logs"]);
-  id = "localhost:64318!container_e32_1456000363780_0002_01_000001";
-  arr = converter.splitForContainerLogs(id);
-  assert.notOk(arr);
-  id = null;
-  arr = converter.splitForContainerLogs(id);
-  assert.notOk(arr);
-  id = undefined;
-  arr = converter.splitForContainerLogs(id);
-  assert.notOk(arr);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js
deleted file mode 100644
index 8f17380..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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 Sorter from 'yarn-ui/utils/sorter';
-import { module, test } from 'qunit';
-
-module('Unit | Utility | Sorter');
-
-test('Basic creation test', function(assert) {
-  assert.ok(Sorter);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/pom.xml b/hadoop-yarn-project/hadoop-yarn/pom.xml
index a32f18b..1474f2f 100644
--- a/hadoop-yarn-project/hadoop-yarn/pom.xml
+++ b/hadoop-yarn-project/hadoop-yarn/pom.xml
@@ -94,6 +94,7 @@
   </profiles>
 
   <modules>
+    <module>hadoop-yarn-ui</module>
     <module>hadoop-yarn-api</module>
     <module>hadoop-yarn-common</module>
     <module>hadoop-yarn-server</module>


[05/20] hadoop git commit: HADOOP-12753 S3A JUnit tests failing if using HTTP proxy. (Zoran Rajic via stevel)

Posted by wa...@apache.org.
HADOOP-12753 S3A JUnit tests failing if using HTTP proxy. (Zoran Rajic via stevel)


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

Branch: refs/heads/YARN-3368
Commit: ce5b4812f0f43ba9271343f405749d18794d672c
Parents: 6791221
Author: Steve Loughran <st...@apache.org>
Authored: Fri Apr 8 17:09:47 2016 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Apr 8 17:10:00 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java | 2 ++
 .../apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java  | 9 +++++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce5b4812/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java
index e74ebca..ae1539d 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AConfiguration.java
@@ -123,6 +123,7 @@ public class TestS3AConfiguration {
   @Test
   public void testProxyPortWithoutHost() throws Exception {
     conf = new Configuration();
+    conf.unset(Constants.PROXY_HOST);
     conf.setInt(Constants.MAX_ERROR_RETRIES, 2);
     conf.setInt(Constants.PROXY_PORT, 1);
     try {
@@ -140,6 +141,7 @@ public class TestS3AConfiguration {
   @Test
   public void testAutomaticProxyPortSelection() throws Exception {
     conf = new Configuration();
+    conf.unset(Constants.PROXY_PORT);
     conf.setInt(Constants.MAX_ERROR_RETRIES, 2);
     conf.set(Constants.PROXY_HOST, "127.0.0.1");
     conf.set(Constants.SECURE_CONNECTIONS, "true");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ce5b4812/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java
index d521ba8..2930e96 100644
--- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java
+++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/TestS3ADeleteManyFiles.java
@@ -44,6 +44,15 @@ public class TestS3ADeleteManyFiles extends S3AScaleTestBase {
   @Rule
   public Timeout testTimeout = new Timeout(30 * 60 * 1000);
 
+  /**
+   * CAUTION: If this test starts failing, please make sure that the
+   * {@link org.apache.hadoop.fs.s3a.Constants#MAX_THREADS} configuration is not
+   * set too low. Alternatively, consider reducing the
+   * <code>scale.test.operation.count</code> parameter in
+   * <code>getOperationCount()</code>.
+   *
+   * @see #getOperationCount()
+   */
   @Test
   public void testBulkRenameAndDelete() throws Throwable {
     final Path scaleTestDir = getTestPath();


[10/20] hadoop git commit: YARN-4517. Add nodes page and fix bunch of license issues. (Varun Saxena via wangda)

Posted by wa...@apache.org.
YARN-4517. Add nodes page and fix bunch of license issues. (Varun Saxena via wangda)


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

Branch: refs/heads/YARN-3368
Commit: b61c2efe1e3bb27ddb705f34c681475a81d5021c
Parents: 48e18bb
Author: Wangda Tan <wa...@apache.org>
Authored: Mon Mar 21 13:13:02 2016 -0700
Committer: Wangda Tan <wa...@apache.org>
Committed: Fri Apr 8 10:48:55 2016 -0700

----------------------------------------------------------------------
 .../hadoop-yarn-ui/app/adapters/cluster-info.js |   5 +-
 .../app/adapters/cluster-metric.js              |   5 +-
 .../app/adapters/yarn-app-attempt.js            |   3 +-
 .../hadoop-yarn-ui/app/adapters/yarn-app.js     |   3 +-
 .../app/adapters/yarn-container-log.js          |  74 +++++++++
 .../app/adapters/yarn-container.js              |   5 +-
 .../app/adapters/yarn-node-app.js               |  63 ++++++++
 .../app/adapters/yarn-node-container.js         |  64 ++++++++
 .../hadoop-yarn-ui/app/adapters/yarn-node.js    |  40 +++++
 .../hadoop-yarn-ui/app/adapters/yarn-queue.js   |   3 +-
 .../hadoop-yarn-ui/app/adapters/yarn-rm-node.js |  45 ++++++
 .../app/components/simple-table.js              |  38 ++++-
 .../hadoop-yarn/hadoop-yarn-ui/app/config.js    |  27 ++++
 .../hadoop-yarn/hadoop-yarn-ui/app/constants.js |  24 +++
 .../app/controllers/application.js              |  55 +++++++
 .../hadoop-yarn-ui/app/helpers/divide.js        |  31 ++++
 .../app/helpers/log-files-comma.js              |  48 ++++++
 .../hadoop-yarn-ui/app/helpers/node-link.js     |  37 +++++
 .../hadoop-yarn-ui/app/helpers/node-menu.js     |  66 ++++++++
 .../hadoop-yarn-ui/app/models/yarn-app.js       |  14 +-
 .../app/models/yarn-container-log.js            |  25 +++
 .../hadoop-yarn-ui/app/models/yarn-node-app.js  |  44 ++++++
 .../app/models/yarn-node-container.js           |  57 +++++++
 .../hadoop-yarn-ui/app/models/yarn-node.js      |  33 ++++
 .../hadoop-yarn-ui/app/models/yarn-rm-node.js   |  92 +++++++++++
 .../hadoop-yarn/hadoop-yarn-ui/app/router.js    |  13 ++
 .../hadoop-yarn-ui/app/routes/application.js    |  38 +++++
 .../hadoop-yarn-ui/app/routes/index.js          |  29 ++++
 .../hadoop-yarn-ui/app/routes/yarn-apps.js      |   4 +-
 .../app/routes/yarn-container-log.js            |  55 +++++++
 .../hadoop-yarn-ui/app/routes/yarn-node-app.js  |  29 ++++
 .../hadoop-yarn-ui/app/routes/yarn-node-apps.js |  29 ++++
 .../app/routes/yarn-node-container.js           |  30 ++++
 .../app/routes/yarn-node-containers.js          |  28 ++++
 .../hadoop-yarn-ui/app/routes/yarn-node.js      |  29 ++++
 .../hadoop-yarn-ui/app/routes/yarn-nodes.js     |  25 +++
 .../app/serializers/yarn-container-log.js       |  39 +++++
 .../app/serializers/yarn-node-app.js            |  86 +++++++++++
 .../app/serializers/yarn-node-container.js      |  74 +++++++++
 .../hadoop-yarn-ui/app/serializers/yarn-node.js |  56 +++++++
 .../app/serializers/yarn-rm-node.js             |  77 ++++++++++
 .../app/templates/application.hbs               |   4 +-
 .../hadoop-yarn-ui/app/templates/error.hbs      |  19 +++
 .../hadoop-yarn-ui/app/templates/notfound.hbs   |  20 +++
 .../hadoop-yarn-ui/app/templates/yarn-apps.hbs  |   4 +-
 .../app/templates/yarn-container-log.hbs        |  36 +++++
 .../app/templates/yarn-node-app.hbs             |  60 ++++++++
 .../app/templates/yarn-node-apps.hbs            |  51 +++++++
 .../app/templates/yarn-node-container.hbs       |  70 +++++++++
 .../app/templates/yarn-node-containers.hbs      |  58 +++++++
 .../hadoop-yarn-ui/app/templates/yarn-node.hbs  |  94 ++++++++++++
 .../hadoop-yarn-ui/app/templates/yarn-nodes.hbs |  65 ++++++++
 .../hadoop-yarn-ui/app/utils/converter.js       |  21 ++-
 .../hadoop-yarn-ui/app/utils/sorter.js          |  42 ++++-
 .../hadoop-yarn/hadoop-yarn-ui/bower.json       |   2 +-
 .../hadoop-yarn-ui/config/environment.js        |   1 -
 .../unit/adapters/yarn-container-log-test.js    |  73 +++++++++
 .../tests/unit/adapters/yarn-node-app-test.js   |  93 +++++++++++
 .../unit/adapters/yarn-node-container-test.js   |  93 +++++++++++
 .../tests/unit/adapters/yarn-node-test.js       |  42 +++++
 .../tests/unit/adapters/yarn-rm-node-test.js    |  44 ++++++
 .../unit/models/yarn-container-log-test.js      |  48 ++++++
 .../tests/unit/models/yarn-node-app-test.js     |  65 ++++++++
 .../unit/models/yarn-node-container-test.js     |  78 ++++++++++
 .../tests/unit/models/yarn-node-test.js         |  58 +++++++
 .../tests/unit/models/yarn-rm-node-test.js      |  95 ++++++++++++
 .../unit/routes/yarn-container-log-test.js      | 120 +++++++++++++++
 .../tests/unit/routes/yarn-node-app-test.js     |  56 +++++++
 .../tests/unit/routes/yarn-node-apps-test.js    |  60 ++++++++
 .../unit/routes/yarn-node-container-test.js     |  61 ++++++++
 .../unit/routes/yarn-node-containers-test.js    |  68 +++++++++
 .../tests/unit/routes/yarn-node-test.js         |  84 ++++++++++
 .../tests/unit/routes/yarn-nodes-test.js        |  74 +++++++++
 .../unit/serializers/yarn-container-log-test.js |  49 ++++++
 .../unit/serializers/yarn-node-app-test.js      | 102 +++++++++++++
 .../serializers/yarn-node-container-test.js     | 128 ++++++++++++++++
 .../tests/unit/serializers/yarn-node-test.js    |  69 +++++++++
 .../tests/unit/serializers/yarn-rm-node-test.js | 153 +++++++++++++++++++
 .../tests/unit/utils/converter-test.js          |  48 +++++-
 .../tests/unit/utils/sorter-test.js             |  26 ++++
 80 files changed, 3840 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
index ef65792..5a0d2d3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
@@ -1,10 +1,11 @@
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/localhost:8088', // configurable
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
   namespace: 'ws/v1/cluster', // common const
   pathForType(modelName) {
     return ''; // move to some common place, return path by modelname.
@@ -16,4 +17,4 @@ export default DS.JSONAPIAdapter.extend({
     hash.targetServer = "RM";
     return this._super(url, method, hash); 
   }
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
index d0f084c..d392c9b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
@@ -1,10 +1,11 @@
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/localhost:8088', // configurable
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
   namespace: 'ws/v1/cluster/metrics', // common const
   pathForType(modelName) {
     return ''; // move to some common place, return path by modelname.
@@ -16,4 +17,4 @@ export default DS.JSONAPIAdapter.extend({
     hash.targetServer = "RM";
     return this._super(url, method, hash); 
   }
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
index 3c95d64..4e40744 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
@@ -1,11 +1,12 @@
 import DS from 'ember-data';
 import Converter from 'yarn-ui/utils/converter';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/localhost:8088', // configurable
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
   namespace: 'ws/v1/cluster', // common const
 
   urlForQuery(query, modelName) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
index e1108be..faff3e7 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
@@ -1,10 +1,11 @@
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/localhost:8088', // configurable
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
   namespace: 'ws/v1/cluster', // common const
   pathForType(modelName) {
     return 'apps'; // move to some common place, return path by modelname.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js
new file mode 100644
index 0000000..7838c98
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.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';
+import Converter from 'yarn-ui/utils/converter';
+
+/**
+ * REST URL's response when fetching container logs will be
+ * in plain text format and not JSON.
+ */
+export default DS.RESTAdapter.extend({
+  headers: {
+    Accept: 'text/plain'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForFindRecord(id, modelName, snapshot) {
+    var splits = Converter.splitForContainerLogs(id);
+    var nodeHttpAddr = splits[0];
+    var containerId = splits[1];
+    var filename = splits[2];
+    this.host = this.host + nodeHttpAddr;
+    var url = this._buildURL();
+    url = url + "/containerlogs/" + containerId + "/" + filename;
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  },
+
+  /**
+   * Override options so that result is not expected to be JSON
+   */
+  ajaxOptions: function (url, type, options) {
+    var hash = options || {};
+    hash.url = url;
+    hash.type = type;
+    // Make sure jQuery does not try to convert response to JSON.
+    hash.dataType = 'text';
+    hash.context = this;
+
+    var headers = Ember.get(this, 'headers');
+    if (headers != undefined) {
+      hash.beforeSend = function (xhr) {
+        Object.keys(headers).forEach(function (key) {
+          return xhr.setRequestHeader(key, headers[key]);
+        });
+      };
+    }
+    return hash;
+  },
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
index fe09f59..d941c38 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
@@ -1,12 +1,13 @@
 import DS from 'ember-data';
 import Converter from 'yarn-ui/utils/converter';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  rmHost: 'http://localhost:1337/localhost:8088',
-  tsHost: 'http://localhost:1337/localhost:8188',
+  rmHost: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
+  tsHost: 'http://localhost:1337/' + Config.TS_HOST + ':' + Config.TS_PORT,
   host: function() {
     return undefined
   }.property(),

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js
new file mode 100644
index 0000000..0c60d1f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js
@@ -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.
+ */
+
+import DS from 'ember-data';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForQuery(query) {
+    this.host = this.host + query.nodeAddr;
+    var url = this._buildURL();
+    url = url + "/apps";
+    return url;
+  },
+
+  urlForQueryRecord: function (query) {
+    this.host = this.host + query.nodeAddr;
+    var url = this._buildURL();
+    url = url + "/apps/" + query.appId;
+    return url;
+  },
+
+  query: function (store, type, query) {
+    var url = this.urlForQuery(query);
+    // Query params not required.
+    query = null;
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  queryRecord: function (store, type, query) {
+    var url = this.urlForQueryRecord(query);
+    // Query params not required.
+    query = null;
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js
new file mode 100644
index 0000000..e8bf7b7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js
@@ -0,0 +1,64 @@
+/**
+ * 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.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForQuery(query) {
+    this.host = this.host + query.nodeHttpAddr;
+    var url = this._buildURL();
+    url = url + "/containers";
+    return url;
+  },
+
+  urlForQueryRecord(query) {
+    this.host = this.host + query.nodeHttpAddr;
+    var url = this._buildURL();
+    url = url + "/containers/" + query.containerId;
+    return url;
+  },
+
+  query: function (store, type, query) {
+    var url = this.urlForQuery(query);
+    // Query params not required.
+    query = null;
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  queryRecord: function (store, type, query) {
+    var url = this.urlForQueryRecord(query);
+    // Query params not required.
+    query = null;
+    console.log(url);
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js
new file mode 100644
index 0000000..64f524a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js
@@ -0,0 +1,40 @@
+/**
+ * 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.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForFindRecord(id, modelName, snapshot) {
+    this.host = this.host + id;
+    var url = this._buildURL();
+    return url;
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
index 39cf796..0f6eb65 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
@@ -1,10 +1,11 @@
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/localhost:8088', // configurable
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
   namespace: 'ws/v1/cluster', // common const
   pathForType(modelName) {
     return 'scheduler'; // move to some common place, return path by modelname.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js
new file mode 100644
index 0000000..c6ad6f3
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js
@@ -0,0 +1,45 @@
+/**
+ * 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 Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
+  namespace: 'ws/v1/cluster',
+  pathForType(modelName) {
+    return 'nodes';
+  },
+
+  urlForFindRecord(id, modelName, snapshot) {
+    var url = this._buildURL();
+    url = url + "/nodes/" + id;
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
index ed8ff9b..447533e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
@@ -7,24 +7,52 @@ export default Ember.Component.extend({
     var info = this.get("info") ? true : this.get("info");
     var bFilter = this.get("bFilter") ? true : this.get("bFilter");
 
+    // Defines sorter for the columns if not default.
+    // Can also specify a custom sorter.
+    var i;
     var colDefs = [];
     if (this.get("colTypes")) {
       var typesArr = this.get("colTypes").split(' ');
       var targetsArr = this.get("colTargets").split(' ');
-      for (var i = 0; i < typesArr.length; i++) {
+      for (i = 0; i < typesArr.length; i++) {
+        console.log(typesArr[i] + " " + targetsArr[i]);
         colDefs.push({
           type: typesArr[i],
           targets: parseInt(targetsArr[i])
         });
       }
     }
-
-    $('#' + this.get('table-id')).DataTable({
+    // Defines initial column and sort order.
+    var orderArr = [];
+    if (this.get("colsOrder")) {
+      var cols = this.get("colsOrder").split(' ');
+      for (i = 0; i < cols.length; i++) {
+        var col = cols[i].split(',');
+        if (col.length != 2) {
+          continue;
+        }
+        var order = col[1].trim();
+        if (order != 'asc' && order != 'desc') {
+          continue;
+        }
+        var colOrder = [];
+        colOrder.push(parseInt(col[0]));
+        colOrder.push(order);
+        orderArr.push(colOrder);
+      }
+    }
+    if (orderArr.length == 0) {
+      var defaultOrder = [0, 'asc'];
+      orderArr.push(defaultOrder);
+    }
+    console.log(orderArr[0]);
+    Ember.$('#' + this.get('table-id')).DataTable({
       "paging":   paging,
       "ordering": ordering, 
       "info":     info,
       "bFilter": bFilter,
-      columnDefs: colDefs
+      "order": orderArr,
+      "columnDefs": colDefs
     });
   }
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js
new file mode 100644
index 0000000..224c65a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js
@@ -0,0 +1,27 @@
+/**
+ * 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.
+ */
+
+/**
+ * Host and port configurations
+ */
+export default {
+  RM_HOST: 'localhost',
+  RM_PORT: '8088',
+  TS_HOST: 'localhost',
+  TS_PORT: '8188',
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js
new file mode 100644
index 0000000..d2937a0
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+
+/**
+ * Application level global constants go here.
+ */
+export default {
+  PARAM_SEPARATOR: '!',
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js
new file mode 100644
index 0000000..3c68365
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js
@@ -0,0 +1,55 @@
+/**
+ * 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';
+
+/**
+ * Base controller for application.
+ */
+export default Ember.Controller.extend({
+  /**
+   * Output main top UI menu which is common across all pages.
+   * Menu item will be made active based on current path.
+   */
+  outputMainMenu: function(){
+    var path = this.get('currentPath');
+    var html = '<li';
+    if (path == 'yarnQueue') {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="yarnQueue/root">Queues<span class="sr-only">' +
+        '(current)</span></a></li><li';
+    if (path.lastIndexOf('yarnApp', 0) == 0) {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="yarnApps">Applications<span class="sr-only">' +
+        '(current)</span></a></li><li';
+    if (path == 'clusterOverview') {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="clusterOverview">Cluster Overview<span class=' +
+        '"sr-only">(current)</span></a></li><li';
+    if (path.lastIndexOf('yarnNode', 0) == 0) {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="yarnNodes">Nodes<span class="sr-only">' +
+        '(current)</span></a></li>';
+    return Ember.String.htmlSafe(html);
+  }.property('currentPath')
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js
new file mode 100644
index 0000000..fcf64dd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js
@@ -0,0 +1,31 @@
+/**
+ * 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';
+
+/**
+ * Helper assumes values are numeric. num means numerator and
+ * den means denominator.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  var num = hash.num;
+  var den = hash.den;
+  if (den == 0) {
+    return 0;
+  }
+  return Math.floor(num/den);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js
new file mode 100644
index 0000000..8c29b34
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js
@@ -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.
+ */
+
+import Ember from 'ember';
+
+/**
+ * Represent log files as comma separated list.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  var logFiles = hash.logFiles;
+  if (logFiles == null) {
+    return "";
+  }
+  var logFilesLen = logFiles.length;
+  if (logFilesLen == 0) {
+    return "";
+  }
+  var nodeId = hash.nodeId;
+  var nodeAddr = hash.nodeAddr;
+  var containerId = hash.containerId;
+  var html = '<td>';
+  var logFilesCommaSeparated = "";
+  for (var i = 0; i < logFilesLen; i++) {
+    html = html + '<a href="yarnContainerLog/' + nodeId + '/' +
+        nodeAddr + '/' + containerId + '/' + logFiles[i] + '">' + logFiles[i] +
+        '</a>';
+    if (i != logFilesLen - 1) {
+      html = html + ",";
+    }
+  }
+  html = html + '</td>';
+  return Ember.String.htmlSafe(html);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js
new file mode 100644
index 0000000..99d975b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js
@@ -0,0 +1,37 @@
+/**
+ * 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';
+
+/**
+ * Generate link to node page if its not SHUTDOWN or LOST.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  var nodeState = hash.nodeState;
+  var nodeHTTPAddress = hash.nodeHTTPAddress;
+  var nodeId = hash.nodeId;
+  var html = '<td>';
+  if (nodeState == "SHUTDOWN" || nodeState == "LOST") {
+    html = html + nodeHTTPAddress;
+  } else {
+    html = html + '<a href="yarnNode/' + nodeId + "/" + nodeHTTPAddress + '">' +
+        nodeHTTPAddress + '</a>';
+  }
+  html = html + '</td>';
+  return Ember.String.htmlSafe(html);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js
new file mode 100644
index 0000000..589111f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js
@@ -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.
+ */
+import Ember from 'ember';
+
+/**
+ * Create left hand side node manager menu with menu item activated based
+ * on page being accessed.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  // Place a menu within a panel inside col-md-2 container.
+  var nodeIdSplitAtPort = hash.nodeId;
+  var portIndex = nodeIdSplitAtPort.indexOf(':');
+  if (portIndex != -1) {
+    nodeIdSplitAtPort = nodeIdSplitAtPort.substring(0, portIndex) +
+        ':&#8203;' + nodeIdSplitAtPort.substring(portIndex + 1);
+  }
+  var normalizedNodeId = '';
+  var splitsAlongDots = nodeIdSplitAtPort.split('.');
+  if (splitsAlongDots) {
+    var len = splitsAlongDots.length;
+    for (var i = 0; i < len; i++) {
+      normalizedNodeId = normalizedNodeId + splitsAlongDots[i];
+      if (i != len - 1) {
+        normalizedNodeId = normalizedNodeId + '.&#8203;';
+      }
+    }
+  } else {
+    normalizedNodeId = nodeIdSplitAtPort;
+  }
+
+  var html = '<div class="col-md-2 container-fluid"><div class="panel panel-default">'+
+      '<div class="panel-heading"><h4>Node Manager<br>(' + normalizedNodeId + ')</h4></div>'+
+      '<div class="panel-body"><ul class="nav nav-pills nav-stacked" id="stacked-menu">' +
+      '<ul class="nav nav-pills nav-stacked collapse in"><li';
+  if (hash.path == 'yarnNode') {
+    html = html + ' class="active"';
+  }
+  html = html + '><a href="yarnNode/' + hash.nodeId + '/' + hash.nodeAddr +
+      '">Node Information</a></li><li';
+  if (hash.path == 'yarnNodeApps') {
+    html = html + ' class="active"';
+  }
+  html = html + '><a href="yarnNodeApps/' + hash.nodeId + '/' + hash.nodeAddr +
+      '">List of Applications</a></li><li';
+  if (hash.path == 'yarnNodeContainers') {
+    html = html + ' class="active"';
+  }
+  html = html + '><a href="yarnNodeContainers/' +hash.nodeId + '/' + hash.nodeAddr +
+      '">List of Containers</a></li></ul></ul></div>';
+  return Ember.String.htmlSafe(html);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
index cb79be1..fec2bd3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
@@ -2,12 +2,12 @@ import Converter from 'yarn-ui/utils/converter';
 import DS from 'ember-data';
 
 export default DS.Model.extend({
-	appName: DS.attr('string'),
-	user: DS.attr('string'),
-	queue: DS.attr('string'),
-	state: DS.attr('string'),
-	startTime: DS.attr('string'),
-	elapsedTime: DS.attr('string'),
+  appName: DS.attr('string'),
+  user: DS.attr('string'),
+  queue: DS.attr('string'),
+  state: DS.attr('string'),
+  startTime: DS.attr('string'),
+  elapsedTime: DS.attr('string'),
   finalStatus: DS.attr('string'),
   finishedTime: DS.attr('finishedTime'),
   progress: DS.attr('number'),
@@ -62,4 +62,4 @@ export default DS.Model.extend({
 
     return "label label-" + style;
   }.property("finalStatus")
-});
\ No newline at end of file
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js
new file mode 100644
index 0000000..31cf61e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.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 DS from 'ember-data';
+
+export default DS.Model.extend({
+  logs: DS.attr('string'),
+  containerID: DS.attr('string'),
+  logFileName: DS.attr('string')
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js
new file mode 100644
index 0000000..6dc69ae
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js
@@ -0,0 +1,44 @@
+/**
+ * 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({
+  appId: DS.attr('string'),
+  state: DS.attr('string'),
+  user: DS.attr('string'),
+  containers: DS.attr('array'),
+  /**
+   * Indicates no rows were retrieved from backend
+   */
+  isDummyApp: function() {
+    return this.get('id') == "dummy";
+  }.property("id"),
+
+  appStateStyle: function() {
+    var style = "default";
+    var appState = this.get("state");
+    if (appState == "RUNNING" || appState == "FINISHING_CONTAINERS_WAIT" ||
+        appState == "APPLICATION_RESOURCES_CLEANINGUP") {
+      style = "primary";
+    } else if (appState == "FINISHED") {
+      style = "success";
+    }
+    return "label label-" + style;
+  }.property("state")
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js
new file mode 100644
index 0000000..3ba3216
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js
@@ -0,0 +1,57 @@
+/**
+ * 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({
+  containerId: DS.attr('string'),
+  state: DS.attr('string'),
+  user: DS.attr('string'),
+  exitCode: DS.attr('string'),
+  diagnostics: DS.attr('string'),
+  totalMemoryNeeded: DS.attr('number'),
+  totalVCoresNeeded: DS.attr('number'),
+  containerLogFiles: DS.attr('array'),
+
+  /**
+   * Indicates that there was no container retrieved from backend.
+   */
+  isDummyContainer: function() {
+    return this.get('id') == "dummy";
+  }.property("id"),
+
+  containerStateStyle: function() {
+    var style = "primary";
+    var containerState = this.get('state');
+    var containerExitCode = this.get('exitCode');
+    if (containerState == "DONE") {
+      if (containerExitCode == "0") {
+        style = "success";
+      } else if (containerExitCode != "N/A") {
+        style = "danger";
+      }
+    }
+    if (containerState == "EXITED_WITH_SUCCESS") {
+      style = "success";
+    }
+    if (containerState == "EXITED_WITH_FAILURE") {
+      style = "danger";
+    }
+    return "label label-" + style;
+  }.property("state", "exitCode")
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js
new file mode 100644
index 0000000..4753983
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js
@@ -0,0 +1,33 @@
+/**
+ * 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({
+  totalVmemAllocatedContainersMB: DS.attr('number'),
+  totalPmemAllocatedContainersMB: DS.attr('number'),
+  totalVCoresAllocatedContainers: DS.attr('number'),
+  vmemCheckEnabled: DS.attr('boolean'),
+  pmemCheckEnabled: DS.attr('boolean'),
+  nodeHealthy: DS.attr('boolean'),
+  lastNodeUpdateTime: DS.attr('string'),
+  healthReport: DS.attr('string'),
+  nmStartupTime: DS.attr('string'),
+  nodeManagerBuildVersion: DS.attr('string'),
+  hadoopBuildVersion: DS.attr('string'),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js
new file mode 100644
index 0000000..9a1082c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.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.Model.extend({
+  rack: DS.attr('string'),
+  state: DS.attr('string'),
+  nodeHostName: DS.attr('string'),
+  nodeHTTPAddress: DS.attr('string'),
+  lastHealthUpdate: DS.attr('string'),
+  healthReport: DS.attr('string'),
+  numContainers: DS.attr('number'),
+  usedMemoryMB: DS.attr('number'),
+  availMemoryMB: DS.attr('number'),
+  usedVirtualCores: DS.attr('number'),
+  availableVirtualCores: DS.attr('number'),
+  version: DS.attr('string'),
+  nodeLabels: DS.attr('array'),
+
+  nodeLabelsAsString: function() {
+    var labels = this.get("nodeLabels");
+    var labelToReturn = "";
+    // Only one label per node supported.
+    if (labels && labels.length > 0) {
+      labelToReturn = labels[0];
+    }
+    return labelToReturn;
+  }.property("nodeLabels"),
+
+  /**
+   * Indicates no rows were retrieved from backend
+   */
+  isDummyNode: function() {
+    return this.get('id') == "dummy";
+  }.property("id"),
+
+  nodeStateStyle: function() {
+    var style = "default";
+    var nodeState = this.get("state");
+    if (nodeState == "REBOOTED") {
+      style = "warning";
+    } else if (nodeState == "UNHEALTHY" || nodeState == "DECOMMISSIONED" ||
+          nodeState == "LOST" || nodeState == "SHUTDOWN") {
+      style = "danger";
+    } else if (nodeState == "RUNNING") {
+      style = "success";
+    }
+    return "label label-" + style;
+  }.property("state"),
+
+  getMemoryDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Used",
+      value: this.get("usedMemoryMB")
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("availMemoryMB")
+    });
+    return arr;
+  }.property("availMemoryMB", "usedMemoryMB"),
+
+  getVCoreDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Used",
+      value: this.get("usedVirtualCores")
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("availableVirtualCores")
+    });
+    return arr;
+  }.property("availableVirtualCores", "usedVirtualCores"),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
index c31190f..5db083e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
@@ -7,10 +7,23 @@ var Router = Ember.Router.extend({
 
 Router.map(function() {
   this.route('yarnApps');
+  this.route('yarnNodes');
+  this.route('yarnNode', { path: '/yarnNode/:node_id/:node_addr' });
+  this.route('yarnNodeApps', { path: '/yarnNodeApps/:node_id/:node_addr' });
+  this.route('yarnNodeApp',
+      { path: '/yarnNodeApp/:node_id/:node_addr/:app_id' });
+  this.route('yarnNodeContainers',
+      { path: '/yarnNodeContainers/:node_id/:node_addr' });
+  this.route('yarnNodeContainer',
+      { path: '/yarnNodeContainer/:node_id/:node_addr/:container_id' });
+  this.route('yarnContainerLog', { path:
+      '/yarnContainerLog/:node_id/:node_addr/:container_id/:filename' });
   this.route('yarnQueue', { path: '/yarnQueue/:queue_name' });
   this.route('clusterOverview');
   this.route('yarnApp', { path: '/yarnApp/:app_id' });
   this.route('yarnAppAttempt', { path: '/yarnAppAttempt/:app_attempt_id'});
+  this.route('error');
+  this.route('notfound', { path: '*:' });
 });
 
 export default Router;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js
new file mode 100644
index 0000000..b7a5754
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.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({
+  actions: {
+    /**
+     * Base error handler for the application.
+     * If specific routes do not handle the error, it will bubble up to
+     * this handler. Here we redirect to either 404 page or a generic
+     * error handler page.
+     */
+    error: function (error) {
+      if (error && error.errors[0] &&
+          error.errors[0].status == 404) {
+        this.intermediateTransitionTo('/notfound');
+      } else {
+        this.intermediateTransitionTo('/error');
+      }
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js
new file mode 100644
index 0000000..b228ff4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js
@@ -0,0 +1,29 @@
+/**
+ * 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({
+  /**
+   * Redirect root URL to cluster overview page.
+   */
+  beforeModel: function() {
+    this.replaceWith('clusterOverview');
+  }
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
index 79d184f..2787f5b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
@@ -2,7 +2,7 @@ import Ember from 'ember';
 
 export default Ember.Route.extend({
   model() {
-  	var apps = this.store.findAll('yarnApp');
-    return apps
+    var apps = this.store.findAll('yarnApp');
+    return apps;
   }
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js
new file mode 100644
index 0000000..c324025
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js
@@ -0,0 +1,55 @@
+/**
+ * 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 Constants from 'yarn-ui/constants';
+
+export default Ember.Route.extend({
+  model(param) {
+    var id = param.node_addr + Constants.PARAM_SEPARATOR + param.container_id +
+        Constants.PARAM_SEPARATOR + param.filename;
+    return Ember.RSVP.hash({
+      containerLog: this.store.findRecord('yarnContainerLog', id),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    }).then(function(hash) {
+      // Just return as its success.
+      return hash;
+    }, function(reason) {
+      if (reason.errors && reason.errors[0]) {
+        // This means HTTP error response was sent by adapter.
+        return reason;
+      } else {
+        // Assume empty response received from server.
+        return { nodeInfo: { id: param.node_id, addr: param.node_addr },
+            containerLog: { logs: "", containerID: param.container_id,
+                logFileName: param.filename}};
+      }
+    });
+  },
+
+  afterModel(model) {
+    // Handle errors and redirect if promise is rejected.
+    if (model.errors && model.errors[0]) {
+      if (model.errors[0].status == 404) {
+        this.replaceWith('/notfound');
+      } else {
+        this.replaceWith('/error');
+      }
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js
new file mode 100644
index 0000000..63b1f2a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js
@@ -0,0 +1,29 @@
+/**
+ * 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({
+      nodeApp: this.store.queryRecord('yarnNodeApp',
+          { nodeAddr : param.node_addr, appId: param.app_id }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js
new file mode 100644
index 0000000..ffb5b7b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js
@@ -0,0 +1,29 @@
+/**
+ * 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) {
+    // Get all apps running on a specific node. Node is contacted by using node_addr.
+    return Ember.RSVP.hash({
+      apps: this.store.query('yarnNodeApp', { nodeAddr: param.node_addr }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js
new file mode 100644
index 0000000..2022662
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js
@@ -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.
+ */
+
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+  model(param) {
+    // Get a specific container running on a specific node.
+    return Ember.RSVP.hash({
+      nodeContainer: this.store.queryRecord('yarnNodeContainer',
+          { nodeHttpAddr: param.node_addr, containerId: param.container_id }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js
new file mode 100644
index 0000000..9a69729
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js
@@ -0,0 +1,28 @@
+/**
+ * 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) {
+    // Get all containers running on specific node.
+    return Ember.RSVP.hash({
+      containers: this.store.query('yarnNodeContainer', { nodeHttpAddr: param.node_addr }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js
new file mode 100644
index 0000000..7c58b94
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js
@@ -0,0 +1,29 @@
+/**
+ * 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) {
+    // Fetches data from both NM and RM. RM is queried to get node usage info.
+    return Ember.RSVP.hash({
+      node: this.store.findRecord('yarnNode', param.node_addr),
+      rmNode: this.store.findRecord('yarnRmNode', param.node_id)
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js
new file mode 100644
index 0000000..f33eef8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.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('yarnRmNode');
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js
new file mode 100644
index 0000000..9e10615
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js
new file mode 100644
index 0000000..8b1f152
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js
new file mode 100644
index 0000000..528f2fe
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js
new file mode 100644
index 0000000..19308e2
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js
new file mode 100644
index 0000000..6cb9320
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
index 252ca74..a9de203 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
@@ -14,9 +14,7 @@
     <!-- 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">
-        <li class="active"><a href="yarnQueue/root">Queues<span class="sr-only">(current)</span></a></li>
-        <li class="active"><a href="yarnApps">Applications<span class="sr-only">(current)</span></a></li>
-        <li class="active"><a href="clusterOverview">Cluster Overview<span class="sr-only">(current)</span></a></li>
+        {{outputMainMenu}}
       </ul>
     </div><!-- /.navbar-collapse -->
   </div><!-- /.container-fluid -->


[09/20] hadoop git commit: YARN-4517. Add nodes page and fix bunch of license issues. (Varun Saxena via wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs
new file mode 100644
index 0000000..c546bf7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs
new file mode 100644
index 0000000..588ea44
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
index e58d6bd..3a79080 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
@@ -1,3 +1,3 @@
 {{app-table table-id="apps-table" arr=model}}
-{{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}}
-{{outlet}}
\ No newline at end of file
+{{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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs
new file mode 100644
index 0000000..9cc3b0f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs
new file mode 100644
index 0000000..4da64b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs
new file mode 100644
index 0000000..c195397
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs
new file mode 100644
index 0000000..fbbb2fc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/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}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs
new file mode 100644
index 0000000..ca80ccd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.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.
+--}}
+
+<div class="col-md-12 container-fluid">
+  <div class="row">
+    {{node-menu path="yarnNodeContainers" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
+    <div class="col-md-10 container-fluid">
+      <table id="node-containers-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
+        <thead>
+          <tr>
+            <th>Container ID</th>
+            <th>Container State</th>
+            <th>User</th>
+            <th>Logs</th>
+          </tr>
+        </thead>
+        <tbody>
+          {{#if model.containers}}
+            {{#each model.containers as |container|}}
+              {{#if container.isDummyContainer}}
+                <tr><td colspan="4" align="center">No containers found on this node</td></tr>
+              {{else}}
+                <tr>
+                  <td><a href="yarnNodeContainer/{{model.nodeInfo.id}}/{{model.nodeInfo.addr}}/{{container.containerId}}">{{container.containerId}}</a></td>
+                  <td><span class={{container.containerStateStyle}}>{{container.state}}</span></td>
+                  <td>{{container.user}}</td>
+                  <td>
+                    {{log-files-comma nodeId=model.nodeInfo.id
+                        nodeAddr=model.nodeInfo.addr
+                        containerId=container.containerId
+                        logFiles=container.containerLogFiles}}
+                  </td>
+                </tr>
+              {{/if}}
+            {{/each}}
+          {{/if}}
+        </tbody>
+      </table>
+      {{simple-table table-id="node-containers-table" bFilter=true colsOrder="0,desc" colTypes="natural" colTargets="0"}}
+    </div>
+  </div>
+</div>
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs
new file mode 100644
index 0000000..a036076
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs
@@ -0,0 +1,94 @@
+{{!--
+  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="yarnNode" nodeId=model.rmNode.id nodeAddr=model.node.id}}
+    <div class="col-md-10 container-fluid">
+      <div class="panel panel-default">
+        <div class="panel-heading">Node Information</div>
+          <table class="table">
+            <tbody>
+              <tr>
+                <td>Total Vmem allocated for Containers</td>
+                <td>{{divide num=model.node.totalVmemAllocatedContainersMB den=1024}} GB</td>
+              </tr>
+              <tr>
+                <td>Vmem enforcement enabled</td>
+                <td>{{model.node.vmemCheckEnabled}}</td>
+              </tr>
+              <tr>
+                <td>Total Pmem allocated for Containers</td>
+                <td>{{divide num=model.node.totalPmemAllocatedContainersMB den=1024}} GB</td>
+              </tr>
+              <tr>
+                <td>Pmem enforcement enabled</td>
+                <td>{{model.node.pmemCheckEnabled}}</td>
+              </tr>
+              <tr>
+                <td>Total VCores allocated for Containers</td>
+                <td>{{model.node.totalVCoresAllocatedContainers}}</td>
+              </tr>
+              <tr>
+                <td>Node Healthy Status</td>
+                <td>{{model.node.nodeHealthy}}</td>
+              </tr>
+              <tr>
+                <td>Last Node Health Report Time</td>
+                <td>{{model.node.lastNodeUpdateTime}}</td>
+              </tr>
+              <tr>
+                <td>Node Health Report</td>
+                <td>{{model.node.healthReport}}</td>
+              </tr>
+              <tr>
+                <td>Node Manager Start Time</td>
+                <td>{{model.node.nmStartupTime}}</td>
+              </tr>
+              <tr>
+                <td>Node Manager Version</td>
+                <td>{{model.node.nodeManagerBuildVersion}}</td>
+              </tr>
+              <tr>
+                <td>Hadoop Version</td>
+                <td>{{model.node.hadoopBuildVersion}}</td>
+              </tr>
+            </tbody>
+          </table>
+        </div>
+      <div class="col-lg-4 container-fluid" id="mem-donut-chart">
+        {{donut-chart data=model.rmNode.getMemoryDataForDonutChart
+          title="Resource - Memory (in MB)"
+          showLabels=true
+          parentId="mem-donut-chart"
+          ratio=0.55
+          maxHeight=350}}
+      </div>
+
+      <div class="col-lg-4 container-fluid" id="vcore-donut-chart">
+        {{donut-chart data=model.rmNode.getVCoreDataForDonutChart
+          title="Resource - VCores"
+          showLabels=true
+          parentId="vcore-donut-chart"
+          ratio=0.55
+          maxHeight=350}}
+      </div>
+      </div>
+    </div>
+</div>
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs
new file mode 100644
index 0000000..bf2a098
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs
@@ -0,0 +1,65 @@
+{{!--
+  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="nodes-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
+  <thead>
+    <tr>
+          <th>Node Labels</th>
+          <th>Rack</th>
+          <th>Node State</th>
+          <th>Node Address</th>
+          <th>Node HTTP Address</th>
+          <th>Last Health Update</th>
+          <th>Health-Report</th>
+          <th>Containers</th>
+          <th>Mem Used</th>
+          <th>Mem Avail</th>
+          <th>VCores Used</th>
+          <th>VCores Avail</th>
+          <th>Version</th>
+    </tr>
+  </thead>
+  <tbody>
+    {{#if model}}
+      {{#each model as |node|}}
+        {{#if node.isDummyNode}}
+          <tr><td colspan="13" align="center">No nodes found on this cluster</td></tr>
+        {{else}}
+          <tr>
+            <td>{{node.nodeLabelsAsString}}</td>
+            <td>{{node.rack}}</td>
+            <td><span class={{node.nodeStateStyle}}>{{node.state}}</span></td>
+            <td>{{node.id}}</td>
+            {{node-link nodeId=node.id nodeHTTPAddress=node.nodeHTTPAddress nodeState=node.state}}
+            <td>{{node.lastHealthUpdate}}</td>
+            <td>{{node.healthReport}}</td>
+            <td>{{node.numContainers}}</td>
+            <td>{{divide num=node.usedMemoryMB den=1024}} GB</td>
+            <td>{{divide num=node.availMemoryMB den=1024}} GB</td>
+            <td>{{node.usedVirtualCores}}</td>
+            <td>{{node.availableVirtualCores}}</td>
+            <td>{{node.version}}</td>
+          </tr>
+        {{/if}}
+      {{/each}}
+    {{/if}}
+  </tbody>
+</table>
+
+{{simple-table table-id="nodes-table" bFilter=true}}
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
index 41e6c9c..0f49a58 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
@@ -1,3 +1,5 @@
+import Constants from 'yarn-ui/constants';
+
 export default {
   containerIdToAttemptId: function(containerId) {
     if (containerId) {
@@ -70,5 +72,20 @@ export default {
       var ts = moment(date, "YYYY/MM/DD HH:mm:ss").valueOf();
       return ts;
     }
-  }
-}
+  },
+  splitForContainerLogs: function(id) {
+    if (id) {
+      var splits = id.split(Constants.PARAM_SEPARATOR);
+      var splitLen = splits.length;
+      if (splitLen < 3) {
+        return null;
+      }
+      var fileName = splits[2];
+      var index;
+      for (index = 3; index < splitLen; index++) {
+        fileName = fileName + Constants.PARAM_SEPARATOR + splits[index];
+      }
+      return [splits[0], splits[1], fileName];
+    }
+  },
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
index 981429b..a9a5f7f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
@@ -1,15 +1,55 @@
 import Converter from 'yarn-ui/utils/converter';
+import Ember from 'ember';
 
 export default {
   _initElapsedTimeSorter: function() {
-    jQuery.extend(jQuery.fn.dataTableExt.oSort, {
+    Ember.$.extend(Ember.$.fn.dataTableExt.oSort, {
       "elapsed-time-pre": function (a) {
          return Converter.padding(Converter.elapsedTimeToMs(a), 20);
       },
     });
   },
 
+  _initNaturalSorter: function() {
+    Ember.$.extend(Ember.$.fn.dataTableExt.oSort, {
+      "natural-asc": function (a, b) {
+        return naturalSort(a,b);
+      },
+      "natural-desc": function (a, b) {
+        return naturalSort(a,b) * -1;
+      },
+    });
+  },
+
   initDataTableSorter: function() {
     this._initElapsedTimeSorter();
+    this._initNaturalSorter();
   },
+};
+
+/**
+ * Natural sort implementation.
+ * Typically used to sort application Ids'.
+ */
+function naturalSort(a, b) {
+  var diff = a.length - b.length;
+  if (diff != 0) {
+    var splitA = a.split("_");
+    var splitB = b.split("_");
+    if (splitA.length != splitB.length) {
+      return a.localeCompare(b);
+    }
+    for (var i = 1; i < splitA.length; i++) {
+      var splitdiff = splitA[i].length - splitB[i].length;
+      if (splitdiff != 0) {
+        return splitdiff;
+      }
+      var splitCompare = splitA[i].localeCompare(splitB[i]);
+      if (splitCompare != 0) {
+        return splitCompare;
+      }
+    }
+    return diff;
+  }
+  return a.localeCompare(b);
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
index ec587bb..de66650 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
@@ -9,7 +9,7 @@
     "ember-qunit": "0.4.9",
     "ember-qunit-notifications": "0.0.7",
     "ember-resolver": "~0.1.18",
-    "jquery": "^1.11.3",
+    "jquery": "1.11.3",
     "loader.js": "ember-cli/loader.js#3.2.1",
     "qunit": "~1.18.0",
     "bootstrap": "~3.3.2",

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
index b898e0d..bb4f8d2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
@@ -12,7 +12,6 @@ module.exports = function(environment) {
         // e.g. 'with-controller': true
       }
     },
-
     APP: {
       // Here you can pass flags/options to your application instance
       // when it is created

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js
new file mode 100644
index 0000000..e6e7b43
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-container-log-test.js
@@ -0,0 +1,73 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+import Constants from 'yarn-ui/constants';
+
+moduleFor('adapter:yarn-container-log', 'Unit | Adapter | ContainerLog', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+
+  assert.ok(adapter);
+  assert.ok(adapter.urlForFindRecord);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal(adapter.headers.Accept, "text/plain");
+  assert.equal(adapter.namespace, "ws/v1/node");
+});
+
+test('urlForFindRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(adapter.urlForFindRecord("localhost:8042" +
+      Constants.PARAM_SEPARATOR + "container_e27_11111111111_0001_01_000001" +
+      Constants.PARAM_SEPARATOR + "syslog"),
+      host + "localhost:8042/ws/v1/node/containerlogs/" +
+      "container_e27_11111111111_0001_01_000001/syslog");
+});
+
+test('ajaxOptions test', function(assert) {
+  let adapter = this.subject();
+  var hash = adapter.ajaxOptions('/containerlogs', 'type', {});
+  assert.equal(hash.dataType, 'text');
+});
+
+test('findRecord test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testSnapshot = {};
+  let host = adapter.host;
+  let testId = "localhost:8042" + Constants.PARAM_SEPARATOR +
+      "container_e27_11111111111_0001_01_000001" + Constants.PARAM_SEPARATOR +
+      "syslog";
+  assert.expect(2);
+
+  adapter.ajax = function (url, method) {
+    assert.equal(url, host + "localhost:8042/ws/v1/node/containerlogs/" +
+        "container_e27_11111111111_0001_01_000001/syslog");
+    assert.equal(method, 'GET');
+  };
+
+  adapter.findRecord(testStore, testModel, testId, testSnapshot);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js
new file mode 100644
index 0000000..3a25996
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-app-test.js
@@ -0,0 +1,93 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-node-app', 'Unit | Adapter | NodeApp', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+  assert.expect(11);
+  assert.ok(adapter);
+  assert.ok(adapter.urlForQueryRecord);
+  assert.ok(adapter.queryRecord);
+  assert.ok(adapter.urlForQuery);
+  assert.ok(adapter.query);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal("application/json", adapter.headers.Accept);
+  assert.equal("ws/v1/node", adapter.namespace);
+});
+
+test('urlForQueryRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(
+      host + "localhost:8042/ws/v1/node/apps/application_1111111111_1111",
+      adapter.urlForQueryRecord(
+      {nodeAddr: "localhost:8042", appId: "application_1111111111_1111"}));
+});
+
+test('urlForQuery test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(host + "localhost:8042/ws/v1/node/apps",
+      adapter.urlForQuery({nodeAddr: "localhost:8042"}));
+});
+
+test('query test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {nodeAddr: "localhost:8042"};
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(host + "localhost:8042/ws/v1/node/apps", url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.query(testStore, testModel, testQuery);
+});
+
+test('queryRecord test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {
+        nodeAddr: "localhost:8042",
+        appId: "application_1111111111_1111"
+      };
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(
+        host + "localhost:8042/ws/v1/node/apps/application_1111111111_1111",
+        url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.queryRecord(testStore, testModel, testQuery);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js
new file mode 100644
index 0000000..7d2bb2d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-container-test.js
@@ -0,0 +1,93 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-node-container', 'Unit | Adapter | NodeContainer', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+  assert.expect(11);
+  assert.ok(adapter);
+  assert.ok(adapter.urlForQueryRecord);
+  assert.ok(adapter.queryRecord);
+  assert.ok(adapter.urlForQuery);
+  assert.ok(adapter.query);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal("application/json", adapter.headers.Accept);
+  assert.equal("ws/v1/node", adapter.namespace);
+});
+
+test('urlForQueryRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(host + "localhost:8042/ws/v1/node/containers/" +
+      "container_e27_11111111111_0001_01_000001",
+      adapter.urlForQueryRecord(
+      {nodeHttpAddr: "localhost:8042",
+      containerId: "container_e27_11111111111_0001_01_000001"}));
+});
+
+test('urlForQuery test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(host + "localhost:8042/ws/v1/node/containers",
+      adapter.urlForQuery({nodeHttpAddr: "localhost:8042"}));
+});
+
+test('query test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {nodeHttpAddr: "localhost:8042"};
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(host + "localhost:8042/ws/v1/node/containers", url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.query(testStore, testModel, testQuery);
+});
+
+test('queryRecord test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {
+        nodeHttpAddr: "localhost:8042",
+        containerId: "container_e27_11111111111_0001_01_000001"
+      };
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(host + "localhost:8042/ws/v1/node/containers/" +
+        "container_e27_11111111111_0001_01_000001", url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.queryRecord(testStore, testModel, testQuery);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js
new file mode 100644
index 0000000..15aefef
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-node-test.js
@@ -0,0 +1,42 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-node', 'Unit | Adapter | Node', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+
+  assert.ok(adapter);
+  assert.ok(adapter.urlForFindRecord);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal(adapter.headers.Accept, "application/json");
+  assert.equal(adapter.namespace, "ws/v1/node");
+});
+
+test('urlForFindRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(adapter.urlForFindRecord("localhost:8042"),
+      host + "localhost:8042/ws/v1/node");
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js
new file mode 100644
index 0000000..bf009d4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/adapters/yarn-rm-node-test.js
@@ -0,0 +1,44 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-rm-node', 'Unit | Adapter | RMNode', {
+  // Specify the other units that are required for this test.
+  // needs: ['serializer:foo']
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+
+  assert.ok(adapter);
+  assert.ok(adapter.urlForFindRecord);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal(adapter.headers.Accept, "application/json");
+  assert.equal(adapter.namespace, "ws/v1/cluster");
+});
+
+test('urlForFindRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(adapter.urlForFindRecord("localhost:8042"),
+      host + "/ws/v1/cluster/nodes/localhost:8042");
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js
new file mode 100644
index 0000000..45808a5
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-container-log-test.js
@@ -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.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-container-log', 'Unit | Model | ContainerLog', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.logs);
+  assert.ok(model.containerID);
+  assert.ok(model.logFileName);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  Ember.run(function () {
+    model.set("logs", "This is syslog");
+    model.set("containerID", "container_e32_1456000363780_0002_01_000001");
+    model.set("logFileName", "syslog");
+    assert.equal(model.get("logs"), "This is syslog");
+    assert.equal(model.get("containerID"), "container_e32_1456000363780_0002_01_000001");
+    assert.equal(model.get("logFileName"), "syslog");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js
new file mode 100644
index 0000000..7e2e62f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-app-test.js
@@ -0,0 +1,65 @@
+/**
+ * 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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-node-app', 'Unit | Model | NodeApp', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.appId);
+  assert.ok(model.state);
+  assert.ok(model.user);
+  assert.ok(model.containers);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  assert.expect(9);
+  Ember.run(function () {
+    model.set("appId", "application_1456251210105_0002");
+    model.set("id", "application_1456251210105_0002");
+    model.set("state", "RUNNING");
+    model.set("user", "hadoop");
+    model.set("containers", ["container_e38_1456251210105_0002_01_000001",
+        "container_e38_1456251210105_0002_01_000002"]);
+    assert.equal(model.get("appId"), "application_1456251210105_0002");
+    assert.equal(model.get("state"), "RUNNING");
+    assert.equal(model.get("user"), "hadoop");
+    assert.deepEqual(model.get("containers"),
+        ["container_e38_1456251210105_0002_01_000001",
+        "container_e38_1456251210105_0002_01_000002"]);
+    assert.equal(model.get("appStateStyle"), "label label-primary");
+    assert.equal(model.get("isDummyApp"), false);
+    model.set("id", "dummy");
+    assert.equal(model.get("isDummyApp"), true);
+    model.set("state", "FINISHED");
+    assert.equal(model.get("appStateStyle"), "label label-success");
+    model.set("state", "NEW");
+    assert.equal(model.get("appStateStyle"), "label label-default");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.js
new file mode 100644
index 0000000..88bf233
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-container-test.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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-node-container', 'Unit | Model | NodeContainer', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.containerId);
+  assert.ok(model.state);
+  assert.ok(model.user);
+  assert.ok(model.exitCode);
+  assert.ok(model.totalMemoryNeeded);
+  assert.ok(model.totalVCoresNeeded);
+  assert.ok(model.containerLogFiles);
+  assert.ok(model.isDummyContainer);
+  assert.ok(model.containerStateStyle);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  Ember.run(function () {
+    model.set("containerId", "container_e32_1456000363780_0002_01_000003");
+    model.set("state", "RUNNING");
+    model.set("exitCode", "-1000");
+    model.set("user", "hadoop");
+    model.set("id", "container_e32_1456000363780_0002_01_000003");
+    model.set("totalMemoryNeeded", 1024);
+    model.set("totalVCoresNeeded", 1);
+    model.set("containerLogFiles", ["syslog", "stderr", "stdout"]);
+    assert.equal(model.get("containerId"), "container_e32_1456000363780_0002_01_000003");
+    assert.equal(model.get("id"), "container_e32_1456000363780_0002_01_000003");
+    assert.equal(model.get("totalMemoryNeeded"), 1024);
+    assert.equal(model.get("totalVCoresNeeded"), 1);
+    assert.equal(model.get("user"), "hadoop");
+    assert.equal(model.get("exitCode"), "-1000");
+    assert.equal(model.get("containerLogFiles").length, 3);
+    assert.deepEqual(model.get("containerLogFiles"), ["syslog", "stderr", "stdout"]);
+    assert.equal(model.get("isDummyContainer"), false);
+    assert.equal(model.get("containerStateStyle"), "label label-primary");
+    model.set("id", "dummy");
+    assert.equal(model.get("isDummyContainer"), true);
+    model.set("state", "EXITED_WITH_SUCCESS");
+    assert.equal(model.get("containerStateStyle"), "label label-success");
+    model.set("state", "EXITED_WITH_FAILURE");
+    assert.equal(model.get("containerStateStyle"), "label label-danger");
+    model.set("state", "DONE");
+    model.set("exitCode", "0");
+    assert.equal(model.get("containerStateStyle"), "label label-success");
+    model.set("exitCode", "-105");
+    assert.equal(model.get("containerStateStyle"), "label label-danger");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.js
new file mode 100644
index 0000000..5877589
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-node-test.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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-node', 'Unit | Model | Node', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.totalVmemAllocatedContainersMB);
+  assert.ok(model.vmemCheckEnabled);
+  assert.ok(model.pmemCheckEnabled);
+  assert.ok(model.nodeHealthy);
+  assert.ok(model.lastNodeUpdateTime);
+  assert.ok(model.healthReport);
+  assert.ok(model.nmStartupTime);
+  assert.ok(model.nodeManagerBuildVersion);
+  assert.ok(model.hadoopBuildVersion);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  assert.expect(4);
+  Ember.run(function () {
+    model.set("totalVmemAllocatedContainersMB", 4096);
+    model.set("totalPmemAllocatedContainersMB", 2048);
+    model.set("totalVCoresAllocatedContainers", 4);
+    model.set("hadoopBuildVersion", "3.0.0-SNAPSHOT");
+    assert.equal(model.get("totalVmemAllocatedContainersMB"), 4096);
+    assert.equal(model.get("totalPmemAllocatedContainersMB"), 2048);
+    assert.equal(model.get("totalVCoresAllocatedContainers"), 4);
+    assert.equal(model.get("hadoopBuildVersion"), "3.0.0-SNAPSHOT");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js
new file mode 100644
index 0000000..4fd2517
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/models/yarn-rm-node-test.js
@@ -0,0 +1,95 @@
+/**
+ * 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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-rm-node', 'Unit | Model | RMNode', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.rack);
+  assert.ok(model.state);
+  assert.ok(model.nodeHostName);
+  assert.ok(model.nodeHTTPAddress);
+  assert.ok(model.lastHealthUpdate);
+  assert.ok(model.healthReport);
+  assert.ok(model.numContainers);
+  assert.ok(model.usedMemoryMB);
+  assert.ok(model.availMemoryMB);
+  assert.ok(model.usedVirtualCores);
+  assert.ok(model.availableVirtualCores);
+  assert.ok(model.version);
+  assert.ok(model.nodeLabels);
+  assert.ok(model.nodeLabelsAsString);
+  assert.ok(model.nodeStateStyle);
+  assert.ok(model.isDummyNode);
+  assert.ok(model.getMemoryDataForDonutChart);
+  assert.ok(model.getVCoreDataForDonutChart);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  Ember.run(function () {
+    model.set("rack", "/default-rack");
+    model.set("state", "RUNNING");
+    model.set("nodeHostName", "localhost");
+    model.set("id", "localhost:64318");
+    model.set("nodeHTTPAddress", "localhost:8042");
+    model.set("usedMemoryMB", 1024);
+    model.set("availMemoryMB", 7168);
+    model.set("usedVirtualCores", 1);
+    model.set("availableVirtualCores", 7);
+    model.set("nodeLabels", ["x"]);
+    assert.equal(model.get("rack"), "/default-rack");
+    assert.equal(model.get("state"), "RUNNING");
+    assert.equal(model.get("nodeHostName"), "localhost");
+    assert.equal(model.get("id"), "localhost:64318");
+    assert.equal(model.get("nodeHTTPAddress"), "localhost:8042");
+    assert.equal(model.get("usedMemoryMB"), 1024);
+    assert.equal(model.get("availMemoryMB"), 7168);
+    assert.equal(model.get("usedVirtualCores"), 1);
+    assert.equal(model.get("availableVirtualCores"), 7);
+    assert.equal(model.get("isDummyNode"), false);
+    assert.deepEqual(model.get("nodeLabels"), ["x"]);
+    assert.equal(model.get("nodeLabelsAsString"), "x");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-success");
+    assert.deepEqual(model.get("getMemoryDataForDonutChart"),
+        [{label: "Used", value: 1024}, {label: "Available", value: 7168}]);
+    assert.deepEqual(model.get("getVCoreDataForDonutChart"),
+        [{label: "Used", value: 1}, {label: "Available", value: 7}]);
+    model.set("state", "SHUTDOWN");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-danger");
+    model.set("state", "REBOOTED");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-warning");
+    model.set("state", "NEW");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-default");
+    model.set("nodeLabels", ["x","y"]);
+    assert.equal(model.get("nodeLabelsAsString"), "x");
+    model.set("nodeLabels", undefined);
+    assert.equal(model.get("nodeLabelsAsString"), "");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js
new file mode 100644
index 0000000..4e68da0
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-container-log-test.js
@@ -0,0 +1,120 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+import Constants from 'yarn-ui/constants';
+
+moduleFor('route:yarn-container-log', 'Unit | Route | ContainerLog', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting container log', function(assert) {
+  var response = {
+      logs: "This is syslog",
+      containerID: "container_e32_1456000363780_0002_01_000001",
+      logFileName: "syslog"};
+  var store = {
+    findRecord: function(type) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      }
+    )}
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model({node_id: "localhost:64318",
+      node_addr: "localhost:8042",
+      container_id: "container_e32_1456000363780_0002_01_000001",
+      filename: "syslog"});
+   model.then(function(value) {
+     assert.ok(value);
+     assert.ok(value.containerLog);
+     assert.deepEqual(value.containerLog, response);
+     assert.ok(value.nodeInfo);
+     assert.equal(value.nodeInfo.addr, 'localhost:8042');
+     assert.equal(value.nodeInfo.id, 'localhost:64318');
+   });
+});
+
+/**
+ * This can happen when an empty response is sent from server
+ */
+test('Test non HTTP error while getting container log', function(assert) {
+  var error = {};
+  var response = {
+      logs: "",
+      containerID: "container_e32_1456000363780_0002_01_000001",
+      logFileName: "syslog"};
+  var store = {
+    findRecord: function(type) {
+      return new Ember.RSVP.Promise(function(resolve, reject) {
+        reject(error);
+      }
+    )}
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model({node_id: "localhost:64318",
+      node_addr: "localhost:8042",
+      container_id: "container_e32_1456000363780_0002_01_000001",
+      filename: "syslog"});
+   model.then(function(value) {
+     assert.ok(value);
+     assert.ok(value.containerLog);
+     assert.deepEqual(value.containerLog, response);
+     assert.ok(value.nodeInfo);
+     assert.equal(value.nodeInfo.addr, 'localhost:8042');
+     assert.equal(value.nodeInfo.id, 'localhost:64318');
+   });
+});
+
+test('Test HTTP error while getting container log', function(assert) {
+  var error = {errors: [{status: 404, responseText: 'Not Found'}]};
+  var response = {
+      logs: "",
+      containerID: "container_e32_1456000363780_0002_01_000001",
+      logFileName: "syslog"};
+  var store = {
+    findRecord: function(type) {
+      return new Ember.RSVP.Promise(function(resolve, reject) {
+        reject(error);
+      }
+    )}
+  };
+  assert.expect(5);
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model({node_id: "localhost:64318",
+      node_addr: "localhost:8042",
+      container_id: "container_e32_1456000363780_0002_01_000001",
+      filename: "syslog"});
+   model.then(function(value) {
+     assert.ok(value);
+     assert.ok(value.errors);
+     assert.equal(value.errors.length, 1);
+     assert.equal(value.errors[0].status, 404);
+     assert.equal(value.errors[0].responseText, 'Not Found');
+   });
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.js
new file mode 100644
index 0000000..8e5acf9
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-app-test.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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-app', 'Unit | Route | NodeApp', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting specific app on a node', function(assert) {
+  var response =
+      {id:"application_1456251210105_0001", state:"FINISHED", user:"root"};
+  var store = {
+    queryRecord: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      });
+    }
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042",
+          app_id:"application_1456251210105_0001"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.nodeApp);
+          assert.deepEqual(value.nodeApp, response);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js
new file mode 100644
index 0000000..44d9995
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-apps-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-apps', 'Unit | Route | NodeApps', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting apps on a node', function(assert) {
+  var response = [
+      {id:"application_1456251210105_0001", state:"FINISHED", user:"root"},
+      {id:"application_1456251210105_0002", state:"RUNNING",user:"root",
+      containerids:["container_e38_1456251210105_0002_01_000001",
+      "container_e38_1456251210105_0002_01_000002"]}];
+  var store = {
+    query: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response.slice());
+      });
+    }
+  };
+  assert.expect(8);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.apps);
+          assert.equal(value.apps.length, 2);
+          assert.deepEqual(response[0], value.apps[0]);
+          assert.deepEqual(response[1], value.apps[1]);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js
new file mode 100644
index 0000000..f0b68fc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-container-test.js
@@ -0,0 +1,61 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-container', 'Unit | Route | NodeContainer', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting specific container on a node', function(assert) {
+  var response =
+      {id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+      "stdout"]};
+  var store = {
+    queryRecord: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      });
+    }
+  };
+  assert.expect(6);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042",
+          container_id:"container_e32_1456000363780_0002_01_000001"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.nodeContainer);
+          assert.deepEqual(value.nodeContainer, response);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js
new file mode 100644
index 0000000..8359713
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-containers-test.js
@@ -0,0 +1,68 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-node-containers', 'Unit | Route | NodeContainers', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting apps on a node', function(assert) {
+  var response =
+      [{id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+      "stdout"]},
+      {id:"container_e32_1456000363780_0002_01_000003", state:"RUNNING",
+      exitCode:-1000, diagnostics:"", user:"root", totalMemoryNeededMB:1024,
+      totalVCoresNeeded:1,containerLogsLink:"http://localhost:8042/node" +
+      "/containerlogs/container_e32_1456000363780_0002_01_000003/root",
+      nodeId:"localhost:64318",containerLogFiles:["syslog","stderr",
+      "syslog.shuffle","stdout"]}];
+  var store = {
+    query: function(type, query) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response.slice());
+      });
+    }
+  };
+  assert.expect(8);
+  var route = this.subject();
+  route.set('store', store);
+  var model =
+      route.model({node_id:"localhost:64318", node_addr:"localhost:8042"}).
+      then(
+        function(value){
+          assert.ok(value);
+          assert.ok(value.containers);
+          assert.equal(value.containers.length, 2);
+          assert.deepEqual(value.containers[0], response[0]);
+          assert.deepEqual(value.containers[1], response[1]);
+          assert.ok(value.nodeInfo);
+          assert.equal(value.nodeInfo.addr, 'localhost:8042');
+          assert.equal(value.nodeInfo.id, 'localhost:64318');
+        }
+      );
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.js
new file mode 100644
index 0000000..4e82f1b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-node-test.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 { moduleFor, test } from 'ember-qunit';
+import Ember from 'ember';
+
+moduleFor('route:yarn-node', 'Unit | Route | Node', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting a node', function(assert) {
+  var nodeResponse =
+      {healthReport: "Healthy", totalVmemAllocatedContainersMB: 344064,
+      totalPmemAllocatedContainersMB: 163840,
+      totalVCoresAllocatedContainers: 160,
+      vmemCheckEnabled: true, pmemCheckEnabled: true,
+      lastNodeUpdateTime: 1456250210310, nodeHealthy: true,
+      nodeManagerVersion: "3.0.0-SNAPSHOT",
+      nodeManagerBuildVersion: "3.0.0-SNAPSHOT",
+      nodeManagerVersionBuiltOn: "2000-01-01T00:00Z",
+      hadoopVersion: "3.0.0-SNAPSHOT",
+      hadoopBuildVersion: "3.0.0-SNAPSHOT",
+      hadoopVersionBuiltOn: "2000-01-01T00:00Z",
+      id: "localhost:64318", nodeHostName: "192.168.0.102",
+      nmStartupTime: 1456250208231};
+  var rmNodeResponse =
+      {rack: "/default-rack", state: "RUNNING", id: "localhost:64318",
+      nodeHostName: "localhost", nodeHTTPAddress: "localhost:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 0,
+      availMemoryMB: 163840, usedVirtualCores: 0,
+      availableVirtualCores: 160,
+      resourceUtilization: {
+      nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+      nodeCPUUsage: 0.14995001256465912,
+      aggregatedContainersPhysicalMemoryMB: 0,
+      aggregatedContainersVirtualMemoryMB: 0,
+      containersCPUUsage: 0
+      }};
+
+  // Create store which returns appropriate responses.
+  var store = {
+    findRecord: function(type) {
+      if (type == 'yarnNode') {
+        return new Ember.RSVP.Promise(function(resolve) {
+          resolve(nodeResponse);
+        });
+      } else if (type == 'yarnRmNode') {
+        return new Ember.RSVP.Promise(function(resolve) {
+          resolve(rmNodeResponse);
+        });
+      }
+    }
+  };
+  var route = this.subject();
+  assert.expect(4);
+  route.set('store', store);
+  var model = route.model(
+      {node_addr:"localhost:8042", node_id:"localhost:64318"})._result;
+  assert.ok(model.node);
+  assert.deepEqual(model.node, nodeResponse);
+  assert.ok(model.rmNode);
+  assert.deepEqual(model.rmNode, rmNodeResponse);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.js
new file mode 100644
index 0000000..baa5bd6
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/routes/yarn-nodes-test.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 { moduleFor, test } from 'ember-qunit';
+import Ember from 'ember';
+
+moduleFor('route:yarn-nodes', 'Unit | Route | Nodes', {
+});
+
+test('Basic creation test', function(assert) {
+  let route = this.subject();
+  assert.ok(route);
+  assert.ok(route.model);
+});
+
+test('Test getting nodes', function(assert) {
+  var response = [{
+      rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
+      nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 0,
+      availMemoryMB: 163840, usedVirtualCores: 0,
+      availableVirtualCores: 160,
+      resourceUtilization: {
+        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+        nodeCPUUsage: 0.14995001256465912,
+        aggregatedContainersPhysicalMemoryMB: 0,
+        aggregatedContainersVirtualMemoryMB: 0,
+        containersCPUUsage: 0
+      }},
+      {rack: "/default-rack", state: "RUNNING", id: "192.168.1.2:64318",
+      nodeHostName: "192.168.1.2", nodeHTTPAddress: "192.168.1.2:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 0,
+      availMemoryMB: 163840, usedVirtualCores: 0,
+      availableVirtualCores: 160,
+      resourceUtilization: {
+        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+        nodeCPUUsage: 0.14995001256465912,
+        aggregatedContainersPhysicalMemoryMB: 0,
+        aggregatedContainersVirtualMemoryMB: 0,
+        containersCPUUsage: 0
+      }}];
+  var store = {
+    findAll: function(type) {
+      return new Ember.RSVP.Promise(function(resolve) {
+        resolve(response);
+      });
+    }
+  };
+  var route = this.subject();
+  route.set('store', store);
+  var model = route.model()._result;
+  assert.expect(4);
+  assert.ok(model);
+  assert.equal(model.length, 2);
+  assert.deepEqual(response[0], model[0]);
+  assert.deepEqual(response[1], model[1]);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js
new file mode 100644
index 0000000..2349dc2
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-container-log-test.js
@@ -0,0 +1,49 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-container-log', 'Unit | Serializer | ContainerLog', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-container-log"
+  },
+  payload = "This is syslog";
+  var id = "localhost:64318!container_e32_1456000363780_0002_01_000001!syslog";
+  assert.expect(6);
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
+  assert.ok(response.data);
+  assert.equal(response.data.id, id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.logs, payload);
+  assert.equal(response.data.attributes.containerID,
+      "container_e32_1456000363780_0002_01_000001");
+  assert.equal(response.data.attributes.logFileName, "syslog");
+});
+


[13/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-containers.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-containers.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-containers.hbs
new file mode 100644
index 0000000..ca80ccd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node-containers.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.
+--}}
+
+<div class="col-md-12 container-fluid">
+  <div class="row">
+    {{node-menu path="yarnNodeContainers" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
+    <div class="col-md-10 container-fluid">
+      <table id="node-containers-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
+        <thead>
+          <tr>
+            <th>Container ID</th>
+            <th>Container State</th>
+            <th>User</th>
+            <th>Logs</th>
+          </tr>
+        </thead>
+        <tbody>
+          {{#if model.containers}}
+            {{#each model.containers as |container|}}
+              {{#if container.isDummyContainer}}
+                <tr><td colspan="4" align="center">No containers found on this node</td></tr>
+              {{else}}
+                <tr>
+                  <td><a href="yarnNodeContainer/{{model.nodeInfo.id}}/{{model.nodeInfo.addr}}/{{container.containerId}}">{{container.containerId}}</a></td>
+                  <td><span class={{container.containerStateStyle}}>{{container.state}}</span></td>
+                  <td>{{container.user}}</td>
+                  <td>
+                    {{log-files-comma nodeId=model.nodeInfo.id
+                        nodeAddr=model.nodeInfo.addr
+                        containerId=container.containerId
+                        logFiles=container.containerLogFiles}}
+                  </td>
+                </tr>
+              {{/if}}
+            {{/each}}
+          {{/if}}
+        </tbody>
+      </table>
+      {{simple-table table-id="node-containers-table" bFilter=true colsOrder="0,desc" colTypes="natural" colTargets="0"}}
+    </div>
+  </div>
+</div>
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
new file mode 100644
index 0000000..a036076
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
@@ -0,0 +1,94 @@
+{{!--
+  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="yarnNode" nodeId=model.rmNode.id nodeAddr=model.node.id}}
+    <div class="col-md-10 container-fluid">
+      <div class="panel panel-default">
+        <div class="panel-heading">Node Information</div>
+          <table class="table">
+            <tbody>
+              <tr>
+                <td>Total Vmem allocated for Containers</td>
+                <td>{{divide num=model.node.totalVmemAllocatedContainersMB den=1024}} GB</td>
+              </tr>
+              <tr>
+                <td>Vmem enforcement enabled</td>
+                <td>{{model.node.vmemCheckEnabled}}</td>
+              </tr>
+              <tr>
+                <td>Total Pmem allocated for Containers</td>
+                <td>{{divide num=model.node.totalPmemAllocatedContainersMB den=1024}} GB</td>
+              </tr>
+              <tr>
+                <td>Pmem enforcement enabled</td>
+                <td>{{model.node.pmemCheckEnabled}}</td>
+              </tr>
+              <tr>
+                <td>Total VCores allocated for Containers</td>
+                <td>{{model.node.totalVCoresAllocatedContainers}}</td>
+              </tr>
+              <tr>
+                <td>Node Healthy Status</td>
+                <td>{{model.node.nodeHealthy}}</td>
+              </tr>
+              <tr>
+                <td>Last Node Health Report Time</td>
+                <td>{{model.node.lastNodeUpdateTime}}</td>
+              </tr>
+              <tr>
+                <td>Node Health Report</td>
+                <td>{{model.node.healthReport}}</td>
+              </tr>
+              <tr>
+                <td>Node Manager Start Time</td>
+                <td>{{model.node.nmStartupTime}}</td>
+              </tr>
+              <tr>
+                <td>Node Manager Version</td>
+                <td>{{model.node.nodeManagerBuildVersion}}</td>
+              </tr>
+              <tr>
+                <td>Hadoop Version</td>
+                <td>{{model.node.hadoopBuildVersion}}</td>
+              </tr>
+            </tbody>
+          </table>
+        </div>
+      <div class="col-lg-4 container-fluid" id="mem-donut-chart">
+        {{donut-chart data=model.rmNode.getMemoryDataForDonutChart
+          title="Resource - Memory (in MB)"
+          showLabels=true
+          parentId="mem-donut-chart"
+          ratio=0.55
+          maxHeight=350}}
+      </div>
+
+      <div class="col-lg-4 container-fluid" id="vcore-donut-chart">
+        {{donut-chart data=model.rmNode.getVCoreDataForDonutChart
+          title="Resource - VCores"
+          showLabels=true
+          parentId="vcore-donut-chart"
+          ratio=0.55
+          maxHeight=350}}
+      </div>
+      </div>
+    </div>
+</div>
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
new file mode 100644
index 0000000..bf2a098
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes.hbs
@@ -0,0 +1,65 @@
+{{!--
+  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="nodes-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
+  <thead>
+    <tr>
+          <th>Node Labels</th>
+          <th>Rack</th>
+          <th>Node State</th>
+          <th>Node Address</th>
+          <th>Node HTTP Address</th>
+          <th>Last Health Update</th>
+          <th>Health-Report</th>
+          <th>Containers</th>
+          <th>Mem Used</th>
+          <th>Mem Avail</th>
+          <th>VCores Used</th>
+          <th>VCores Avail</th>
+          <th>Version</th>
+    </tr>
+  </thead>
+  <tbody>
+    {{#if model}}
+      {{#each model as |node|}}
+        {{#if node.isDummyNode}}
+          <tr><td colspan="13" align="center">No nodes found on this cluster</td></tr>
+        {{else}}
+          <tr>
+            <td>{{node.nodeLabelsAsString}}</td>
+            <td>{{node.rack}}</td>
+            <td><span class={{node.nodeStateStyle}}>{{node.state}}</span></td>
+            <td>{{node.id}}</td>
+            {{node-link nodeId=node.id nodeHTTPAddress=node.nodeHTTPAddress nodeState=node.state}}
+            <td>{{node.lastHealthUpdate}}</td>
+            <td>{{node.healthReport}}</td>
+            <td>{{node.numContainers}}</td>
+            <td>{{divide num=node.usedMemoryMB den=1024}} GB</td>
+            <td>{{divide num=node.availMemoryMB den=1024}} GB</td>
+            <td>{{node.usedVirtualCores}}</td>
+            <td>{{node.availableVirtualCores}}</td>
+            <td>{{node.version}}</td>
+          </tr>
+        {{/if}}
+      {{/each}}
+    {{/if}}
+  </tbody>
+</table>
+
+{{simple-table table-id="nodes-table" bFilter=true}}
+{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.hbs
new file mode 100644
index 0000000..51a4fb4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.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.
+}}
+
+<div class="container-fluid">
+  {{queue-navigator model=model.queues selected=model.selected}}
+</div>
+
+<div class="row">
+  <div class="col-lg-3 container-fluid">
+    {{queue-configuration-table queue=model.selectedQueue}}
+  </div>
+
+  <div class="col-lg-3 container-fluid" id="capacity-bar-chart">
+    {{bar-chart data=model.selectedQueue.capacitiesBarChartData 
+        title="Queue Capacities" 
+        parentId="capacity-bar-chart"
+        textWidth=150
+        ratio=0.5
+        maxHeight=350}}
+  </div>
+
+{{#if model.selectedQueue.hasUserUsages}}
+  <div class="col-lg-3 container-fluid" id="userusage-donut-chart">
+    {{donut-chart data=model.selectedQueue.userUsagesDonutChartData 
+        title="User Usages" 
+        showLabels=true
+        parentId="userusage-donut-chart"
+        maxHeight=350}}
+  </div>
+{{/if}}
+
+  <div class="col-lg-3 container-fluid" id="numapplications-donut-chart">
+    {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData 
+        title="Running Apps" 
+        showLabels=true
+        parentId="numapplications-donut-chart"
+        ratio=0.5
+        maxHeight=350}}
+  </div>
+</div>
+
+<hr>
+
+<div class="row">
+  <div class="col-md-12 container-fluid">
+    {{app-table table-id="apps-table" arr=model.apps}}
+    {{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}}
+  </div>
+</div>
+
+{{outlet}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js
new file mode 100644
index 0000000..fd8f491
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js
@@ -0,0 +1,109 @@
+/**
+ * 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 Constants from 'yarn-ui/constants';
+
+export default {
+  containerIdToAttemptId: function(containerId) {
+    if (containerId) {
+      var arr = containerId.split('_');
+      var attemptId = ["appattempt", arr[1], 
+        arr[2], this.padding(arr[3], 6)];
+      return attemptId.join('_');
+    }
+  },
+  attemptIdToAppId: function(attemptId) {
+    if (attemptId) {
+      var arr = attemptId.split('_');
+      var appId = ["application", arr[1], 
+        arr[2]].join('_');
+      return appId;
+    }
+  },
+  padding: function(str, toLen=2) {
+    str = str.toString();
+    if (str.length >= toLen) {
+      return str;
+    }
+    return '0'.repeat(toLen - str.length) + str;
+  },
+  resourceToString: function(mem, cpu) {
+    mem = Math.max(0, mem);
+    cpu = Math.max(0, cpu);
+    return mem + " MBs, " + cpu + " VCores";
+  },
+  msToElapsedTime: function(timeInMs) {
+    var sec_num = timeInMs / 1000; // don't forget the second param
+    var hours = Math.floor(sec_num / 3600);
+    var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
+    var seconds = sec_num - (hours * 3600) - (minutes * 60);
+
+    var timeStrArr = [];
+
+    if (hours > 0) {
+      timeStrArr.push(hours + ' Hrs');
+    }
+    if (minutes > 0) {
+      timeStrArr.push(minutes + ' Mins');
+    }
+    if (seconds > 0) {
+      timeStrArr.push(Math.round(seconds) + " Secs");
+    }
+    return timeStrArr.join(' : ');
+  },
+  elapsedTimeToMs: function(elapsedTime) {
+    elapsedTime = elapsedTime.toLowerCase();
+    var arr = elapsedTime.split(' : ');
+    var total = 0;
+    for (var i = 0; i < arr.length; i++) {
+      if (arr[i].indexOf('hr') > 0) {
+        total += parseInt(arr[i].substring(0, arr[i].indexOf(' '))) * 3600;
+      } else if (arr[i].indexOf('min') > 0) {
+        total += parseInt(arr[i].substring(0, arr[i].indexOf(' '))) * 60;
+      } else if (arr[i].indexOf('sec') > 0) {
+        total += parseInt(arr[i].substring(0, arr[i].indexOf(' ')));
+      }
+    }
+    return total * 1000;
+  },
+  timeStampToDate: function(timeStamp) {
+    var dateTimeString = moment(parseInt(timeStamp)).format("YYYY/MM/DD HH:mm:ss");
+    return dateTimeString;
+  },
+  dateToTimeStamp: function(date) {
+    if (date) {
+      var ts = moment(date, "YYYY/MM/DD HH:mm:ss").valueOf();
+      return ts;
+    }
+  },
+  splitForContainerLogs: function(id) {
+    if (id) {
+      var splits = id.split(Constants.PARAM_SEPARATOR);
+      var splitLen = splits.length;
+      if (splitLen < 3) {
+        return null;
+      }
+      var fileName = splits[2];
+      var index;
+      for (index = 3; index < splitLen; index++) {
+        fileName = fileName + Constants.PARAM_SEPARATOR + splits[index];
+      }
+      return [splits[0], splits[1], fileName];
+    }
+  },
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/sorter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/sorter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/sorter.js
new file mode 100644
index 0000000..febef6f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/sorter.js
@@ -0,0 +1,73 @@
+/**
+ * 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 Converter from 'yarn-ui/utils/converter';
+import Ember from 'ember';
+
+export default {
+  _initElapsedTimeSorter: function() {
+    Ember.$.extend(Ember.$.fn.dataTableExt.oSort, {
+      "elapsed-time-pre": function (a) {
+         return Converter.padding(Converter.elapsedTimeToMs(a), 20);
+      },
+    });
+  },
+
+  _initNaturalSorter: function() {
+    Ember.$.extend(Ember.$.fn.dataTableExt.oSort, {
+      "natural-asc": function (a, b) {
+        return naturalSort(a,b);
+      },
+      "natural-desc": function (a, b) {
+        return naturalSort(a,b) * -1;
+      },
+    });
+  },
+
+  initDataTableSorter: function() {
+    this._initElapsedTimeSorter();
+    this._initNaturalSorter();
+  },
+};
+
+/**
+ * Natural sort implementation.
+ * Typically used to sort application Ids'.
+ */
+function naturalSort(a, b) {
+  var diff = a.length - b.length;
+  if (diff != 0) {
+    var splitA = a.split("_");
+    var splitB = b.split("_");
+    if (splitA.length != splitB.length) {
+      return a.localeCompare(b);
+    }
+    for (var i = 1; i < splitA.length; i++) {
+      var splitdiff = splitA[i].length - splitB[i].length;
+      if (splitdiff != 0) {
+        return splitdiff;
+      }
+      var splitCompare = splitA[i].localeCompare(splitB[i]);
+      if (splitCompare != 0) {
+        return splitCompare;
+      }
+    }
+    return diff;
+  }
+  return a.localeCompare(b);
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
new file mode 100644
index 0000000..de66650
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower.json
@@ -0,0 +1,22 @@
+{
+  "name": "yarn-ui",
+  "dependencies": {
+    "ember": "2.0.1",
+    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4",
+    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
+    "ember-data": "2.0.0",
+    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6",
+    "ember-qunit": "0.4.9",
+    "ember-qunit-notifications": "0.0.7",
+    "ember-resolver": "~0.1.18",
+    "jquery": "1.11.3",
+    "loader.js": "ember-cli/loader.js#3.2.1",
+    "qunit": "~1.18.0",
+    "bootstrap": "~3.3.2",
+    "d3": "~3.5.6",
+    "datatables": "~1.10.8",
+    "spin.js": "~2.3.2",
+    "momentjs": "~2.10.6",
+    "select2": "4.0.0"
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
new file mode 100644
index 0000000..9a14068
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/environment.js
@@ -0,0 +1,65 @@
+/**
+ * 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.
+ */
+
+/* jshint node: true */
+
+module.exports = function(environment) {
+  var ENV = {
+    modulePrefix: 'yarn-ui',
+    environment: environment,
+    baseURL: '/',
+    locationType: 'auto',
+    EmberENV: {
+      FEATURES: {
+        // Here you can enable experimental features on an ember canary build
+        // e.g. 'with-controller': true
+      }
+    },
+
+    APP: {
+      // Here you can pass flags/options to your application instance
+      // when it is created
+    }
+  };
+
+  if (environment === 'development') {
+    // ENV.APP.LOG_RESOLVER = true;
+    // ENV.APP.LOG_ACTIVE_GENERATION = true;
+    // ENV.APP.LOG_TRANSITIONS = true;
+    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
+    // ENV.APP.LOG_VIEW_LOOKUPS = true;
+  }
+
+  if (environment === 'test') {
+    // Testem prefers this...
+    ENV.baseURL = '/';
+    ENV.locationType = 'none';
+
+    // keep test console output quieter
+    ENV.APP.LOG_ACTIVE_GENERATION = false;
+    ENV.APP.LOG_VIEW_LOOKUPS = false;
+
+    ENV.APP.rootElement = '#ember-testing';
+  }
+
+  if (environment === 'production') {
+
+  }
+
+  return ENV;
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.js
new file mode 100644
index 0000000..cf5ad83
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/ember-cli-build.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.
+ */
+
+/* global require, module */
+var EmberApp = require('ember-cli/lib/broccoli/ember-app');
+
+module.exports = function(defaults) {
+  var app = new EmberApp(defaults, {
+    // Add options here
+  });
+
+  app.import("bower_components/datatables/media/css/jquery.dataTables.min.css");
+  app.import("bower_components/datatables/media/js/jquery.dataTables.min.js");
+  app.import("bower_components/momentjs/min/moment.min.js");
+  app.import("bower_components/select2/dist/css/select2.min.css");
+  app.import("bower_components/select2/dist/js/select2.min.js");
+
+  // Use `app.import` to add additional libraries to the generated
+  // output files.
+  //
+  // If you need to use different assets in different
+  // environments, specify an object as the first parameter. That
+  // object's keys should be the environment name and the values
+  // should be the asset to use in that environment.
+  //
+  // If the library that you are including contains AMD or ES6
+  // modules that you would like to import into your application
+  // please specify an object with the list of modules as keys
+  // along with the exports of each module as its value.
+
+  return app.toTree();
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/jsconfig.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/jsconfig.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/jsconfig.json
new file mode 100644
index 0000000..875bb90
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/jsconfig.json
@@ -0,0 +1,6 @@
+{
+    "compilerOptions": {
+        "target": "ES6",
+        "module": "commonjs"
+    }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
new file mode 100644
index 0000000..6a6dbfe
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/package.json
@@ -0,0 +1,44 @@
+{
+  "name": "yarn-ui",
+  "version": "0.0.0",
+  "description": "Small description for yarn-ui goes here",
+  "private": true,
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "scripts": {
+    "build": "ember build",
+    "start": "ember server",
+    "test": "ember test"
+  },
+  "repository": "",
+  "engines": {
+    "node": ">= 0.10.0"
+  },
+  "author": "",
+  "license": "Apache",
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.1.2",
+    "ember-bootstrap": "0.2.0",
+    "ember-cli": "1.13.8",
+    "ember-cli-app-version": "0.5.0",
+    "ember-cli-babel": "^5.1.3",
+    "ember-cli-content-security-policy": "0.4.0",
+    "ember-cli-dependency-checker": "^1.0.1",
+    "ember-cli-htmlbars": "0.7.9",
+    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
+    "ember-cli-ic-ajax": "0.2.1",
+    "ember-cli-inject-live-reload": "^1.3.1",
+    "ember-cli-qunit": "^1.0.0",
+    "ember-cli-release": "0.2.3",
+    "ember-cli-sri": "^1.0.3",
+    "ember-cli-uglify": "^1.2.0",
+    "ember-d3": "0.1.0",
+    "ember-data": "1.13.8",
+    "ember-disable-proxy-controllers": "^1.0.0",
+    "ember-export-application-global": "^1.0.3",
+    "ember-spin-spinner": "0.2.3",
+    "select2": "4.0.0"
+  }
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/Sorting icons.psd
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/Sorting icons.psd b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/Sorting icons.psd
new file mode 100644
index 0000000..53b2e06
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/Sorting icons.psd differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/favicon.ico
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/favicon.ico b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/favicon.ico
new file mode 100644
index 0000000..6eeaa2a
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc.png
new file mode 100644
index 0000000..e1ba61a
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc_disabled.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc_disabled.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc_disabled.png
new file mode 100644
index 0000000..fb11dfe
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_asc_disabled.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_both.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_both.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_both.png
new file mode 100644
index 0000000..af5bc7c
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_both.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc.png
new file mode 100644
index 0000000..0e156de
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc_disabled.png
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc_disabled.png b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc_disabled.png
new file mode 100644
index 0000000..c9fdd8a
Binary files /dev/null and b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/assets/images/datatables/sort_desc_disabled.png differ

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/crossdomain.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/crossdomain.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/crossdomain.xml
new file mode 100644
index 0000000..43a2ea6
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/public/crossdomain.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+  
+<!--
+* 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.
+-->
+
+<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+  <!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
+
+  <!-- Most restrictive policy: -->
+  <site-control permitted-cross-domain-policies="none"/>
+
+  <!-- Least restrictive policy: -->
+  <!--
+  <site-control permitted-cross-domain-policies="all"/>
+  <allow-access-from domain="*" to-ports="*" secure="false"/>
+  <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
+  -->
+</cross-domain-policy>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/testem.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/testem.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/testem.json
new file mode 100644
index 0000000..0f35392
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/testem.json
@@ -0,0 +1,12 @@
+{
+  "framework": "qunit",
+  "test_page": "tests/index.html?hidepassed",
+  "disable_watching": true,
+  "launch_in_ci": [
+    "PhantomJS"
+  ],
+  "launch_in_dev": [
+    "PhantomJS",
+    "Chrome"
+  ]
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/.jshintrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/.jshintrc
new file mode 100644
index 0000000..6ec0b7c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/.jshintrc
@@ -0,0 +1,52 @@
+{
+  "predef": [
+    "document",
+    "window",
+    "location",
+    "setTimeout",
+    "$",
+    "-Promise",
+    "define",
+    "console",
+    "visit",
+    "exists",
+    "fillIn",
+    "click",
+    "keyEvent",
+    "triggerEvent",
+    "find",
+    "findWithAssert",
+    "wait",
+    "DS",
+    "andThen",
+    "currentURL",
+    "currentPath",
+    "currentRouteName"
+  ],
+  "node": false,
+  "browser": false,
+  "boss": true,
+  "curly": true,
+  "debug": false,
+  "devel": false,
+  "eqeqeq": true,
+  "evil": true,
+  "forin": false,
+  "immed": false,
+  "laxbreak": false,
+  "newcap": true,
+  "noarg": true,
+  "noempty": false,
+  "nonew": false,
+  "nomen": false,
+  "onevar": false,
+  "plusplus": false,
+  "regexp": false,
+  "undef": true,
+  "sub": true,
+  "strict": false,
+  "white": false,
+  "eqnull": true,
+  "esnext": true,
+  "unused": true
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/resolver.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/resolver.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/resolver.js
new file mode 100644
index 0000000..f94998c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/resolver.js
@@ -0,0 +1,29 @@
+/**
+ * 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 Resolver from 'ember/resolver';
+import config from '../../config/environment';
+
+var resolver = Resolver.create();
+
+resolver.namespace = {
+  modulePrefix: config.modulePrefix,
+  podModulePrefix: config.podModulePrefix
+};
+
+export default resolver;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/start-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/start-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/start-app.js
new file mode 100644
index 0000000..a7d05be
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/helpers/start-app.js
@@ -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.
+ */
+
+import Ember from 'ember';
+import Application from '../../app';
+import config from '../../config/environment';
+
+export default function startApp(attrs) {
+  var application;
+
+  var attributes = Ember.merge({}, config.APP);
+  attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
+
+  Ember.run(function() {
+    application = Application.create(attributes);
+    application.setupForTesting();
+    application.injectTestHelpers();
+  });
+
+  return application;
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/index.html
new file mode 100644
index 0000000..9681e8b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/index.html
@@ -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.
+-->
+
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>YarnUi Tests</title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    {{content-for 'head'}}
+    {{content-for 'test-head'}}
+
+    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/yarn-ui.css">
+    <link rel="stylesheet" href="assets/test-support.css">
+
+    {{content-for 'head-footer'}}
+    {{content-for 'test-head-footer'}}
+  </head>
+  <body>
+
+    {{content-for 'body'}}
+    {{content-for 'test-body'}}
+    <script src="assets/vendor.js"></script>
+    <script src="assets/test-support.js"></script>
+    <script src="assets/yarn-ui.js"></script>
+    <script src="testem.js"></script>
+    <script src="assets/test-loader.js"></script>
+
+    {{content-for 'body-footer'}}
+    {{content-for 'test-body-footer'}}
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/test-helper.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/test-helper.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/test-helper.js
new file mode 100644
index 0000000..96975ee
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/test-helper.js
@@ -0,0 +1,24 @@
+/**
+ * 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 resolver from './helpers/resolver';
+import {
+  setResolver
+} from 'ember-qunit';
+
+setResolver(resolver);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-app-test.js
new file mode 100644
index 0000000..726345f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-app-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-app', 'Unit | Adapter | yarn app', {
+  // Specify the other units that are required for this test.
+  // needs: ['serializer:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var adapter = this.subject();
+  assert.ok(adapter);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-container-log-test.js
new file mode 100644
index 0000000..e6e7b43
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-container-log-test.js
@@ -0,0 +1,73 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+import Constants from 'yarn-ui/constants';
+
+moduleFor('adapter:yarn-container-log', 'Unit | Adapter | ContainerLog', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+
+  assert.ok(adapter);
+  assert.ok(adapter.urlForFindRecord);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal(adapter.headers.Accept, "text/plain");
+  assert.equal(adapter.namespace, "ws/v1/node");
+});
+
+test('urlForFindRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(adapter.urlForFindRecord("localhost:8042" +
+      Constants.PARAM_SEPARATOR + "container_e27_11111111111_0001_01_000001" +
+      Constants.PARAM_SEPARATOR + "syslog"),
+      host + "localhost:8042/ws/v1/node/containerlogs/" +
+      "container_e27_11111111111_0001_01_000001/syslog");
+});
+
+test('ajaxOptions test', function(assert) {
+  let adapter = this.subject();
+  var hash = adapter.ajaxOptions('/containerlogs', 'type', {});
+  assert.equal(hash.dataType, 'text');
+});
+
+test('findRecord test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testSnapshot = {};
+  let host = adapter.host;
+  let testId = "localhost:8042" + Constants.PARAM_SEPARATOR +
+      "container_e27_11111111111_0001_01_000001" + Constants.PARAM_SEPARATOR +
+      "syslog";
+  assert.expect(2);
+
+  adapter.ajax = function (url, method) {
+    assert.equal(url, host + "localhost:8042/ws/v1/node/containerlogs/" +
+        "container_e27_11111111111_0001_01_000001/syslog");
+    assert.equal(method, 'GET');
+  };
+
+  adapter.findRecord(testStore, testModel, testId, testSnapshot);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-app-test.js
new file mode 100644
index 0000000..3a25996
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-app-test.js
@@ -0,0 +1,93 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-node-app', 'Unit | Adapter | NodeApp', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+  assert.expect(11);
+  assert.ok(adapter);
+  assert.ok(adapter.urlForQueryRecord);
+  assert.ok(adapter.queryRecord);
+  assert.ok(adapter.urlForQuery);
+  assert.ok(adapter.query);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal("application/json", adapter.headers.Accept);
+  assert.equal("ws/v1/node", adapter.namespace);
+});
+
+test('urlForQueryRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(
+      host + "localhost:8042/ws/v1/node/apps/application_1111111111_1111",
+      adapter.urlForQueryRecord(
+      {nodeAddr: "localhost:8042", appId: "application_1111111111_1111"}));
+});
+
+test('urlForQuery test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(host + "localhost:8042/ws/v1/node/apps",
+      adapter.urlForQuery({nodeAddr: "localhost:8042"}));
+});
+
+test('query test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {nodeAddr: "localhost:8042"};
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(host + "localhost:8042/ws/v1/node/apps", url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.query(testStore, testModel, testQuery);
+});
+
+test('queryRecord test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {
+        nodeAddr: "localhost:8042",
+        appId: "application_1111111111_1111"
+      };
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(
+        host + "localhost:8042/ws/v1/node/apps/application_1111111111_1111",
+        url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.queryRecord(testStore, testModel, testQuery);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-container-test.js
new file mode 100644
index 0000000..7d2bb2d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-container-test.js
@@ -0,0 +1,93 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-node-container', 'Unit | Adapter | NodeContainer', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+  assert.expect(11);
+  assert.ok(adapter);
+  assert.ok(adapter.urlForQueryRecord);
+  assert.ok(adapter.queryRecord);
+  assert.ok(adapter.urlForQuery);
+  assert.ok(adapter.query);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal("application/json", adapter.headers.Accept);
+  assert.equal("ws/v1/node", adapter.namespace);
+});
+
+test('urlForQueryRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(host + "localhost:8042/ws/v1/node/containers/" +
+      "container_e27_11111111111_0001_01_000001",
+      adapter.urlForQueryRecord(
+      {nodeHttpAddr: "localhost:8042",
+      containerId: "container_e27_11111111111_0001_01_000001"}));
+});
+
+test('urlForQuery test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(host + "localhost:8042/ws/v1/node/containers",
+      adapter.urlForQuery({nodeHttpAddr: "localhost:8042"}));
+});
+
+test('query test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {nodeHttpAddr: "localhost:8042"};
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(host + "localhost:8042/ws/v1/node/containers", url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.query(testStore, testModel, testQuery);
+});
+
+test('queryRecord test', function(assert) {
+  let adapter = this.subject(),
+      testModel = { modelName: "testModel" },
+      testStore = {},
+      testQuery = {
+        nodeHttpAddr: "localhost:8042",
+        containerId: "container_e27_11111111111_0001_01_000001"
+      };
+  let host = adapter.host;
+  assert.expect(3);
+
+  adapter.ajax = function (url, method, hash) {
+    assert.equal(host + "localhost:8042/ws/v1/node/containers/" +
+        "container_e27_11111111111_0001_01_000001", url);
+    assert.equal('GET', method);
+    assert.equal(null, hash.data);
+  };
+
+  adapter.queryRecord(testStore, testModel, testQuery);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-test.js
new file mode 100644
index 0000000..15aefef
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-node-test.js
@@ -0,0 +1,42 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-node', 'Unit | Adapter | Node', {
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+
+  assert.ok(adapter);
+  assert.ok(adapter.urlForFindRecord);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal(adapter.headers.Accept, "application/json");
+  assert.equal(adapter.namespace, "ws/v1/node");
+});
+
+test('urlForFindRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(adapter.urlForFindRecord("localhost:8042"),
+      host + "localhost:8042/ws/v1/node");
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-rm-node-test.js
new file mode 100644
index 0000000..bf009d4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/adapters/yarn-rm-node-test.js
@@ -0,0 +1,44 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('adapter:yarn-rm-node', 'Unit | Adapter | RMNode', {
+  // Specify the other units that are required for this test.
+  // needs: ['serializer:foo']
+});
+
+test('Basic creation', function(assert) {
+  let adapter = this.subject();
+
+  assert.ok(adapter);
+  assert.ok(adapter.urlForFindRecord);
+  assert.ok(adapter.ajax);
+  assert.ok(adapter.headers);
+  assert.ok(adapter.host);
+  assert.ok(adapter.namespace);
+  assert.equal(adapter.headers.Accept, "application/json");
+  assert.equal(adapter.namespace, "ws/v1/cluster");
+});
+
+test('urlForFindRecord test', function(assert) {
+  let adapter = this.subject();
+  let host = adapter.host;
+  assert.equal(adapter.urlForFindRecord("localhost:8042"),
+      host + "/ws/v1/cluster/nodes/localhost:8042");
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-apps-test.js
new file mode 100644
index 0000000..baa67cc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-apps-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:yarn-apps', {
+  // Specify the other units that are required for this test.
+  // needs: ['controller:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var controller = this.subject();
+  assert.ok(controller);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-queues-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-queues-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-queues-test.js
new file mode 100644
index 0000000..39cf493
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/controllers/yarn-queues-test.js
@@ -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.
+ */
+
+import { moduleFor, test } from 'ember-qunit';
+
+moduleFor('controller:yarn-queues', {
+  // Specify the other units that are required for this test.
+  // needs: ['controller:foo']
+});
+
+// Replace this with your real tests.
+test('it exists', function(assert) {
+  var controller = this.subject();
+  assert.ok(controller);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/mixins/charts-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/mixins/charts-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/mixins/charts-test.js
new file mode 100644
index 0000000..1f5ab99
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/mixins/charts-test.js
@@ -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.
+ */
+
+import Ember from 'ember';
+import ChartsMixin from '../../../mixins/charts';
+import { module, test } from 'qunit';
+
+module('Unit | Mixin | charts');
+
+// Replace this with your real tests.
+test('it works', function(assert) {
+  var ChartsObject = Ember.Object.extend(ChartsMixin);
+  var subject = ChartsObject.create();
+  assert.ok(subject);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-app-test.js
new file mode 100644
index 0000000..8b6df23
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-app-test.js
@@ -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.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-app', 'Unit | Model | yarn app', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('it exists', function(assert) {
+  var model = this.subject();
+  // var store = this.store();
+  assert.ok(!!model);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-container-log-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-container-log-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-container-log-test.js
new file mode 100644
index 0000000..45808a5
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-container-log-test.js
@@ -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.
+ */
+
+import { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-container-log', 'Unit | Model | ContainerLog', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.logs);
+  assert.ok(model.containerID);
+  assert.ok(model.logFileName);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  Ember.run(function () {
+    model.set("logs", "This is syslog");
+    model.set("containerID", "container_e32_1456000363780_0002_01_000001");
+    model.set("logFileName", "syslog");
+    assert.equal(model.get("logs"), "This is syslog");
+    assert.equal(model.get("containerID"), "container_e32_1456000363780_0002_01_000001");
+    assert.equal(model.get("logFileName"), "syslog");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-app-test.js
new file mode 100644
index 0000000..7e2e62f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-app-test.js
@@ -0,0 +1,65 @@
+/**
+ * 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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-node-app', 'Unit | Model | NodeApp', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.appId);
+  assert.ok(model.state);
+  assert.ok(model.user);
+  assert.ok(model.containers);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  assert.expect(9);
+  Ember.run(function () {
+    model.set("appId", "application_1456251210105_0002");
+    model.set("id", "application_1456251210105_0002");
+    model.set("state", "RUNNING");
+    model.set("user", "hadoop");
+    model.set("containers", ["container_e38_1456251210105_0002_01_000001",
+        "container_e38_1456251210105_0002_01_000002"]);
+    assert.equal(model.get("appId"), "application_1456251210105_0002");
+    assert.equal(model.get("state"), "RUNNING");
+    assert.equal(model.get("user"), "hadoop");
+    assert.deepEqual(model.get("containers"),
+        ["container_e38_1456251210105_0002_01_000001",
+        "container_e38_1456251210105_0002_01_000002"]);
+    assert.equal(model.get("appStateStyle"), "label label-primary");
+    assert.equal(model.get("isDummyApp"), false);
+    model.set("id", "dummy");
+    assert.equal(model.get("isDummyApp"), true);
+    model.set("state", "FINISHED");
+    assert.equal(model.get("appStateStyle"), "label label-success");
+    model.set("state", "NEW");
+    assert.equal(model.get("appStateStyle"), "label label-default");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-container-test.js
new file mode 100644
index 0000000..88bf233
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-container-test.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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-node-container', 'Unit | Model | NodeContainer', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.containerId);
+  assert.ok(model.state);
+  assert.ok(model.user);
+  assert.ok(model.exitCode);
+  assert.ok(model.totalMemoryNeeded);
+  assert.ok(model.totalVCoresNeeded);
+  assert.ok(model.containerLogFiles);
+  assert.ok(model.isDummyContainer);
+  assert.ok(model.containerStateStyle);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  Ember.run(function () {
+    model.set("containerId", "container_e32_1456000363780_0002_01_000003");
+    model.set("state", "RUNNING");
+    model.set("exitCode", "-1000");
+    model.set("user", "hadoop");
+    model.set("id", "container_e32_1456000363780_0002_01_000003");
+    model.set("totalMemoryNeeded", 1024);
+    model.set("totalVCoresNeeded", 1);
+    model.set("containerLogFiles", ["syslog", "stderr", "stdout"]);
+    assert.equal(model.get("containerId"), "container_e32_1456000363780_0002_01_000003");
+    assert.equal(model.get("id"), "container_e32_1456000363780_0002_01_000003");
+    assert.equal(model.get("totalMemoryNeeded"), 1024);
+    assert.equal(model.get("totalVCoresNeeded"), 1);
+    assert.equal(model.get("user"), "hadoop");
+    assert.equal(model.get("exitCode"), "-1000");
+    assert.equal(model.get("containerLogFiles").length, 3);
+    assert.deepEqual(model.get("containerLogFiles"), ["syslog", "stderr", "stdout"]);
+    assert.equal(model.get("isDummyContainer"), false);
+    assert.equal(model.get("containerStateStyle"), "label label-primary");
+    model.set("id", "dummy");
+    assert.equal(model.get("isDummyContainer"), true);
+    model.set("state", "EXITED_WITH_SUCCESS");
+    assert.equal(model.get("containerStateStyle"), "label label-success");
+    model.set("state", "EXITED_WITH_FAILURE");
+    assert.equal(model.get("containerStateStyle"), "label label-danger");
+    model.set("state", "DONE");
+    model.set("exitCode", "0");
+    assert.equal(model.get("containerStateStyle"), "label label-success");
+    model.set("exitCode", "-105");
+    assert.equal(model.get("containerStateStyle"), "label label-danger");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-test.js
new file mode 100644
index 0000000..5877589
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-node-test.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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-node', 'Unit | Model | Node', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.totalVmemAllocatedContainersMB);
+  assert.ok(model.vmemCheckEnabled);
+  assert.ok(model.pmemCheckEnabled);
+  assert.ok(model.nodeHealthy);
+  assert.ok(model.lastNodeUpdateTime);
+  assert.ok(model.healthReport);
+  assert.ok(model.nmStartupTime);
+  assert.ok(model.nodeManagerBuildVersion);
+  assert.ok(model.hadoopBuildVersion);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  assert.expect(4);
+  Ember.run(function () {
+    model.set("totalVmemAllocatedContainersMB", 4096);
+    model.set("totalPmemAllocatedContainersMB", 2048);
+    model.set("totalVCoresAllocatedContainers", 4);
+    model.set("hadoopBuildVersion", "3.0.0-SNAPSHOT");
+    assert.equal(model.get("totalVmemAllocatedContainersMB"), 4096);
+    assert.equal(model.get("totalPmemAllocatedContainersMB"), 2048);
+    assert.equal(model.get("totalVCoresAllocatedContainers"), 4);
+    assert.equal(model.get("hadoopBuildVersion"), "3.0.0-SNAPSHOT");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-rm-node-test.js
new file mode 100644
index 0000000..4fd2517
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/models/yarn-rm-node-test.js
@@ -0,0 +1,95 @@
+/**
+ * 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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('yarn-rm-node', 'Unit | Model | RMNode', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+
+  assert.ok(model);
+  assert.ok(model._notifyProperties);
+  assert.ok(model.didLoad);
+  assert.ok(model.rack);
+  assert.ok(model.state);
+  assert.ok(model.nodeHostName);
+  assert.ok(model.nodeHTTPAddress);
+  assert.ok(model.lastHealthUpdate);
+  assert.ok(model.healthReport);
+  assert.ok(model.numContainers);
+  assert.ok(model.usedMemoryMB);
+  assert.ok(model.availMemoryMB);
+  assert.ok(model.usedVirtualCores);
+  assert.ok(model.availableVirtualCores);
+  assert.ok(model.version);
+  assert.ok(model.nodeLabels);
+  assert.ok(model.nodeLabelsAsString);
+  assert.ok(model.nodeStateStyle);
+  assert.ok(model.isDummyNode);
+  assert.ok(model.getMemoryDataForDonutChart);
+  assert.ok(model.getVCoreDataForDonutChart);
+});
+
+test('test fields', function(assert) {
+  let model = this.subject();
+
+  Ember.run(function () {
+    model.set("rack", "/default-rack");
+    model.set("state", "RUNNING");
+    model.set("nodeHostName", "localhost");
+    model.set("id", "localhost:64318");
+    model.set("nodeHTTPAddress", "localhost:8042");
+    model.set("usedMemoryMB", 1024);
+    model.set("availMemoryMB", 7168);
+    model.set("usedVirtualCores", 1);
+    model.set("availableVirtualCores", 7);
+    model.set("nodeLabels", ["x"]);
+    assert.equal(model.get("rack"), "/default-rack");
+    assert.equal(model.get("state"), "RUNNING");
+    assert.equal(model.get("nodeHostName"), "localhost");
+    assert.equal(model.get("id"), "localhost:64318");
+    assert.equal(model.get("nodeHTTPAddress"), "localhost:8042");
+    assert.equal(model.get("usedMemoryMB"), 1024);
+    assert.equal(model.get("availMemoryMB"), 7168);
+    assert.equal(model.get("usedVirtualCores"), 1);
+    assert.equal(model.get("availableVirtualCores"), 7);
+    assert.equal(model.get("isDummyNode"), false);
+    assert.deepEqual(model.get("nodeLabels"), ["x"]);
+    assert.equal(model.get("nodeLabelsAsString"), "x");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-success");
+    assert.deepEqual(model.get("getMemoryDataForDonutChart"),
+        [{label: "Used", value: 1024}, {label: "Available", value: 7168}]);
+    assert.deepEqual(model.get("getVCoreDataForDonutChart"),
+        [{label: "Used", value: 1}, {label: "Available", value: 7}]);
+    model.set("state", "SHUTDOWN");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-danger");
+    model.set("state", "REBOOTED");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-warning");
+    model.set("state", "NEW");
+    assert.deepEqual(model.get("nodeStateStyle"), "label label-default");
+    model.set("nodeLabels", ["x","y"]);
+    assert.equal(model.get("nodeLabelsAsString"), "x");
+    model.set("nodeLabels", undefined);
+    assert.equal(model.get("nodeLabelsAsString"), "");
+  });
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-apps-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-apps-test.js
new file mode 100644
index 0000000..3a69c9f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-apps-test.js
@@ -0,0 +1,29 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('route:yarn-apps', 'Unit | Route | yarn apps', {
+  // Specify the other units that are required for this test.
+  // needs: ['controller:foo']
+});
+
+test('it exists', function(assert) {
+  var route = this.subject();
+  assert.ok(route);
+});


[08/20] hadoop git commit: YARN-4517. Add nodes page and fix bunch of license issues. (Varun Saxena via wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js
new file mode 100644
index 0000000..21a715c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-app-test.js
@@ -0,0 +1,102 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-node-app', 'Unit | Serializer | NodeApp', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.normalizeArrayResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeArrayResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-app"
+  },
+  payload = {
+    apps: {
+      app: [{
+        id:"application_1456251210105_0001", state:"FINISHED", user:"root"
+      },{
+        id:"application_1456251210105_0002", state:"RUNNING",user:"root",
+        containerids:["container_e38_1456251210105_0002_01_000001",
+        "container_e38_1456251210105_0002_01_000002"]
+      }]
+    }
+  };
+  assert.expect(15);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 2);
+  assert.equal(response.data[0].attributes.containers, undefined);
+  assert.equal(response.data[1].attributes.containers.length, 2);
+  assert.deepEqual(response.data[1].attributes.containers,
+      payload.apps.app[1].containerids);
+  for (var i = 0; i < 2; i++) {
+    assert.equal(response.data[i].type, modelClass.modelName);
+    assert.equal(response.data[i].id, payload.apps.app[i].id);
+    assert.equal(response.data[i].attributes.appId, payload.apps.app[i].id);
+    assert.equal(response.data[i].attributes.state, payload.apps.app[i].state);
+    assert.equal(response.data[i].attributes.user, payload.apps.app[i].user);
+  }
+});
+
+test('normalizeArrayResponse no apps test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-app"
+  },
+  payload = { apps: null };
+  assert.expect(5);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 1);
+  assert.equal(response.data[0].type, modelClass.modelName);
+  assert.equal(response.data[0].id, "dummy");
+  assert.equal(response.data[0].attributes.appId, undefined);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-app"
+  },
+  payload = {
+    app: {id:"application_1456251210105_0001", state:"FINISHED", user:"root"}
+  };
+  assert.expect(7);
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(payload.app.id, response.data.id);
+  assert.equal(modelClass.modelName, response.data.type);
+  assert.equal(payload.app.id, response.data.attributes.appId);
+  assert.equal(payload.app.state, response.data.attributes.state);
+  assert.equal(payload.app.user, response.data.attributes.user);
+  assert.equal(response.data.attributes.containers, undefined);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js
new file mode 100644
index 0000000..1f08467
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-container-test.js
@@ -0,0 +1,128 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-node-container', 'Unit | Serializer | NodeContainer', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.normalizeArrayResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeArrayResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-container"
+  },
+  payload = {
+    containers: {
+      container: [{
+        id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+        exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+        totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+        "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+        nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+        "stdout"]
+      },{
+        id:"container_e32_1456000363780_0002_01_000003", state:"RUNNING",
+        exitCode:-1000, diagnostics:"", user:"root", totalMemoryNeededMB:1024,
+        totalVCoresNeeded:1,containerLogsLink:"http://localhost:8042/node" +
+        "/containerlogs/container_e32_1456000363780_0002_01_000003/root",
+        nodeId:"localhost:64318",containerLogFiles:["syslog","stderr",
+        "syslog.shuffle","stdout"]
+      }]
+    }
+  };
+  assert.expect(14);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 2);
+  assert.equal(response.data[0].id,
+      "container_e32_1456000363780_0002_01_000001");
+  assert.equal(response.data[1].id,
+      "container_e32_1456000363780_0002_01_000003");
+  assert.equal(response.data[0].attributes.containerLogFiles.length, 3);
+  assert.equal(response.data[1].attributes.containerLogFiles.length, 4);
+  for (var i = 0; i < 2; i++) {
+    assert.equal(response.data[i].type, modelClass.modelName);
+    assert.deepEqual(response.data[i].attributes.containerLogFiles,
+        payload.containers.container[i].containerLogFiles);
+    assert.equal(response.data[i].attributes.state,
+        payload.containers.container[i].state);
+    assert.equal(response.data[i].attributes.user,
+        payload.containers.container[i].user);
+  }
+});
+
+test('normalizeArrayResponse no containers test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-container"
+  },
+  payload = { containers: null };
+  assert.expect(5);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 1);
+  assert.equal(response.data[0].type, modelClass.modelName);
+  assert.equal(response.data[0].id, "dummy");
+  assert.equal(response.data[0].attributes.containerId, undefined);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node-container"
+  },
+  payload = {
+    container: {
+      id: "container_e32_1456000363780_0002_01_000001", state: "RUNNING",
+      exitCode:-1000,diagnostics:"",user:"root",totalMemoryNeededMB:2048,
+      totalVCoresNeeded:1,containerLogsLink: "http://localhost:8042/node/" +
+      "containerlogs/container_e32_1456000363780_0002_01_000001/root",
+      nodeId: "localhost:64318", containerLogFiles:["syslog","stderr",
+      "stdout"]
+    }
+  };
+  assert.expect(11);
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.id, payload.container.id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.containerId, payload.container.id);
+  assert.equal(response.data.attributes.state, payload.container.state);
+  assert.equal(response.data.attributes.user, payload.container.user);
+  assert.equal(response.data.attributes.exitCode, payload.container.exitCode);
+  assert.equal(response.data.attributes.totalMemoryNeededMB,
+      payload.container.totalMemoryNeeded);
+  assert.equal(response.data.attributes.totalVCoresNeeded,
+      payload.container.totalVCoresNeeded);
+  assert.equal(response.data.attributes.containerLogFiles.length, 3);
+  assert.deepEqual(response.data.attributes.containerLogFiles,
+      payload.container.containerLogFiles);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js
new file mode 100644
index 0000000..0e76ccb
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-node-test.js
@@ -0,0 +1,69 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+import Converter from 'yarn-ui/utils/converter';
+
+moduleFor('serializer:yarn-node', 'Unit | Serializer | Node', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-node"
+  },
+  payload = {
+    nodeInfo: {
+      healthReport: "Healthy", totalVmemAllocatedContainersMB: 344064,
+      totalPmemAllocatedContainersMB: 163840,
+      totalVCoresAllocatedContainers: 160,
+      vmemCheckEnabled: true, pmemCheckEnabled: true,
+      lastNodeUpdateTime: 1456250210310, nodeHealthy: true,
+      nodeManagerVersion: "3.0.0-SNAPSHOT",
+      nodeManagerBuildVersion: "3.0.0-SNAPSHOT",
+      nodeManagerVersionBuiltOn: "2000-01-01T00:00Z",
+      hadoopVersion: "3.0.0-SNAPSHOT",
+      hadoopBuildVersion: "3.0.0-SNAPSHOT",
+      hadoopVersionBuiltOn: "2000-01-01T00:00Z",
+      id: "localhost:64318", nodeHostName: "192.168.0.102",
+      nmStartupTime: 1456250208231
+    }
+  };
+  assert.expect(6);
+  var id = "localhost:64318";
+  var response = serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
+  assert.equal(response.data.id, id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.totalVmemAllocatedContainersMB,
+      payload.nodeInfo.totalVmemAllocatedContainersMB);
+  assert.equal(response.data.attributes.totalPmemAllocatedContainersMB,
+      payload.nodeInfo.totalPmemAllocatedContainersMB);
+  assert.equal(response.data.attributes.totalVCoresAllocatedContainers,
+      payload.nodeInfo.totalVCoresAllocatedContainers);
+  assert.equal(response.data.attributes.nmStartupTime,
+      Converter.timeStampToDate(payload.nodeInfo.nmStartupTime));
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js
new file mode 100644
index 0000000..bc6397d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/serializers/yarn-rm-node-test.js
@@ -0,0 +1,153 @@
+/**
+ * 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 { moduleFor, test } from 'ember-qunit';
+
+moduleFor('serializer:yarn-rm-node', 'Unit | Serializer | RMNode', {
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+
+  assert.ok(serializer);
+  assert.ok(serializer.normalizeSingleResponse);
+  assert.ok(serializer.normalizeArrayResponse);
+  assert.ok(serializer.internalNormalizeSingleResponse);
+});
+
+test('normalizeArrayResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-rm-node"
+  },
+  payload = {
+    nodes: {
+      node: [{
+        rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
+        nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
+        lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+        healthReport: "", numContainers: 0, usedMemoryMB: 2048,
+        availMemoryMB: 161792, usedVirtualCores: 2,
+        availableVirtualCores: 158, nodeLabels: ["x"],
+        resourceUtilization: {
+          nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+          nodeCPUUsage: 0.14995001256465912,
+          aggregatedContainersPhysicalMemoryMB: 0,
+          aggregatedContainersVirtualMemoryMB: 0,
+          containersCPUUsage: 0
+        }
+      },{
+        rack: "/default-rack", state: "RUNNING", id: "192.168.1.2:64318",
+        nodeHostName: "192.168.1.2", nodeHTTPAddress: "192.168.1.2:8042",
+        lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+        healthReport: "", numContainers: 0, usedMemoryMB: 0,
+        availMemoryMB: 163840, usedVirtualCores: 0,
+        availableVirtualCores: 160, nodeLabels: ["y"],
+        resourceUtilization: {
+          nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+          nodeCPUUsage: 0.14995001256465912,
+          aggregatedContainersPhysicalMemoryMB: 0,
+          aggregatedContainersVirtualMemoryMB: 0,
+          containersCPUUsage: 0
+        }
+      }]
+    }
+  };
+  assert.expect(12);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 2);
+  assert.equal(response.data[0].id, "192.168.1.1:64318");
+  assert.equal(response.data[1].id, "192.168.1.2:64318");
+  for (var i = 0; i < 2; i++) {
+    assert.equal(response.data[i].type, modelClass.modelName);
+    assert.equal(response.data[i].attributes.nodeHostName,
+        payload.nodes.node[i].nodeHostName);
+    assert.equal(response.data[i].attributes.nodeHTTPAddress,
+        payload.nodes.node[i].nodeHTTPAddress);
+    assert.deepEqual(response.data[i].attributes.nodeLabels,
+        payload.nodes.node[i].nodeLabels);
+  }
+});
+
+test('normalizeArrayResponse no nodes test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-rm-node"
+  },
+  payload = { nodes: null };
+  assert.expect(5);
+  var response =
+      serializer.normalizeArrayResponse({}, modelClass, payload, null, null);
+  console.log(response);
+  assert.ok(response.data);
+  assert.equal(response.data.length, 1);
+  assert.equal(response.data[0].type, modelClass.modelName);
+  assert.equal(response.data[0].id, "dummy");
+  assert.equal(response.data[0].attributes.nodeHostName, undefined);
+});
+
+test('normalizeSingleResponse test', function(assert) {
+  let serializer = this.subject(),
+  modelClass = {
+    modelName: "yarn-rm-node"
+  },
+  payload = {
+    node: {
+      rack: "/default-rack", state: "RUNNING", id: "192.168.1.1:64318",
+      nodeHostName: "192.168.1.1", nodeHTTPAddress: "192.168.1.1:8042",
+      lastHealthUpdate: 1456251290905, version: "3.0.0-SNAPSHOT",
+      healthReport: "", numContainers: 0, usedMemoryMB: 2048,
+      availMemoryMB: 161792, usedVirtualCores: 2,
+      availableVirtualCores: 158, nodeLabels: ["x"],
+      resourceUtilization: {
+        nodePhysicalMemoryMB: 4549, nodeVirtualMemoryMB: 4549,
+        nodeCPUUsage: 0.14995001256465912,
+        aggregatedContainersPhysicalMemoryMB: 0,
+        aggregatedContainersVirtualMemoryMB: 0,
+        containersCPUUsage: 0
+      }
+    }
+  };
+  assert.expect(13);
+  var id = "localhost:64318";
+  var response =
+      serializer.normalizeSingleResponse({}, modelClass, payload, id, null);
+  assert.ok(response.data);
+  assert.equal(response.data.id, id);
+  assert.equal(response.data.type, modelClass.modelName);
+  assert.equal(response.data.attributes.rack, payload.node.rack);
+  assert.equal(response.data.attributes.state, payload.node.state);
+  assert.equal(response.data.attributes.nodeHostName,
+      payload.node.nodeHostName);
+  assert.equal(response.data.attributes.nodeHTTPAddress,
+      payload.node.nodeHTTPAddress);
+  assert.equal(response.data.attributes.version, payload.node.version);
+  assert.equal(response.data.attributes.availMemoryMB,
+      payload.node.availMemoryMB);
+  assert.equal(response.data.attributes.usedMemoryMB,
+      payload.node.usedMemoryMB);
+  assert.equal(response.data.attributes.availableVirtualCores,
+      payload.node.availableVirtualCores);
+  assert.equal(response.data.attributes.usedVirtualCores,
+      payload.node.usedVirtualCores);
+  assert.deepEqual(response.data.attributes.nodeLabels,
+      payload.node.nodeLabels);
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
index 55cf71d..481537d 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/converter-test.js
@@ -1,10 +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.
+ */
+
 import converter from '../../../utils/converter';
 import { module, test } from 'qunit';
 
-module('Unit | Utility | converter');
+module('Unit | Utility | Converter');
 
 // Replace this with your real tests.
 test('it works', function(assert) {
-  var result = converter();
-  assert.ok(result);
+  assert.ok(converter);
+  assert.ok(converter.splitForContainerLogs);
+});
+
+test('split for container logs', function(assert) {
+  var id = "localhost:64318!container_e32_1456000363780_0002_01_000001!" +
+      "syslog";
+  var arr = converter.splitForContainerLogs(id);
+  assert.ok(arr);
+  assert.deepEqual(arr, ["localhost:64318",
+      "container_e32_1456000363780_0002_01_000001", "syslog"]);
+  id = "localhost:64318!container_e32_1456000363780_0002_01_000001!" +
+      "syslog!logs";
+  arr = converter.splitForContainerLogs(id);
+  assert.ok(arr);
+  assert.deepEqual(arr, ["localhost:64318",
+      "container_e32_1456000363780_0002_01_000001", "syslog!logs"]);
+  id = "localhost:64318!container_e32_1456000363780_0002_01_000001";
+  arr = converter.splitForContainerLogs(id);
+  assert.notOk(arr);
+  id = null;
+  arr = converter.splitForContainerLogs(id);
+  assert.notOk(arr);
+  id = undefined;
+  arr = converter.splitForContainerLogs(id);
+  assert.notOk(arr);
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b61c2efe/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js
new file mode 100644
index 0000000..8f17380
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tests/unit/utils/sorter-test.js
@@ -0,0 +1,26 @@
+/**
+ * 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 Sorter from 'yarn-ui/utils/sorter';
+import { module, test } from 'qunit';
+
+module('Unit | Utility | Sorter');
+
+test('Basic creation test', function(assert) {
+  assert.ok(Sorter);
+});


[04/20] hadoop git commit: HADOOP-13006 FileContextMainOperationsBaseTest.testListStatusThrowsExceptionForNonExistentFile() doesnt run. (Kai Sasaki via stevel)

Posted by wa...@apache.org.
HADOOP-13006 FileContextMainOperationsBaseTest.testListStatusThrowsExceptionForNonExistentFile() doesnt run. (Kai Sasaki via stevel)


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

Branch: refs/heads/YARN-3368
Commit: 6791221572ee99528bbc1dbd182f4bd902c2edf1
Parents: 594c70f
Author: Steve Loughran <st...@apache.org>
Authored: Fri Apr 8 12:59:01 2016 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Apr 8 12:59:19 2016 +0100

----------------------------------------------------------------------
 .../org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/67912215/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java
index 5f201eb..78b40b5 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextMainOperationsBaseTest.java
@@ -272,7 +272,8 @@ public abstract class FileContextMainOperationsBaseTest  {
       // expected
     }
   } 
-  
+
+  @Test
   public void testListStatusThrowsExceptionForNonExistentFile()
                                                     throws Exception {
     try {


[20/20] hadoop git commit: YARN-4514

Posted by wa...@apache.org.
YARN-4514


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

Branch: refs/heads/YARN-3368
Commit: 3a8a182bd773ff3905393596a5f61bd0da5333c8
Parents: e35bf0f
Author: Wangda Tan <wa...@apache.org>
Authored: Fri Apr 8 10:48:45 2016 -0700
Committer: Wangda Tan <wa...@apache.org>
Committed: Fri Apr 8 10:48:56 2016 -0700

----------------------------------------------------------------------
 .../main/webapp/app/adapters/cluster-info.js    |  4 +--
 .../main/webapp/app/adapters/cluster-metric.js  |  5 +--
 .../webapp/app/adapters/yarn-app-attempt.js     |  4 +--
 .../src/main/webapp/app/adapters/yarn-app.js    |  5 +--
 .../webapp/app/adapters/yarn-container-log.js   |  5 +--
 .../main/webapp/app/adapters/yarn-container.js  |  9 ++---
 .../main/webapp/app/adapters/yarn-node-app.js   |  5 +--
 .../webapp/app/adapters/yarn-node-container.js  |  5 +--
 .../src/main/webapp/app/adapters/yarn-node.js   |  5 +--
 .../src/main/webapp/app/adapters/yarn-queue.js  |  4 +--
 .../main/webapp/app/adapters/yarn-rm-node.js    |  4 +--
 .../src/main/webapp/app/config.js               | 35 +++++++++++++++++---
 12 files changed, 62 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
index 7dcbe61..216bcb6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
@@ -23,8 +23,8 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl ,
+  namespace: Config.restNamespace.cluster,
   pathForType(modelName) {
     return ''; // move to some common place, return path by modelname.
   },

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
index ad5ae0e..e9f4fd4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
@@ -23,8 +23,9 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster/metrics', // common const
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl ,
+  namespace: Config.restNamespace.metrics,
+
   pathForType(modelName) {
     return ''; // move to some common place, return path by modelname.
   },

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
index 7b233bc..667f79b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
@@ -24,8 +24,8 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl ,
+  namespace: Config.restNamespace.cluster,
 
   urlForQuery(query, modelName) {
     var url = this._buildURL();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
index 5cd888c..9599bbd 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
@@ -23,8 +23,9 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl ,
+  namespace: Config.restNamespace.cluster,
+
   pathForType(modelName) {
     return 'apps'; // move to some common place, return path by modelname.
   },

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
index 7838c98..4b0b55a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
@@ -19,6 +19,7 @@
 import DS from 'ember-data';
 import Ember from 'ember';
 import Converter from 'yarn-ui/utils/converter';
+import Config from 'yarn-ui/config';
 
 /**
  * REST URL's response when fetching container logs will be
@@ -28,8 +29,8 @@ export default DS.RESTAdapter.extend({
   headers: {
     Accept: 'text/plain'
   },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl,
+  namespace: Config.restNamespace.node,
 
   urlForFindRecord(id, modelName, snapshot) {
     var splits = Converter.splitForContainerLogs(id);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
index 67a37f7..309c1d1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
@@ -24,13 +24,14 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  rmHost: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
-  tsHost: 'http://localhost:1337/' + Config.TS_HOST + ':' + Config.TS_PORT,
+  rmHost: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl,
+  tsHost: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.timelineWebUrl,
+
   host: function() {
     return undefined
   }.property(),
-  rmNamespace: 'ws/v1/cluster',
-  tsNamespace: 'ws/v1/applicationhistory',
+  rmNamespace: Config.restNamespace.cluster,
+  tsNamespace: Config.restNamespace.timeline,
   namespace: function() {
     return undefined
   }.property(),

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
index 0c60d1f..f40b1aa 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
@@ -17,13 +17,14 @@
  */
 
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl,
+  namespace: Config.restNamespace.node,
 
   urlForQuery(query) {
     this.host = this.host + query.nodeAddr;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
index e8bf7b7..238b235 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
@@ -17,13 +17,14 @@
  */
 
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl,
+  namespace: Config.restNamespace.node,
 
   urlForQuery(query) {
     this.host = this.host + query.nodeHttpAddr;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
index 64f524a..639a59a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
@@ -17,13 +17,14 @@
  */
 
 import DS from 'ember-data';
+import Config from 'yarn-ui/config';
 
 export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl,
+  namespace: Config.restNamespace.node,
 
   urlForFindRecord(id, modelName, snapshot) {
     this.host = this.host + id;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
index ebe7b39..17c7043 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
@@ -23,8 +23,8 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl ,
+  namespace: Config.restNamespace.cluster,
   pathForType(modelName) {
     return 'scheduler'; // move to some common place, return path by modelname.
   },

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
index c6ad6f3..6907559 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
@@ -23,8 +23,8 @@ export default DS.JSONAPIAdapter.extend({
   headers: {
     Accept: 'application/json'
   },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
-  namespace: 'ws/v1/cluster',
+  host: Config.envDefaults.protocolScheme + Config.envDefaults.localBaseUrl + Config.envDefaults.rmWebUrl ,
+  namespace: Config.restNamespace.cluster,
   pathForType(modelName) {
     return 'nodes';
   },

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3a8a182b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
index 224c65a..f4f9ff0 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
@@ -19,9 +19,36 @@
 /**
  * Host and port configurations
  */
+
 export default {
-  RM_HOST: 'localhost',
-  RM_PORT: '8088',
-  TS_HOST: 'localhost',
-  TS_PORT: '8188',
+    envDefaults: {
+
+    /*
+     * Local URL. This can be empty by default. For testbed if corsproxy is used,
+     * corsproxy URL can be configured here. For eg:"localhost:1337/"
+     */
+      localBaseUrl: "localhost:1337/",
+
+    /*
+     * Timeline web interface can be configured below.
+     */
+      timelineWebUrl: "localhost:8188",
+
+    /*
+     * RM web interface can be configured below.
+     */
+      rmWebUrl: "localhost:8088",
+
+    /*
+     * Protocol scheme. It can be "http://" or "https://". By default, http is used.
+     */
+      protocolScheme: "http://"
+   },
+
+    restNamespace: {
+      timeline: 'ws/v1/applicationhistory',
+      cluster: 'ws/v1/cluster',
+      metrics: 'ws/v1/cluster/metrics',
+      node: 'ws/v1/node'
+   }
 };


[18/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js
deleted file mode 100644
index fe402bb..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js
+++ /dev/null
@@ -1,250 +0,0 @@
-import Ember from 'ember';
-import Converter from 'yarn-ui/utils/converter';
-
-export default Ember.Component.extend({
-  canvas: {
-    svg: undefined,
-    h: 0,
-    w: 0,
-    tooltip: undefined
-  },
-
-  clusterMetrics: undefined,
-  modelArr: [],
-  colors: d3.scale.category10().range(),
-  _selected: undefined,
-
-  selected: function() {
-    return this._selected;
-  }.property(),
-
-  tableComponentName: function() {
-    return "app-attempt-table";
-  }.property(),
-
-  setSelected: function(d) {
-    if (this._selected == d) {
-      return;
-    }
-
-    // restore color
-    if (this._selected) {
-      var dom = d3.select("#timeline-bar-" + this._selected.get("id"));
-      dom.attr("fill", this.colors[0]);
-    }
-
-    this._selected = d;
-    this.set("selected", d);
-    dom = d3.select("#timeline-bar-" + d.get("id"));
-    dom.attr("fill", this.colors[1]);
-  },
-
-  getPerItemHeight: function() {
-    var arrSize = this.modelArr.length;
-
-    if (arrSize < 20) {
-      return 30;
-    } else if (arrSize < 100) {
-      return 10;
-    } else {
-      return 2;
-    }
-  },
-
-  getPerItemGap: function() {
-    var arrSize = this.modelArr.length;
-
-    if (arrSize < 20) {
-      return 5;
-    } else if (arrSize < 100) {
-      return 1;
-    } else {
-      return 1;
-    }
-  },
-
-  getCanvasHeight: function() {
-    return (this.getPerItemHeight() + this.getPerItemGap()) * this.modelArr.length + 200;
-  },
-
-  draw: function(start, end) {
-    // get w/h of the svg
-    var bbox = d3.select("#" + this.get("parent-id"))
-      .node()
-      .getBoundingClientRect();
-    this.canvas.w = bbox.width;
-    this.canvas.h = this.getCanvasHeight();
-
-    this.canvas.svg = d3.select("#" + this.get("parent-id"))
-      .append("svg")
-      .attr("width", this.canvas.w)
-      .attr("height", this.canvas.h)
-      .attr("id", this.get("my-id"));
-    this.renderTimeline(start, end);
-  },
-
-  renderTimeline: function(start, end) {
-    var border = 30;
-    var singleBarHeight = this.getPerItemHeight();
-    var gap = this.getPerItemGap();
-    var textWidth = 50;
-    /*
-     start-time                              end-time
-      |--------------------------------------|
-         ==============
-                ==============
-                        ==============
-                              ===============
-     */
-    var xScaler = d3.scale.linear()
-      .domain([start, end])
-      .range([0, this.canvas.w - 2 * border - textWidth]);
-
-    /*
-     * Render frame of timeline view
-     */
-    this.canvas.svg.append("line")
-      .attr("x1", border + textWidth)
-      .attr("y1", border - 5)
-      .attr("x2", this.canvas.w - border)
-      .attr("y2", border - 5)
-      .attr("class", "chart");
-
-    this.canvas.svg.append("line")
-      .attr("x1", border + textWidth)
-      .attr("y1", border - 10)
-      .attr("x2", border + textWidth)
-      .attr("y2", border - 5)
-      .attr("class", "chart");
-
-    this.canvas.svg.append("line")
-      .attr("x1", this.canvas.w - border)
-      .attr("y1", border - 10)
-      .attr("x2", this.canvas.w - border)
-      .attr("y2", border - 5)
-      .attr("class", "chart");
-
-    this.canvas.svg.append("text")
-        .text(Converter.timeStampToDate(start))
-        .attr("y", border - 15)
-        .attr("x", border + textWidth)
-        .attr("class", "bar-chart-text")
-        .attr("text-anchor", "left");
-
-    this.canvas.svg.append("text")
-        .text(Converter.timeStampToDate(end))
-        .attr("y", border - 15)
-        .attr("x", this.canvas.w - border)
-        .attr("class", "bar-chart-text")
-        .attr("text-anchor", "end");
-
-    // show bar
-    var bar = this.canvas.svg.selectAll("bars")
-      .data(this.modelArr)
-      .enter()
-      .append("rect")
-      .attr("y", function(d, i) {
-        return border + (gap + singleBarHeight) * i;
-      })
-      .attr("x", function(d, i) {
-        return border + textWidth + xScaler(d.get("startTs"));
-      })
-      .attr("height", singleBarHeight)
-      .attr("fill", function(d, i) {
-        return this.colors[0];
-      }.bind(this))
-      .attr("width", function(d, i) {
-        var finishedTs = xScaler(d.get("finishedTs"));
-        finishedTs = finishedTs > 0 ? finishedTs : xScaler(end);
-        return finishedTs - xScaler(d.get("startTs"));
-      })
-      .attr("id", function(d, i) {
-        return "timeline-bar-" + d.get("id");
-      });
-    bar.on("click", function(d) {
-      this.setSelected(d);
-    }.bind(this));
-
-    this.bindTooltip(bar);
-
-    if (this.modelArr.length <= 20) {
-      // show bar texts
-      for (var i = 0; i < this.modelArr.length; i++) {
-        this.canvas.svg.append("text")
-          .text(this.modelArr[i].get(this.get("label")))
-          .attr("y", border + (gap + singleBarHeight) * i + singleBarHeight / 2)
-          .attr("x", border)
-          .attr("class", "bar-chart-text");
-      }
-    }
-  },
-
-  bindTooltip: function(d) {
-    d.on("mouseover", function(d) {
-        this.tooltip
-          .style("left", (d3.event.pageX) + "px")
-          .style("top", (d3.event.pageY - 28) + "px");
-      }.bind(this))
-      .on("mousemove", function(d) {
-        this.tooltip.style("opacity", .9);
-        this.tooltip.html(d.get("tooltipLabel"))
-          .style("left", (d3.event.pageX) + "px")
-          .style("top", (d3.event.pageY - 28) + "px");
-      }.bind(this))
-      .on("mouseout", function(d) {
-        this.tooltip.style("opacity", 0);
-      }.bind(this));
-  },
-
-  initTooltip: function() {
-    this.tooltip = d3.select("body")
-      .append("div")
-      .attr("class", "tooltip")
-      .attr("id", "chart-tooltip")
-      .style("opacity", 0);
-  },
-
-  didInsertElement: function() {
-    // init tooltip
-    this.initTooltip();
-
-    // init model
-    if (this.get("rmModel")) {
-      this.get("rmModel").forEach(function(o) {
-        this.modelArr.push(o);
-      }.bind(this));
-    }
-
-    if (this.get("tsModel")) {
-     this.get("tsModel").forEach(function(o) {
-        this.modelArr.push(o);
-      }.bind(this)); 
-    }
-
-    this.modelArr.sort(function(a, b) {
-      var tsA = a.get("startTs");
-      var tsB = b.get("startTs");
-
-      return tsA - tsB;
-    });
-    if (this.modelArr.length > 0) {
-      var begin = this.modelArr[0].get("startTs");
-    }
-    var end = 0;
-    for (var i = 0; i < this.modelArr.length; i++) {
-      var ts = this.modelArr[i].get("finishedTs");
-      if (ts > end) {
-        end = ts;
-      }
-    }
-    if (end < begin) {
-      end = Date.now();
-    }
-
-    this.draw(begin, end);
-
-    if (this.modelArr.length > 0) {
-      this.setSelected(this.modelArr[0]);
-    }
-  },
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js
deleted file mode 100644
index 470deaf..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js
+++ /dev/null
@@ -1,257 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-  // Map: <queue-name, queue>
-  map : undefined,
-
-  // Normalized data for d3
-  treeData: undefined,
-
-  // folded queues, folded[<queue-name>] == true means <queue-name> is folded
-  foldedQueues: { },
-
-  // maxDepth
-  maxDepth: 0,
-
-  // num of leaf queue, folded queue is treated as leaf queue
-  numOfLeafQueue: 0,
-
-  // mainSvg
-  mainSvg: undefined,
-
-  // Init data
-  initData: function() {
-    this.map = { };
-    this.treeData = { };
-    this.maxDepth = 0;
-    this.numOfLeafQueue = 0;
-
-    this.get("model")
-      .forEach(function(o) {
-        this.map[o.id] = o;
-      }.bind(this));
-
-    var selected = this.get("selected");
-
-    this.initQueue("root", 1, this.treeData);
-  },
-
-  // get Children array of given queue
-  getChildrenNamesArray: function(q) {
-    var namesArr = [];
-
-    // Folded queue's children is empty
-    if (this.foldedQueues[q.get("name")]) {
-      return namesArr;
-    }
-
-    var names = q.get("children");
-    if (names) {
-      names.forEach(function(name) {
-        namesArr.push(name);
-      });
-    }
-
-    return namesArr;
-  },
-
-  // Init queues
-  initQueue: function(queueName, depth, node) {
-    if ((!queueName) || (!this.map[queueName])) {
-      // Queue is not existed
-      return;
-    }
-
-    if (depth > this.maxDepth) {
-      this.maxDepth = this.maxDepth + 1;
-    }
-
-    var queue = this.map[queueName];
-
-    var names = this.getChildrenNamesArray(queue);
-
-    node.name = queueName;
-    node.parent = queue.get("parent");
-    node.queueData = queue;
-
-    if (names.length > 0) {
-      node.children = [];
-
-      names.forEach(function(name) {
-        var childQueueData = {};
-        node.children.push(childQueueData);
-        this.initQueue(name, depth + 1, childQueueData);
-      }.bind(this));
-    } else {
-      this.numOfLeafQueue = this.numOfLeafQueue + 1;
-    }
-  },
-
-  update: function(source, root, tree, diagonal) {
-    var duration = 300;
-    var i = 0;
-
-    // Compute the new tree layout.
-    var nodes = tree.nodes(root).reverse();
-    var links = tree.links(nodes);
-
-    // Normalize for fixed-depth.
-    nodes.forEach(function(d) { d.y = d.depth * 200; });
-
-    // Update the nodes…
-    var node = this.mainSvg.selectAll("g.node")
-      .data(nodes, function(d) { return d.id || (d.id = ++i); });
-
-    // Enter any new nodes at the parent's previous position.
-    var nodeEnter = node.enter().append("g")
-      .attr("class", "node")
-      .attr("transform", function(d) { return "translate(" + source.y0 + "," + source.x0 + ")"; })
-      .on("click", function(d,i){
-        if (d.queueData.get("name") != this.get("selected")) {
-            document.location.href = "yarnQueue/" + d.queueData.get("name");
-        }
-      }.bind(this));
-      // .on("click", click);
-
-    nodeEnter.append("circle")
-      .attr("r", 1e-6)
-      .style("fill", function(d) {
-        var usedCap = d.queueData.get("usedCapacity");
-        if (usedCap <= 60.0) {
-          return "LimeGreen";
-        } else if (usedCap <= 100.0) {
-          return "DarkOrange";
-        } else {
-          return "LightCoral";
-        }
-      });
-
-    // append percentage
-    nodeEnter.append("text")
-      .attr("x", function(d) { return 0; })
-      .attr("dy", ".35em")
-      .attr("text-anchor", function(d) { return "middle"; })
-      .text(function(d) {
-        var usedCap = d.queueData.get("usedCapacity");
-        if (usedCap >= 100.0) {
-          return usedCap.toFixed(0) + "%";
-        } else {
-          return usedCap.toFixed(1) + "%";
-        }
-      })
-      .style("fill-opacity", 1e-6);
-
-    // append queue name
-    nodeEnter.append("text")
-      .attr("x", function(d) { return 40; })
-      .attr("dy", ".35em")
-      .attr("text-anchor", function(d) { return "start"; })
-      .text(function(d) { return d.name; })
-      .style("fill-opacity", 1e-6);
-
-    // Transition nodes to their new position.
-    var nodeUpdate = node.transition()
-      .duration(duration)
-      .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; });
-
-    nodeUpdate.select("circle")
-      .attr("r", 20)
-      .attr("href", 
-        function(d) {
-          return "yarnQueues/" + d.queueData.get("name");
-        })
-      .style("stroke", function(d) {
-        if (d.queueData.get("name") == this.get("selected")) {
-          return "red";
-        } else {
-          return "gray";
-        }
-      }.bind(this));
-
-    nodeUpdate.selectAll("text")
-      .style("fill-opacity", 1);
-
-    // Transition exiting nodes to the parent's new position.
-    var nodeExit = node.exit().transition()
-      .duration(duration)
-      .attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
-      .remove();
-
-    nodeExit.select("circle")
-      .attr("r", 1e-6);
-
-    nodeExit.select("text")
-      .style("fill-opacity", 1e-6);
-
-    // Update the links…
-    var link = this.mainSvg.selectAll("path.link")
-      .data(links, function(d) { return d.target.id; });
-
-    // Enter any new links at the parent's previous position.
-    link.enter().insert("path", "g")
-      .attr("class", "link")
-      .attr("d", function(d) {
-      var o = {x: source.x0, y: source.y0};
-      return diagonal({source: o, target: o});
-      });
-
-    // Transition links to their new position.
-    link.transition()
-      .duration(duration)
-      .attr("d", diagonal);
-
-    // Transition exiting nodes to the parent's new position.
-    link.exit().transition()
-      .duration(duration)
-      .attr("d", function(d) {
-      var o = {x: source.x, y: source.y};
-      return diagonal({source: o, target: o});
-      })
-      .remove();
-
-    // Stash the old positions for transition.
-    nodes.forEach(function(d) {
-      d.x0 = d.x;
-      d.y0 = d.y;
-    });
-  },
-
-  reDraw: function() {
-    this.initData();
-
-    var margin = {top: 20, right: 120, bottom: 20, left: 120};
-    var treeWidth = this.maxDepth * 200;
-    var treeHeight = this.numOfLeafQueue * 80;
-    var width = treeWidth + margin.left + margin.right;
-    var height = treeHeight + margin.top + margin.bottom;
-    var layout = { };
-
-    if (this.mainSvg) {
-      this.mainSvg.remove();
-    }
-
-    this.mainSvg = d3.select("#" + this.get("parentId")).append("svg")
-      .attr("width", width)
-      .attr("height", height)
-      .attr("class", "tree-selector")
-      .append("g")
-      .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
-
-    var tree = d3.layout.tree().size([treeHeight, treeWidth]);
-
-    var diagonal = d3.svg.diagonal()
-      .projection(function(d) { return [d.y, d.x]; });
-
-    var root = this.treeData;
-    root.x0 = height / 2;
-    root.y0 = 0;
-
-    d3.select(self.frameElement).style("height", height);
-
-    this.update(root, root, tree, diagonal);
-  },
-
-  didInsertElement: function() {
-   this.reDraw();
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js
deleted file mode 100644
index 224c65a..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/config.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * Host and port configurations
- */
-export default {
-  RM_HOST: 'localhost',
-  RM_PORT: '8088',
-  TS_HOST: 'localhost',
-  TS_PORT: '8188',
-};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js
deleted file mode 100644
index d2937a0..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/constants.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * Application level global constants go here.
- */
-export default {
-  PARAM_SEPARATOR: '!',
-};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js
deleted file mode 100644
index 3c68365..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/application.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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';
-
-/**
- * Base controller for application.
- */
-export default Ember.Controller.extend({
-  /**
-   * Output main top UI menu which is common across all pages.
-   * Menu item will be made active based on current path.
-   */
-  outputMainMenu: function(){
-    var path = this.get('currentPath');
-    var html = '<li';
-    if (path == 'yarnQueue') {
-      html = html + ' class="active"';
-    }
-    html = html + '><a href="yarnQueue/root">Queues<span class="sr-only">' +
-        '(current)</span></a></li><li';
-    if (path.lastIndexOf('yarnApp', 0) == 0) {
-      html = html + ' class="active"';
-    }
-    html = html + '><a href="yarnApps">Applications<span class="sr-only">' +
-        '(current)</span></a></li><li';
-    if (path == 'clusterOverview') {
-      html = html + ' class="active"';
-    }
-    html = html + '><a href="clusterOverview">Cluster Overview<span class=' +
-        '"sr-only">(current)</span></a></li><li';
-    if (path.lastIndexOf('yarnNode', 0) == 0) {
-      html = html + ' class="active"';
-    }
-    html = html + '><a href="yarnNodes">Nodes<span class="sr-only">' +
-        '(current)</span></a></li>';
-    return Ember.String.htmlSafe(html);
-  }.property('currentPath')
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js
deleted file mode 100644
index 5c3c825..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
-  loading: true,
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js
deleted file mode 100644
index 55ff9aa..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js
deleted file mode 100644
index b16864e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Controller.extend({
-	needReload: true,
-  selectedQueue: undefined,
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js
deleted file mode 100644
index fcf64dd..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/divide.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * 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';
-
-/**
- * Helper assumes values are numeric. num means numerator and
- * den means denominator.
- */
-export default Ember.Helper.helper(function(params,hash) {
-  var num = hash.num;
-  var den = hash.den;
-  if (den == 0) {
-    return 0;
-  }
-  return Math.floor(num/den);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js
deleted file mode 100644
index 8c29b34..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/log-files-comma.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * 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';
-
-/**
- * Represent log files as comma separated list.
- */
-export default Ember.Helper.helper(function(params,hash) {
-  var logFiles = hash.logFiles;
-  if (logFiles == null) {
-    return "";
-  }
-  var logFilesLen = logFiles.length;
-  if (logFilesLen == 0) {
-    return "";
-  }
-  var nodeId = hash.nodeId;
-  var nodeAddr = hash.nodeAddr;
-  var containerId = hash.containerId;
-  var html = '<td>';
-  var logFilesCommaSeparated = "";
-  for (var i = 0; i < logFilesLen; i++) {
-    html = html + '<a href="yarnContainerLog/' + nodeId + '/' +
-        nodeAddr + '/' + containerId + '/' + logFiles[i] + '">' + logFiles[i] +
-        '</a>';
-    if (i != logFilesLen - 1) {
-      html = html + ",";
-    }
-  }
-  html = html + '</td>';
-  return Ember.String.htmlSafe(html);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js
deleted file mode 100644
index 99d975b..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-link.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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';
-
-/**
- * Generate link to node page if its not SHUTDOWN or LOST.
- */
-export default Ember.Helper.helper(function(params,hash) {
-  var nodeState = hash.nodeState;
-  var nodeHTTPAddress = hash.nodeHTTPAddress;
-  var nodeId = hash.nodeId;
-  var html = '<td>';
-  if (nodeState == "SHUTDOWN" || nodeState == "LOST") {
-    html = html + nodeHTTPAddress;
-  } else {
-    html = html + '<a href="yarnNode/' + nodeId + "/" + nodeHTTPAddress + '">' +
-        nodeHTTPAddress + '</a>';
-  }
-  html = html + '</td>';
-  return Ember.String.htmlSafe(html);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js
deleted file mode 100644
index 589111f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/node-menu.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * 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';
-
-/**
- * Create left hand side node manager menu with menu item activated based
- * on page being accessed.
- */
-export default Ember.Helper.helper(function(params,hash) {
-  // Place a menu within a panel inside col-md-2 container.
-  var nodeIdSplitAtPort = hash.nodeId;
-  var portIndex = nodeIdSplitAtPort.indexOf(':');
-  if (portIndex != -1) {
-    nodeIdSplitAtPort = nodeIdSplitAtPort.substring(0, portIndex) +
-        ':&#8203;' + nodeIdSplitAtPort.substring(portIndex + 1);
-  }
-  var normalizedNodeId = '';
-  var splitsAlongDots = nodeIdSplitAtPort.split('.');
-  if (splitsAlongDots) {
-    var len = splitsAlongDots.length;
-    for (var i = 0; i < len; i++) {
-      normalizedNodeId = normalizedNodeId + splitsAlongDots[i];
-      if (i != len - 1) {
-        normalizedNodeId = normalizedNodeId + '.&#8203;';
-      }
-    }
-  } else {
-    normalizedNodeId = nodeIdSplitAtPort;
-  }
-
-  var html = '<div class="col-md-2 container-fluid"><div class="panel panel-default">'+
-      '<div class="panel-heading"><h4>Node Manager<br>(' + normalizedNodeId + ')</h4></div>'+
-      '<div class="panel-body"><ul class="nav nav-pills nav-stacked" id="stacked-menu">' +
-      '<ul class="nav nav-pills nav-stacked collapse in"><li';
-  if (hash.path == 'yarnNode') {
-    html = html + ' class="active"';
-  }
-  html = html + '><a href="yarnNode/' + hash.nodeId + '/' + hash.nodeAddr +
-      '">Node Information</a></li><li';
-  if (hash.path == 'yarnNodeApps') {
-    html = html + ' class="active"';
-  }
-  html = html + '><a href="yarnNodeApps/' + hash.nodeId + '/' + hash.nodeAddr +
-      '">List of Applications</a></li><li';
-  if (hash.path == 'yarnNodeContainers') {
-    html = html + ' class="active"';
-  }
-  html = html + '><a href="yarnNodeContainers/' +hash.nodeId + '/' + hash.nodeAddr +
-      '">List of Containers</a></li></ul></ul></div>';
-  return Ember.String.htmlSafe(html);
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html
deleted file mode 100644
index edc4f2e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <title>YarnUi</title>
-    <meta name="description" content="">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-
-    {{content-for 'head'}}
-
-    <link rel="stylesheet" href="assets/vendor.css">
-    <link rel="stylesheet" href="assets/yarn-ui.css">
-
-    {{content-for 'head-footer'}}
-  </head>
-  <body>
-    {{content-for 'body'}}
-
-    <script src="assets/vendor.js"></script>
-    <script src="assets/yarn-ui.js"></script>
-
-    {{content-for 'body-footer'}}
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js
deleted file mode 100644
index b1f0a88..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import DS from 'ember-data';
-
-export default DS.Model.extend({
-  startedOn: DS.attr('string'),
-  state: DS.attr('string'),
-  haState: DS.attr('string'),
-  rmStateStoreName: DS.attr('string'),
-  resourceManagerVersion: DS.attr('string'),
-  resourceManagerBuildVersion: DS.attr('string'),
-  hadoopVersion: DS.attr('string'),
-  hadoopBuildVersion: DS.attr('string'),
-  hadoopVersionBuiltOn: DS.attr('string')
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js
deleted file mode 100644
index 2dd428c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js
+++ /dev/null
@@ -1,115 +0,0 @@
-import DS from 'ember-data';
-
-export default DS.Model.extend({
-  appsSubmitted: DS.attr('number'),
-  appsCompleted: DS.attr('number'),
-  appsPending: DS.attr('number'),
-  appsRunning: DS.attr('number'),
-  appsFailed: DS.attr('number'),
-  appsKilled: DS.attr('number'),
-  reservedMB: DS.attr('number'),
-  availableMB: DS.attr('number'),
-  allocatedMB: DS.attr('number'),
-  reservedVirtualCores: DS.attr('number'),
-  availableVirtualCores: DS.attr('number'),
-  allocatedVirtualCores: DS.attr('number'),
-  containersAllocated: DS.attr('number'),
-  containersReserved: DS.attr('number'),
-  containersPending: DS.attr('number'),
-  totalMB: DS.attr('number'),
-  totalVirtualCores: DS.attr('number'),
-  totalNodes: DS.attr('number'),
-  lostNodes: DS.attr('number'),
-  unhealthyNodes: DS.attr('number'),
-  decommissionedNodes: DS.attr('number'),
-  rebootedNodes: DS.attr('number'),
-  activeNodes: DS.attr('number'),
-
-  getFinishedAppsDataForDonutChart: function() {
-    var arr = [];
-    arr.push({
-      label: "Completed",
-      value: this.get("appsCompleted")
-    });
-    arr.push({
-      label: "Killed",
-      value: this.get("appsKilled")
-    });
-    arr.push({
-      label: "Failed",
-      value: this.get("appsFailed")
-    });
-
-    return arr;
-  }.property("appsCompleted", "appsKilled", "appsFailed"),
-
-  getRunningAppsDataForDonutChart: function() {
-    var arr = [];
-
-    arr.push({
-      label: "Pending",
-      value: this.get("appsPending")
-    });
-    arr.push({
-      label: "Running",
-      value: this.get("appsRunning")
-    });
-
-    return arr;
-  }.property("appsPending", "appsRunning"),
-
-  getNodesDataForDonutChart: function() {
-    var arr = [];
-    arr.push({
-      label: "Active",
-      value: this.get("activeNodes")
-    });
-    arr.push({
-      label: "Unhealthy",
-      value: this.get("unhealthyNodes")
-    });
-    arr.push({
-      label: "Decomissioned",
-      value: this.get("decommissionedNodes")
-    });
-    return arr;
-  }.property("activeNodes", "unhealthyNodes", "decommissionedNodes"),
-
-  getMemoryDataForDonutChart: function() {
-    var type = "MB";
-    var arr = [];
-    arr.push({
-      label: "Allocated",
-      value: this.get("allocated" + type)
-    });
-    arr.push({
-      label: "Reserved",
-      value: this.get("reserved" + type)
-    });
-    arr.push({
-      label: "Available",
-      value: this.get("available" + type)
-    });
-
-    return arr;
-  }.property("allocatedMB", "reservedMB", "availableMB"),
-
-  getVCoreDataForDonutChart: function() {
-    var type = "VirtualCores";
-    var arr = [];
-    arr.push({
-      label: "Allocated",
-      value: this.get("allocated" + type)
-    });
-    arr.push({
-      label: "Reserved",
-      value: this.get("reserved" + type)
-    });
-    arr.push({
-      label: "Available",
-      value: this.get("available" + type)
-    });
-
-    return arr;
-  }.property("allocatedVirtualCores", "reservedVirtualCores", "availableVirtualCores"),
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js
deleted file mode 100644
index fcb5134..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import DS from 'ember-data';
-import Converter from 'yarn-ui/utils/converter';
-
-export default DS.Model.extend({
-  startTime: DS.attr('string'),
-  finishedTime: DS.attr('string'),
-  containerId: DS.attr('string'),
-  nodeHttpAddress: DS.attr('string'),
-  nodeId: DS.attr('string'),
-  logsLink: DS.attr('string'),
-
-  startTs: function() {
-    return Converter.dateToTimeStamp(this.get("startTime"));
-  }.property("startTime"),
-
-  finishedTs: function() {
-    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
-    return ts;
-  }.property("finishedTime"),
-
-  shortAppAttemptId: function() {
-    return "attempt_" + 
-           parseInt(Converter.containerIdToAttemptId(this.get("containerId")).split("_")[3]);
-  }.property("containerId"),
-
-  elapsedTime: function() {
-    var elapsedMs = this.get("finishedTs") - this.get("startTs");
-    if (elapsedMs <= 0) {
-      elapsedMs = Date.now() - this.get("startTs");
-    }
-
-    return Converter.msToElapsedTime(elapsedMs);
-  }.property(),
-
-  tooltipLabel: function() {
-    return "<p>Id:" + this.get("id") + 
-           "</p><p>ElapsedTime:" + 
-           String(this.get("elapsedTime")) + "</p>";
-  }.property(),
-
-  link: function() {
-    return "/yarnAppAttempt/" + this.get("id");
-  }.property(),
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
deleted file mode 100644
index fec2bd3..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import Converter from 'yarn-ui/utils/converter';
-import DS from 'ember-data';
-
-export default DS.Model.extend({
-  appName: DS.attr('string'),
-  user: DS.attr('string'),
-  queue: DS.attr('string'),
-  state: DS.attr('string'),
-  startTime: DS.attr('string'),
-  elapsedTime: DS.attr('string'),
-  finalStatus: DS.attr('string'),
-  finishedTime: DS.attr('finishedTime'),
-  progress: DS.attr('number'),
-  diagnostics: DS.attr('string'),
-  amContainerLogs: DS.attr('string'),
-  amHostHttpAddress: DS.attr('string'),
-  logAggregationStatus: DS.attr('string'),
-  unmanagedApplication: DS.attr('string'),
-  amNodeLabelExpression: DS.attr('string'),
-  applicationTags: DS.attr('string'),
-  priority: DS.attr('number'),
-  allocatedMB: DS.attr('number'),
-  allocatedVCores: DS.attr('number'),
-  runningContainers: DS.attr('number'),
-  memorySeconds: DS.attr('number'),
-  vcoreSeconds: DS.attr('number'),
-  preemptedResourceMB: DS.attr('number'),
-  preemptedResourceVCores: DS.attr('number'),
-  numNonAMContainerPreempted: DS.attr('number'),
-  numAMContainerPreempted: DS.attr('number'),
-
-  isFailed: function() {
-    return this.get('finalStatus') == "FAILED"
-  }.property("finalStatus"),
-
-  allocatedResource: function() {
-    return Converter.resourceToString(this.get("allocatedMB"), this.get("allocatedVCores"));
-  }.property("allocatedMB", "allocatedVCores"),
-
-  preemptedResource: function() {
-    return Converter.resourceToString(this.get("preemptedResourceMB"), this.get("preemptedResourceVCores"));
-  }.property("preemptedResourceMB", "preemptedResourceVCores"),
-
-  aggregatedResourceUsage: function() {
-    return Converter.resourceToString(this.get("memorySeconds"), this.get("vcoreSeconds")) + " (× Secs)";
-  }.property("memorySeconds", "vcoreSeconds"),
-
-  progressStyle: function() {
-    return "width: " + this.get("progress") + "%";
-  }.property("progress"),
-
-  finalStatusStyle: function() {
-    var style = "default";
-    var finalStatus = this.get("finalStatus");
-    if (finalStatus == "KILLED") {
-      style = "warning";
-    } else if (finalStatus == "FAILED") {
-      style = "danger";
-    } else {
-      style = "success";
-    }
-
-    return "label label-" + style;
-  }.property("finalStatus")
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js
deleted file mode 100644
index 31cf61e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container-log.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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({
-  logs: DS.attr('string'),
-  containerID: DS.attr('string'),
-  logFileName: DS.attr('string')
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js
deleted file mode 100644
index f7977be..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import DS from 'ember-data';
-import Converter from 'yarn-ui/utils/converter';
-
-export default DS.Model.extend({
-  allocatedMB: DS.attr('number'),
-  allocatedVCores: DS.attr('number'),
-  assignedNodeId: DS.attr('string'),
-  priority: DS.attr('number'),
-  startedTime: DS.attr('number'),
-  finishedTime: DS.attr('number'),
-  logUrl: DS.attr('string'),
-  containerExitStatus: DS.attr('number'),
-  containerState: DS.attr('string'),
-  nodeHttpAddress: DS.attr('string'),
-
-  startTs: function() {
-    return Converter.dateToTimeStamp(this.get("startedTime"));
-  }.property("startedTime"),
-
-  finishedTs: function() {
-    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
-    return ts;
-  }.property("finishedTime"),
-
-  elapsedTime: function() {
-    var elapsedMs = this.get("finishedTs") - this.get("startTs");
-    if (elapsedMs <= 0) {
-      elapsedMs = Date.now() - this.get("startTs");
-    }
-
-    return Converter.msToElapsedTime(elapsedMs);
-  }.property(),
-
-  tooltipLabel: function() {
-    return "<p>Id:" + this.get("id") + 
-           "</p><p>ElapsedTime:" + 
-           String(this.get("elapsedTime")) + "</p>";
-  }.property(),
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js
deleted file mode 100644
index 6dc69ae..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-app.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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({
-  appId: DS.attr('string'),
-  state: DS.attr('string'),
-  user: DS.attr('string'),
-  containers: DS.attr('array'),
-  /**
-   * Indicates no rows were retrieved from backend
-   */
-  isDummyApp: function() {
-    return this.get('id') == "dummy";
-  }.property("id"),
-
-  appStateStyle: function() {
-    var style = "default";
-    var appState = this.get("state");
-    if (appState == "RUNNING" || appState == "FINISHING_CONTAINERS_WAIT" ||
-        appState == "APPLICATION_RESOURCES_CLEANINGUP") {
-      style = "primary";
-    } else if (appState == "FINISHED") {
-      style = "success";
-    }
-    return "label label-" + style;
-  }.property("state")
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js
deleted file mode 100644
index 3ba3216..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node-container.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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({
-  containerId: DS.attr('string'),
-  state: DS.attr('string'),
-  user: DS.attr('string'),
-  exitCode: DS.attr('string'),
-  diagnostics: DS.attr('string'),
-  totalMemoryNeeded: DS.attr('number'),
-  totalVCoresNeeded: DS.attr('number'),
-  containerLogFiles: DS.attr('array'),
-
-  /**
-   * Indicates that there was no container retrieved from backend.
-   */
-  isDummyContainer: function() {
-    return this.get('id') == "dummy";
-  }.property("id"),
-
-  containerStateStyle: function() {
-    var style = "primary";
-    var containerState = this.get('state');
-    var containerExitCode = this.get('exitCode');
-    if (containerState == "DONE") {
-      if (containerExitCode == "0") {
-        style = "success";
-      } else if (containerExitCode != "N/A") {
-        style = "danger";
-      }
-    }
-    if (containerState == "EXITED_WITH_SUCCESS") {
-      style = "success";
-    }
-    if (containerState == "EXITED_WITH_FAILURE") {
-      style = "danger";
-    }
-    return "label label-" + style;
-  }.property("state", "exitCode")
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js
deleted file mode 100644
index 4753983..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-node.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * 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({
-  totalVmemAllocatedContainersMB: DS.attr('number'),
-  totalPmemAllocatedContainersMB: DS.attr('number'),
-  totalVCoresAllocatedContainers: DS.attr('number'),
-  vmemCheckEnabled: DS.attr('boolean'),
-  pmemCheckEnabled: DS.attr('boolean'),
-  nodeHealthy: DS.attr('boolean'),
-  lastNodeUpdateTime: DS.attr('string'),
-  healthReport: DS.attr('string'),
-  nmStartupTime: DS.attr('string'),
-  nodeManagerBuildVersion: DS.attr('string'),
-  hadoopBuildVersion: DS.attr('string'),
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js
deleted file mode 100644
index 5b91d70..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js
+++ /dev/null
@@ -1,76 +0,0 @@
-import DS from 'ember-data';
-
-export default DS.Model.extend({
-  name: DS.attr('string'),
-  children: DS.attr('array'),
-  parent: DS.attr('string'),
-  capacity: DS.attr('number'),
-  maxCapacity: DS.attr('number'),
-  usedCapacity: DS.attr('number'),
-  absCapacity: DS.attr('number'),
-  absMaxCapacity: DS.attr('number'),
-  absUsedCapacity: DS.attr('number'),
-  state: DS.attr('string'),
-  userLimit: DS.attr('number'),
-  userLimitFactor: DS.attr('number'),
-  preemptionDisabled: DS.attr('number'),
-  numPendingApplications: DS.attr('number'),
-  numActiveApplications: DS.attr('number'),
-  users: DS.hasMany('YarnUser'),
-
-  isLeafQueue: function() {
-    var len = this.get("children.length");
-    if (!len) {
-      return true;
-    }
-    return len <= 0;
-  }.property("children"),
-
-  capacitiesBarChartData: function() {
-    return [
-      {
-        label: "Absolute Capacity",
-        value: this.get("name") == "root" ? 100 : this.get("absCapacity")
-      },
-      {
-        label: "Absolute Used",
-        value: this.get("name") == "root" ? this.get("usedCapacity") : this.get("absUsedCapacity")
-      },
-      {
-        label: "Absolute Max Capacity",
-        value: this.get("name") == "root" ? 100 : this.get("absMaxCapacity")
-      }
-    ]
-  }.property("absCapacity", "absUsedCapacity", "absMaxCapacity"),
-
-  userUsagesDonutChartData: function() {
-    var data = [];
-    if (this.get("users")) {
-      this.get("users").forEach(function(o) {
-        data.push({
-          label: o.get("name"),
-          value: o.get("usedMemoryMB")
-        })
-      });
-    }
-
-    return data;
-  }.property("users"),
-
-  hasUserUsages: function() {
-    return this.get("userUsagesDonutChartData").length > 0;
-  }.property(),
-
-  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(),
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js
deleted file mode 100644
index 9a1082c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-rm-node.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * 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({
-  rack: DS.attr('string'),
-  state: DS.attr('string'),
-  nodeHostName: DS.attr('string'),
-  nodeHTTPAddress: DS.attr('string'),
-  lastHealthUpdate: DS.attr('string'),
-  healthReport: DS.attr('string'),
-  numContainers: DS.attr('number'),
-  usedMemoryMB: DS.attr('number'),
-  availMemoryMB: DS.attr('number'),
-  usedVirtualCores: DS.attr('number'),
-  availableVirtualCores: DS.attr('number'),
-  version: DS.attr('string'),
-  nodeLabels: DS.attr('array'),
-
-  nodeLabelsAsString: function() {
-    var labels = this.get("nodeLabels");
-    var labelToReturn = "";
-    // Only one label per node supported.
-    if (labels && labels.length > 0) {
-      labelToReturn = labels[0];
-    }
-    return labelToReturn;
-  }.property("nodeLabels"),
-
-  /**
-   * Indicates no rows were retrieved from backend
-   */
-  isDummyNode: function() {
-    return this.get('id') == "dummy";
-  }.property("id"),
-
-  nodeStateStyle: function() {
-    var style = "default";
-    var nodeState = this.get("state");
-    if (nodeState == "REBOOTED") {
-      style = "warning";
-    } else if (nodeState == "UNHEALTHY" || nodeState == "DECOMMISSIONED" ||
-          nodeState == "LOST" || nodeState == "SHUTDOWN") {
-      style = "danger";
-    } else if (nodeState == "RUNNING") {
-      style = "success";
-    }
-    return "label label-" + style;
-  }.property("state"),
-
-  getMemoryDataForDonutChart: function() {
-    var arr = [];
-    arr.push({
-      label: "Used",
-      value: this.get("usedMemoryMB")
-    });
-    arr.push({
-      label: "Available",
-      value: this.get("availMemoryMB")
-    });
-    return arr;
-  }.property("availMemoryMB", "usedMemoryMB"),
-
-  getVCoreDataForDonutChart: function() {
-    var arr = [];
-    arr.push({
-      label: "Used",
-      value: this.get("usedVirtualCores")
-    });
-    arr.push({
-      label: "Available",
-      value: this.get("availableVirtualCores")
-    });
-    return arr;
-  }.property("availableVirtualCores", "usedVirtualCores"),
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js
deleted file mode 100644
index 6e9c03c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import DS from 'ember-data';
-
-export default DS.Model.extend({
-  name: DS.attr('string'),
-  queueName: DS.attr('string'),
-  usedMemoryMB: DS.attr('number'),
-  usedVCore: DS.attr('number')
-})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
deleted file mode 100644
index 5db083e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import Ember from 'ember';
-import config from './config/environment';
-
-var Router = Ember.Router.extend({
-  location: config.locationType
-});
-
-Router.map(function() {
-  this.route('yarnApps');
-  this.route('yarnNodes');
-  this.route('yarnNode', { path: '/yarnNode/:node_id/:node_addr' });
-  this.route('yarnNodeApps', { path: '/yarnNodeApps/:node_id/:node_addr' });
-  this.route('yarnNodeApp',
-      { path: '/yarnNodeApp/:node_id/:node_addr/:app_id' });
-  this.route('yarnNodeContainers',
-      { path: '/yarnNodeContainers/:node_id/:node_addr' });
-  this.route('yarnNodeContainer',
-      { path: '/yarnNodeContainer/:node_id/:node_addr/:container_id' });
-  this.route('yarnContainerLog', { path:
-      '/yarnContainerLog/:node_id/:node_addr/:container_id/:filename' });
-  this.route('yarnQueue', { path: '/yarnQueue/:queue_name' });
-  this.route('clusterOverview');
-  this.route('yarnApp', { path: '/yarnApp/:app_id' });
-  this.route('yarnAppAttempt', { path: '/yarnAppAttempt/:app_attempt_id'});
-  this.route('error');
-  this.route('notfound', { path: '*:' });
-});
-
-export default Router;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js
deleted file mode 100644
index b7a5754..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/application.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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({
-  actions: {
-    /**
-     * Base error handler for the application.
-     * If specific routes do not handle the error, it will bubble up to
-     * this handler. Here we redirect to either 404 page or a generic
-     * error handler page.
-     */
-    error: function (error) {
-      if (error && error.errors[0] &&
-          error.errors[0].status == 404) {
-        this.intermediateTransitionTo('/notfound');
-      } else {
-        this.intermediateTransitionTo('/error');
-      }
-    }
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js
deleted file mode 100644
index 4ba5dcd..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Route.extend({
-  model() {
-    return this.store.findAll('ClusterMetric');
-  },
-
-  afterModel() {
-    this.controllerFor("ClusterOverview").set("loading", false);
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js
deleted file mode 100644
index b228ff4..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/index.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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({
-  /**
-   * Redirect root URL to cluster overview page.
-   */
-  beforeModel: function() {
-    this.replaceWith('clusterOverview');
-  }
-});
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js
deleted file mode 100644
index 3b6adc7..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Route.extend({
-  model(param) {
-    return Ember.RSVP.hash({
-      attempt: this.store.findRecord('yarnAppAttempt', param.app_attempt_id),
-      
-      rmContainers: this.store.query('yarnContainer', 
-        {
-          app_attempt_id: param.app_attempt_id,
-          is_rm: true
-        }),
-      
-      tsContainers: this.store.query('yarnContainer', 
-        {
-          app_attempt_id: param.app_attempt_id,
-          is_rm: false
-        }),
-    });
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js
deleted file mode 100644
index 03092aa..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Route.extend({
-  model(param) {
-    return Ember.RSVP.hash({
-      app: this.store.find('yarnApp', param.app_id),
-      attempts: this.store.query('yarnAppAttempt', { appId: param.app_id})
-    });
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
deleted file mode 100644
index 2787f5b..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Route.extend({
-  model() {
-    var apps = this.store.findAll('yarnApp');
-    return apps;
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js
deleted file mode 100644
index c324025..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-container-log.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * 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 Constants from 'yarn-ui/constants';
-
-export default Ember.Route.extend({
-  model(param) {
-    var id = param.node_addr + Constants.PARAM_SEPARATOR + param.container_id +
-        Constants.PARAM_SEPARATOR + param.filename;
-    return Ember.RSVP.hash({
-      containerLog: this.store.findRecord('yarnContainerLog', id),
-      nodeInfo: { id: param.node_id, addr: param.node_addr }
-    }).then(function(hash) {
-      // Just return as its success.
-      return hash;
-    }, function(reason) {
-      if (reason.errors && reason.errors[0]) {
-        // This means HTTP error response was sent by adapter.
-        return reason;
-      } else {
-        // Assume empty response received from server.
-        return { nodeInfo: { id: param.node_id, addr: param.node_addr },
-            containerLog: { logs: "", containerID: param.container_id,
-                logFileName: param.filename}};
-      }
-    });
-  },
-
-  afterModel(model) {
-    // Handle errors and redirect if promise is rejected.
-    if (model.errors && model.errors[0]) {
-      if (model.errors[0].status == 404) {
-        this.replaceWith('/notfound');
-      } else {
-        this.replaceWith('/error');
-      }
-    }
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js
deleted file mode 100644
index 63b1f2a..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-app.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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({
-      nodeApp: this.store.queryRecord('yarnNodeApp',
-          { nodeAddr : param.node_addr, appId: param.app_id }),
-      nodeInfo: { id: param.node_id, addr: param.node_addr }
-    });
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js
deleted file mode 100644
index ffb5b7b..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-apps.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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) {
-    // Get all apps running on a specific node. Node is contacted by using node_addr.
-    return Ember.RSVP.hash({
-      apps: this.store.query('yarnNodeApp', { nodeAddr: param.node_addr }),
-      nodeInfo: { id: param.node_id, addr: param.node_addr }
-    });
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js
deleted file mode 100644
index 2022662..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-container.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * 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) {
-    // Get a specific container running on a specific node.
-    return Ember.RSVP.hash({
-      nodeContainer: this.store.queryRecord('yarnNodeContainer',
-          { nodeHttpAddr: param.node_addr, containerId: param.container_id }),
-      nodeInfo: { id: param.node_id, addr: param.node_addr }
-    });
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js
deleted file mode 100644
index 9a69729..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node-containers.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * 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) {
-    // Get all containers running on specific node.
-    return Ember.RSVP.hash({
-      containers: this.store.query('yarnNodeContainer', { nodeHttpAddr: param.node_addr }),
-      nodeInfo: { id: param.node_id, addr: param.node_addr }
-    });
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js
deleted file mode 100644
index 7c58b94..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-node.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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) {
-    // Fetches data from both NM and RM. RM is queried to get node usage info.
-    return Ember.RSVP.hash({
-      node: this.store.findRecord('yarnNode', param.node_addr),
-      rmNode: this.store.findRecord('yarnRmNode', param.node_id)
-    });
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js
deleted file mode 100644
index f33eef8..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-nodes.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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('yarnRmNode');
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js
deleted file mode 100644
index 9396bac..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js
+++ /dev/null
@@ -1,20 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js
deleted file mode 100644
index 9be90b1..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js
deleted file mode 100644
index 0f6c572..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js
+++ /dev/null
@@ -1,7 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js
deleted file mode 100644
index cc936cb..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js
+++ /dev/null
@@ -1,29 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js
deleted file mode 100644
index d39885e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-metric.js
+++ /dev/null
@@ -1,29 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js
deleted file mode 100644
index c5394d0..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app-attempt.js
+++ /dev/null
@@ -1,49 +0,0 @@
-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


[19/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)


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

Branch: refs/heads/YARN-3368
Commit: e35bf0f2d09877856bbce29bd28c9ba5e81121cc
Parents: b61c2ef
Author: Wangda Tan <wa...@apache.org>
Authored: Mon Mar 21 14:03:13 2016 -0700
Committer: Wangda Tan <wa...@apache.org>
Committed: Fri Apr 8 10:48:56 2016 -0700

----------------------------------------------------------------------
 .gitignore                                      |  13 +
 BUILDING.txt                                    |   4 +-
 LICENSE.txt                                     |  80 +++++
 dev-support/docker/Dockerfile                   |   5 +
 .../src/site/markdown/YarnUI2.md                |  40 +++
 .../hadoop-yarn/hadoop-yarn-ui/.bowerrc         |   4 -
 .../hadoop-yarn/hadoop-yarn-ui/.editorconfig    |  34 ---
 .../hadoop-yarn/hadoop-yarn-ui/.ember-cli       |  11 -
 .../hadoop-yarn/hadoop-yarn-ui/.gitignore       |  17 --
 .../hadoop-yarn/hadoop-yarn-ui/.jshintrc        |  32 --
 .../hadoop-yarn/hadoop-yarn-ui/.travis.yml      |  23 --
 .../hadoop-yarn/hadoop-yarn-ui/.watchmanconfig  |   3 -
 .../hadoop-yarn/hadoop-yarn-ui/README.md        |  24 --
 .../hadoop-yarn-ui/app/adapters/cluster-info.js |  20 --
 .../app/adapters/cluster-metric.js              |  20 --
 .../app/adapters/yarn-app-attempt.js            |  32 --
 .../hadoop-yarn-ui/app/adapters/yarn-app.js     |  26 --
 .../app/adapters/yarn-container-log.js          |  74 -----
 .../app/adapters/yarn-container.js              |  43 ---
 .../app/adapters/yarn-node-app.js               |  63 ----
 .../app/adapters/yarn-node-container.js         |  64 ----
 .../hadoop-yarn-ui/app/adapters/yarn-node.js    |  40 ---
 .../hadoop-yarn-ui/app/adapters/yarn-queue.js   |  20 --
 .../hadoop-yarn-ui/app/adapters/yarn-rm-node.js |  45 ---
 .../hadoop-yarn/hadoop-yarn-ui/app/app.js       |  20 --
 .../hadoop-yarn-ui/app/components/.gitkeep      |   0
 .../app/components/app-attempt-table.js         |   4 -
 .../hadoop-yarn-ui/app/components/app-table.js  |   4 -
 .../hadoop-yarn-ui/app/components/bar-chart.js  | 104 -------
 .../app/components/base-chart-component.js      | 109 -------
 .../app/components/container-table.js           |   4 -
 .../app/components/donut-chart.js               | 148 ----------
 .../app/components/item-selector.js             |  21 --
 .../app/components/queue-configuration-table.js |   4 -
 .../app/components/queue-navigator.js           |   4 -
 .../hadoop-yarn-ui/app/components/queue-view.js | 272 -----------------
 .../app/components/simple-table.js              |  58 ----
 .../app/components/timeline-view.js             | 250 ----------------
 .../app/components/tree-selector.js             | 257 ----------------
 .../hadoop-yarn/hadoop-yarn-ui/app/config.js    |  27 --
 .../hadoop-yarn/hadoop-yarn-ui/app/constants.js |  24 --
 .../hadoop-yarn-ui/app/controllers/.gitkeep     |   0
 .../app/controllers/application.js              |  55 ----
 .../app/controllers/cluster-overview.js         |   5 -
 .../hadoop-yarn-ui/app/controllers/yarn-apps.js |   4 -
 .../app/controllers/yarn-queue.js               |   6 -
 .../hadoop-yarn-ui/app/helpers/.gitkeep         |   0
 .../hadoop-yarn-ui/app/helpers/divide.js        |  31 --
 .../app/helpers/log-files-comma.js              |  48 ---
 .../hadoop-yarn-ui/app/helpers/node-link.js     |  37 ---
 .../hadoop-yarn-ui/app/helpers/node-menu.js     |  66 -----
 .../hadoop-yarn/hadoop-yarn-ui/app/index.html   |  25 --
 .../hadoop-yarn-ui/app/models/.gitkeep          |   0
 .../hadoop-yarn-ui/app/models/cluster-info.js   |  13 -
 .../hadoop-yarn-ui/app/models/cluster-metric.js | 115 --------
 .../app/models/yarn-app-attempt.js              |  44 ---
 .../hadoop-yarn-ui/app/models/yarn-app.js       |  65 -----
 .../app/models/yarn-container-log.js            |  25 --
 .../hadoop-yarn-ui/app/models/yarn-container.js |  39 ---
 .../hadoop-yarn-ui/app/models/yarn-node-app.js  |  44 ---
 .../app/models/yarn-node-container.js           |  57 ----
 .../hadoop-yarn-ui/app/models/yarn-node.js      |  33 ---
 .../hadoop-yarn-ui/app/models/yarn-queue.js     |  76 -----
 .../hadoop-yarn-ui/app/models/yarn-rm-node.js   |  92 ------
 .../hadoop-yarn-ui/app/models/yarn-user.js      |   8 -
 .../hadoop-yarn/hadoop-yarn-ui/app/router.js    |  29 --
 .../hadoop-yarn-ui/app/routes/.gitkeep          |   0
 .../hadoop-yarn-ui/app/routes/application.js    |  38 ---
 .../app/routes/cluster-overview.js              |  11 -
 .../hadoop-yarn-ui/app/routes/index.js          |  29 --
 .../app/routes/yarn-app-attempt.js              |  21 --
 .../hadoop-yarn-ui/app/routes/yarn-app.js       |  10 -
 .../hadoop-yarn-ui/app/routes/yarn-apps.js      |   8 -
 .../app/routes/yarn-container-log.js            |  55 ----
 .../hadoop-yarn-ui/app/routes/yarn-node-app.js  |  29 --
 .../hadoop-yarn-ui/app/routes/yarn-node-apps.js |  29 --
 .../app/routes/yarn-node-container.js           |  30 --
 .../app/routes/yarn-node-containers.js          |  28 --
 .../hadoop-yarn-ui/app/routes/yarn-node.js      |  29 --
 .../hadoop-yarn-ui/app/routes/yarn-nodes.js     |  25 --
 .../hadoop-yarn-ui/app/routes/yarn-queue.js     |  20 --
 .../app/routes/yarn-queues/index.js             |   5 -
 .../app/routes/yarn-queues/queues-selector.js   |   7 -
 .../app/serializers/cluster-info.js             |  29 --
 .../app/serializers/cluster-metric.js           |  29 --
 .../app/serializers/yarn-app-attempt.js         |  49 ----
 .../hadoop-yarn-ui/app/serializers/yarn-app.js  |  66 -----
 .../app/serializers/yarn-container-log.js       |  39 ---
 .../app/serializers/yarn-container.js           |  54 ----
 .../app/serializers/yarn-node-app.js            |  86 ------
 .../app/serializers/yarn-node-container.js      |  74 -----
 .../hadoop-yarn-ui/app/serializers/yarn-node.js |  56 ----
 .../app/serializers/yarn-queue.js               | 127 --------
 .../app/serializers/yarn-rm-node.js             |  77 -----
 .../hadoop-yarn-ui/app/styles/app.css           | 141 ---------
 .../app/templates/application.hbs               |  23 --
 .../app/templates/cluster-overview.hbs          |  56 ----
 .../app/templates/components/.gitkeep           |   0
 .../templates/components/app-attempt-table.hbs  |  28 --
 .../app/templates/components/app-table.hbs      |  62 ----
 .../templates/components/container-table.hbs    |  36 ---
 .../components/queue-configuration-table.hbs    |  40 ---
 .../templates/components/queue-navigator.hbs    |  18 --
 .../app/templates/components/timeline-view.hbs  |  35 ---
 .../hadoop-yarn-ui/app/templates/error.hbs      |  19 --
 .../hadoop-yarn-ui/app/templates/notfound.hbs   |  20 --
 .../app/templates/yarn-app-attempt.hbs          |  12 -
 .../hadoop-yarn-ui/app/templates/yarn-app.hbs   | 145 ----------
 .../hadoop-yarn-ui/app/templates/yarn-apps.hbs  |   3 -
 .../app/templates/yarn-container-log.hbs        |  36 ---
 .../app/templates/yarn-node-app.hbs             |  60 ----
 .../app/templates/yarn-node-apps.hbs            |  51 ----
 .../app/templates/yarn-node-container.hbs       |  70 -----
 .../app/templates/yarn-node-containers.hbs      |  58 ----
 .../hadoop-yarn-ui/app/templates/yarn-node.hbs  |  94 ------
 .../hadoop-yarn-ui/app/templates/yarn-nodes.hbs |  65 -----
 .../hadoop-yarn-ui/app/templates/yarn-queue.hbs |  48 ---
 .../hadoop-yarn-ui/app/utils/converter.js       |  91 ------
 .../hadoop-yarn-ui/app/utils/sorter.js          |  55 ----
 .../hadoop-yarn/hadoop-yarn-ui/bower.json       |  22 --
 .../hadoop-yarn-ui/config/environment.js        |  46 ---
 .../hadoop-yarn-ui/ember-cli-build.js           |  29 --
 .../hadoop-yarn/hadoop-yarn-ui/jsconfig.json    |   6 -
 .../hadoop-yarn/hadoop-yarn-ui/package.json     |  44 ---
 .../hadoop-yarn/hadoop-yarn-ui/pom.xml          | 230 +++++++++++++++
 .../hadoop-yarn-ui/public/robots.txt            |   3 -
 .../src/main/resources/META-INF/NOTICE.txt      |  10 +
 .../src/main/webapp/WEB-INF/web.xml             |  25 ++
 .../main/webapp/app/adapters/cluster-info.js    |  38 +++
 .../main/webapp/app/adapters/cluster-metric.js  |  38 +++
 .../webapp/app/adapters/yarn-app-attempt.js     |  50 ++++
 .../src/main/webapp/app/adapters/yarn-app.js    |  44 +++
 .../webapp/app/adapters/yarn-container-log.js   |  74 +++++
 .../main/webapp/app/adapters/yarn-container.js  |  61 ++++
 .../main/webapp/app/adapters/yarn-node-app.js   |  63 ++++
 .../webapp/app/adapters/yarn-node-container.js  |  64 ++++
 .../src/main/webapp/app/adapters/yarn-node.js   |  40 +++
 .../src/main/webapp/app/adapters/yarn-queue.js  |  38 +++
 .../main/webapp/app/adapters/yarn-rm-node.js    |  45 +++
 .../hadoop-yarn-ui/src/main/webapp/app/app.js   |  38 +++
 .../webapp/app/components/app-attempt-table.js  |  22 ++
 .../src/main/webapp/app/components/app-table.js |  22 ++
 .../src/main/webapp/app/components/bar-chart.js | 122 ++++++++
 .../app/components/base-chart-component.js      | 127 ++++++++
 .../webapp/app/components/container-table.js    |  22 ++
 .../main/webapp/app/components/donut-chart.js   | 166 +++++++++++
 .../main/webapp/app/components/item-selector.js |  39 +++
 .../app/components/queue-configuration-table.js |  22 ++
 .../webapp/app/components/queue-navigator.js    |  22 ++
 .../main/webapp/app/components/queue-view.js    | 290 +++++++++++++++++++
 .../main/webapp/app/components/simple-table.js  |  76 +++++
 .../main/webapp/app/components/timeline-view.js | 268 +++++++++++++++++
 .../main/webapp/app/components/tree-selector.js | 275 ++++++++++++++++++
 .../src/main/webapp/app/config.js               |  27 ++
 .../src/main/webapp/app/constants.js            |  24 ++
 .../main/webapp/app/controllers/application.js  |  55 ++++
 .../webapp/app/controllers/cluster-overview.js  |  23 ++
 .../main/webapp/app/controllers/yarn-apps.js    |  22 ++
 .../main/webapp/app/controllers/yarn-queue.js   |  24 ++
 .../src/main/webapp/app/helpers/divide.js       |  31 ++
 .../main/webapp/app/helpers/log-files-comma.js  |  48 +++
 .../src/main/webapp/app/helpers/node-link.js    |  37 +++
 .../src/main/webapp/app/helpers/node-menu.js    |  66 +++++
 .../src/main/webapp/app/index.html              |  43 +++
 .../src/main/webapp/app/models/cluster-info.js  |  31 ++
 .../main/webapp/app/models/cluster-metric.js    | 133 +++++++++
 .../main/webapp/app/models/yarn-app-attempt.js  |  62 ++++
 .../src/main/webapp/app/models/yarn-app.js      |  83 ++++++
 .../webapp/app/models/yarn-container-log.js     |  25 ++
 .../main/webapp/app/models/yarn-container.js    |  57 ++++
 .../src/main/webapp/app/models/yarn-node-app.js |  44 +++
 .../webapp/app/models/yarn-node-container.js    |  57 ++++
 .../src/main/webapp/app/models/yarn-node.js     |  33 +++
 .../src/main/webapp/app/models/yarn-queue.js    |  94 ++++++
 .../src/main/webapp/app/models/yarn-rm-node.js  |  92 ++++++
 .../src/main/webapp/app/models/yarn-user.js     |  26 ++
 .../src/main/webapp/app/router.js               |  47 +++
 .../src/main/webapp/app/routes/application.js   |  38 +++
 .../main/webapp/app/routes/cluster-overview.js  |  29 ++
 .../src/main/webapp/app/routes/index.js         |  29 ++
 .../main/webapp/app/routes/yarn-app-attempt.js  |  39 +++
 .../src/main/webapp/app/routes/yarn-app.js      |  28 ++
 .../src/main/webapp/app/routes/yarn-apps.js     |  26 ++
 .../webapp/app/routes/yarn-container-log.js     |  55 ++++
 .../src/main/webapp/app/routes/yarn-node-app.js |  29 ++
 .../main/webapp/app/routes/yarn-node-apps.js    |  29 ++
 .../webapp/app/routes/yarn-node-container.js    |  30 ++
 .../webapp/app/routes/yarn-node-containers.js   |  28 ++
 .../src/main/webapp/app/routes/yarn-node.js     |  29 ++
 .../src/main/webapp/app/routes/yarn-nodes.js    |  25 ++
 .../src/main/webapp/app/routes/yarn-queue.js    |  38 +++
 .../main/webapp/app/routes/yarn-queues/index.js |  23 ++
 .../app/routes/yarn-queues/queues-selector.js   |  25 ++
 .../main/webapp/app/serializers/cluster-info.js |  47 +++
 .../webapp/app/serializers/cluster-metric.js    |  47 +++
 .../webapp/app/serializers/yarn-app-attempt.js  |  67 +++++
 .../src/main/webapp/app/serializers/yarn-app.js |  84 ++++++
 .../app/serializers/yarn-container-log.js       |  39 +++
 .../webapp/app/serializers/yarn-container.js    |  72 +++++
 .../webapp/app/serializers/yarn-node-app.js     |  86 ++++++
 .../app/serializers/yarn-node-container.js      |  74 +++++
 .../main/webapp/app/serializers/yarn-node.js    |  56 ++++
 .../main/webapp/app/serializers/yarn-queue.js   | 145 ++++++++++
 .../main/webapp/app/serializers/yarn-rm-node.js |  77 +++++
 .../src/main/webapp/app/styles/app.css          | 159 ++++++++++
 .../main/webapp/app/templates/application.hbs   |  41 +++
 .../webapp/app/templates/cluster-overview.hbs   |  74 +++++
 .../templates/components/app-attempt-table.hbs  |  46 +++
 .../app/templates/components/app-table.hbs      |  80 +++++
 .../templates/components/container-table.hbs    |  54 ++++
 .../components/queue-configuration-table.hbs    |  58 ++++
 .../templates/components/queue-navigator.hbs    |  36 +++
 .../app/templates/components/timeline-view.hbs  |  53 ++++
 .../src/main/webapp/app/templates/error.hbs     |  19 ++
 .../src/main/webapp/app/templates/notfound.hbs  |  20 ++
 .../webapp/app/templates/yarn-app-attempt.hbs   |  30 ++
 .../src/main/webapp/app/templates/yarn-app.hbs  | 163 +++++++++++
 .../src/main/webapp/app/templates/yarn-apps.hbs |  21 ++
 .../webapp/app/templates/yarn-container-log.hbs |  36 +++
 .../main/webapp/app/templates/yarn-node-app.hbs |  60 ++++
 .../webapp/app/templates/yarn-node-apps.hbs     |  51 ++++
 .../app/templates/yarn-node-container.hbs       |  70 +++++
 .../app/templates/yarn-node-containers.hbs      |  58 ++++
 .../src/main/webapp/app/templates/yarn-node.hbs |  94 ++++++
 .../main/webapp/app/templates/yarn-nodes.hbs    |  65 +++++
 .../main/webapp/app/templates/yarn-queue.hbs    |  66 +++++
 .../src/main/webapp/app/utils/converter.js      | 109 +++++++
 .../src/main/webapp/app/utils/sorter.js         |  73 +++++
 .../hadoop-yarn-ui/src/main/webapp/bower.json   |  22 ++
 .../src/main/webapp/config/environment.js       |  65 +++++
 .../src/main/webapp/ember-cli-build.js          |  47 +++
 .../src/main/webapp/jsconfig.json               |   6 +
 .../hadoop-yarn-ui/src/main/webapp/package.json |  44 +++
 .../assets/images/datatables/Sorting icons.psd  | Bin 0 -> 27490 bytes
 .../public/assets/images/datatables/favicon.ico | Bin 0 -> 894 bytes
 .../assets/images/datatables/sort_asc.png       | Bin 0 -> 160 bytes
 .../images/datatables/sort_asc_disabled.png     | Bin 0 -> 148 bytes
 .../assets/images/datatables/sort_both.png      | Bin 0 -> 201 bytes
 .../assets/images/datatables/sort_desc.png      | Bin 0 -> 158 bytes
 .../images/datatables/sort_desc_disabled.png    | Bin 0 -> 146 bytes
 .../src/main/webapp/public/crossdomain.xml      |  34 +++
 .../hadoop-yarn-ui/src/main/webapp/testem.json  |  12 +
 .../src/main/webapp/tests/.jshintrc             |  52 ++++
 .../src/main/webapp/tests/helpers/resolver.js   |  29 ++
 .../src/main/webapp/tests/helpers/start-app.js  |  36 +++
 .../src/main/webapp/tests/index.html            |  51 ++++
 .../src/main/webapp/tests/test-helper.js        |  24 ++
 .../webapp/tests/unit/adapters/yarn-app-test.js |  30 ++
 .../unit/adapters/yarn-container-log-test.js    |  73 +++++
 .../tests/unit/adapters/yarn-node-app-test.js   |  93 ++++++
 .../unit/adapters/yarn-node-container-test.js   |  93 ++++++
 .../tests/unit/adapters/yarn-node-test.js       |  42 +++
 .../tests/unit/adapters/yarn-rm-node-test.js    |  44 +++
 .../tests/unit/controllers/yarn-apps-test.js    |  30 ++
 .../tests/unit/controllers/yarn-queues-test.js  |  30 ++
 .../webapp/tests/unit/mixins/charts-test.js     |  30 ++
 .../webapp/tests/unit/models/yarn-app-test.js   |  30 ++
 .../unit/models/yarn-container-log-test.js      |  48 +++
 .../tests/unit/models/yarn-node-app-test.js     |  65 +++++
 .../unit/models/yarn-node-container-test.js     |  78 +++++
 .../webapp/tests/unit/models/yarn-node-test.js  |  58 ++++
 .../tests/unit/models/yarn-rm-node-test.js      |  95 ++++++
 .../webapp/tests/unit/routes/yarn-apps-test.js  |  29 ++
 .../unit/routes/yarn-container-log-test.js      | 120 ++++++++
 .../tests/unit/routes/yarn-node-app-test.js     |  56 ++++
 .../tests/unit/routes/yarn-node-apps-test.js    |  60 ++++
 .../unit/routes/yarn-node-container-test.js     |  61 ++++
 .../unit/routes/yarn-node-containers-test.js    |  68 +++++
 .../webapp/tests/unit/routes/yarn-node-test.js  |  84 ++++++
 .../webapp/tests/unit/routes/yarn-nodes-test.js |  74 +++++
 .../tests/unit/serializers/yarn-app-test.js     |  33 +++
 .../unit/serializers/yarn-container-log-test.js |  49 ++++
 .../unit/serializers/yarn-node-app-test.js      | 102 +++++++
 .../serializers/yarn-node-container-test.js     | 128 ++++++++
 .../tests/unit/serializers/yarn-node-test.js    |  69 +++++
 .../tests/unit/serializers/yarn-rm-node-test.js | 153 ++++++++++
 .../webapp/tests/unit/utils/converter-test.js   |  52 ++++
 .../main/webapp/tests/unit/utils/sorter-test.js |  26 ++
 .../hadoop-yarn/hadoop-yarn-ui/testem.json      |  12 -
 .../hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc  |  52 ----
 .../hadoop-yarn-ui/tests/helpers/resolver.js    |  11 -
 .../hadoop-yarn-ui/tests/helpers/start-app.js   |  18 --
 .../hadoop-yarn/hadoop-yarn-ui/tests/index.html |  33 ---
 .../hadoop-yarn-ui/tests/test-helper.js         |   6 -
 .../hadoop-yarn-ui/tests/unit/.gitkeep          |   0
 .../tests/unit/adapters/yarn-app-test.js        |  12 -
 .../unit/adapters/yarn-container-log-test.js    |  73 -----
 .../tests/unit/adapters/yarn-node-app-test.js   |  93 ------
 .../unit/adapters/yarn-node-container-test.js   |  93 ------
 .../tests/unit/adapters/yarn-node-test.js       |  42 ---
 .../tests/unit/adapters/yarn-rm-node-test.js    |  44 ---
 .../tests/unit/controllers/yarn-apps-test.js    |  12 -
 .../tests/unit/controllers/yarn-queues-test.js  |  12 -
 .../tests/unit/mixins/charts-test.js            |  12 -
 .../tests/unit/models/yarn-app-test.js          |  12 -
 .../unit/models/yarn-container-log-test.js      |  48 ---
 .../tests/unit/models/yarn-node-app-test.js     |  65 -----
 .../unit/models/yarn-node-container-test.js     |  78 -----
 .../tests/unit/models/yarn-node-test.js         |  58 ----
 .../tests/unit/models/yarn-rm-node-test.js      |  95 ------
 .../tests/unit/routes/yarn-apps-test.js         |  11 -
 .../unit/routes/yarn-container-log-test.js      | 120 --------
 .../tests/unit/routes/yarn-node-app-test.js     |  56 ----
 .../tests/unit/routes/yarn-node-apps-test.js    |  60 ----
 .../unit/routes/yarn-node-container-test.js     |  61 ----
 .../unit/routes/yarn-node-containers-test.js    |  68 -----
 .../tests/unit/routes/yarn-node-test.js         |  84 ------
 .../tests/unit/routes/yarn-nodes-test.js        |  74 -----
 .../tests/unit/serializers/yarn-app-test.js     |  15 -
 .../unit/serializers/yarn-container-log-test.js |  49 ----
 .../unit/serializers/yarn-node-app-test.js      | 102 -------
 .../serializers/yarn-node-container-test.js     | 128 --------
 .../tests/unit/serializers/yarn-node-test.js    |  69 -----
 .../tests/unit/serializers/yarn-rm-node-test.js | 153 ----------
 .../tests/unit/utils/converter-test.js          |  52 ----
 .../tests/unit/utils/sorter-test.js             |  26 --
 .../hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep  |   0
 hadoop-yarn-project/hadoop-yarn/pom.xml         |   1 +
 318 files changed, 8912 insertions(+), 7308 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 998287d..94ab48d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,19 @@ hadoop-hdfs-project/hadoop-hdfs-httpfs/downloads
 hadoop-common-project/hadoop-common/src/test/resources/contract-test-options.xml
 hadoop-tools/hadoop-openstack/src/test/resources/contract-test-options.xml
 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/tla/yarnregistry.toolbox
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/dist
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tmp
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/node
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/node_modules
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/bower_components
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/.sass-cache
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/connect.lock
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/coverage/*
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/libpeerconnection.log
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webappnpm-debug.log
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapptestem.log
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/dist
+hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/tmp
 yarnregistry.pdf
 hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml
 hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/BUILDING.txt
----------------------------------------------------------------------
diff --git a/BUILDING.txt b/BUILDING.txt
index c7a91da..f9a1c6c 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -15,6 +15,7 @@ Requirements:
 * Internet connection for first build (to fetch all Maven and Hadoop dependencies)
 * python (for releasedocs)
 * bats (for shell code testing)
+* Node.js / bower / Ember-cli (for YARN UI v2 building)
 
 ----------------------------------------------------------------------------------
 The easiest way to get an environment with all the appropriate tools is by means
@@ -119,7 +120,7 @@ Maven build goals:
  * Run clover                : mvn test -Pclover [-DcloverLicenseLocation=${user.name}/.clover.license]
  * Run Rat                   : mvn apache-rat:check
  * Build javadocs            : mvn javadoc:javadoc
- * Build distribution        : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs]
+ * Build distribution        : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs][-Pyarn-ui]
  * Change Hadoop version     : mvn versions:set -DnewVersion=NEWVERSION
 
  Build options:
@@ -129,6 +130,7 @@ Maven build goals:
   * Use -Psrc to create a project source TAR.GZ
   * Use -Dtar to create a TAR with the distribution (using -Pdist)
   * Use -Preleasedocs to include the changelog and release docs (requires Internet connectivity)
+  * Use -Pyarn-ui to build YARN UI v2. (Requires Internet connectivity, and it is for dev use only)
 
  Snappy build options:
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
index 46da0f8..46dbb60 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -379,3 +379,83 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+For Apache Hadoop YARN Web UI component: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/
+---------------------------------------------------------------------
+The Apache Hadoop YARN Web UI component bundles the following files under the MIT License:
+
+ - ember v2.0.1 (http://emberjs.com/) - Copyright (c) 2014 Yehuda Katz, Tom Dale and Ember.js contributors
+ - ember-data v2.0.0 (https://github.com/emberjs/data) - Copyright (C) 2011-2014 Tilde, Inc. and contributors, Portions Copyright (C) 2011 LivingSocial Inc.
+ - ember-resolver v0.1.18 (https://github.com/ember-cli/ember-resolver) - Copyright (c) 2013 Stefan Penner and Ember App Kit Contributors
+ - bootstrap v3.3.2 (http://getbootstrap.com) - Copyright (c) 2011-2014 Twitter, Inc
+ - jquery v1.11.3 (http://jquery.org) - Copyright 2005, 2014 jQuery Foundation and other contributors
+ - datatables v1.10.8 (https://datatables.net/)
+ - moment v2.10.6 (http://momentjs.com/) - Copyright (c) 2011-2015 Tim Wood, Iskren Chernev, Moment.js contributors
+ - em-helpers v0.5.8 (https://github.com/sreenaths/em-helpers)
+ - ember-cli-app-version v0.5.0 (https://github.com/EmberSherpa/ember-cli-app-version) - Authored by Taras Mankovski <ta...@gmail.com>
+ - ember-cli-babel v5.1.3 (https://github.com/babel/ember-cli-babel) - Authored by Stefan Penner <st...@gmail.com>
+ - ember-cli-content-security-policy v0.4.0 (https://github.com/rwjblue/ember-cli-content-security-policy)
+ - ember-cli-dependency-checker v1.0.1 (https://github.com/quaertym/ember-cli-dependency-checker) - Authored by Emre Unal
+ - ember-cli-htmlbars v0.7.9 (https://github.com/ember-cli/ember-cli-htmlbars) - Authored by Robert Jackson <me...@rwjblue.com>
+ - ember-cli-htmlbars-inline-precompile v0.2.0 (https://github.com/pangratz/ember-cli-htmlbars-inline-precompile) - Authored by Clemens Müller <cm...@gmail.com>
+ - ember-cli-ic-ajax v0.2.1 (https://github.com/rwjblue/ember-cli-ic-ajax) - Authored by Robert Jackson <me...@rwjblue.com>
+ - ember-cli-inject-live-reload v1.3.1 (https://github.com/rwjblue/ember-cli-inject-live-reload) - Authored by Robert Jackson <me...@rwjblue.com>
+ - ember-cli-qunit v1.0.0 (https://github.com/ember-cli/ember-cli-qunit) - Authored by Robert Jackson <me...@rwjblue.com>
+ - ember-cli-release v0.2.3 (https://github.com/lytics/ember-cli-release) - Authored by Robert Jackson <me...@rwjblue.com>
+ - ember-cli-sri v1.0.3 (https://github.com/jonathanKingston/ember-cli-sri) - Authored by Jonathan Kingston
+ - ember-cli-uglify v1.2.0 (github.com/ember-cli/ember-cli-uglify) - Authored by Robert Jackson <me...@rwjblue.com>
+ - ember-d3 v0.1.0 (https://github.com/brzpegasus/ember-d3) - Authored by Estelle DeBlois
+ - select2 v4.0.0 (https://select2.github.io/)
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and assocated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+----
+The Apache Hadoop YARN Web UI component bundles the following files under the BSD License:
+
+(3-clause BSD license)
+ - D3 v3.5.6 (http://d3js.org/) - Copyright (c) 2010-2014, Michael Bostock
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list
+   of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this
+   list of conditions and the following disclaimer in the documentation and/or
+   other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may
+   be used to endorse or promote products derived from this software without
+   specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/dev-support/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index 5c8bdfa..579ce11 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -97,6 +97,11 @@ RUN apt-get install -y bats
 ENV MAVEN_OPTS -Xms256m -Xmx512m
 
 ###
+# Install node js tools for web UI frameowkr
+###
+RUN apt-get -y install nodejs && ln -s /usr/bin/nodejs /usr/bin/node && apt-get -y install npm && npm install -g bower
+
+###
 # Everything past this point is either not needed for testing or breaks Yetus.
 # So tell Yetus not to read the rest of the file:
 # YETUS CUT HERE

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md
new file mode 100644
index 0000000..c86adca
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/YarnUI2.md
@@ -0,0 +1,40 @@
+<!---
+  Licensed 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. See accompanying LICENSE file.
+-->
+
+Hadoop: YARN-UI V2
+=================
+*This is a WIP project, nobody should use it in production.*
+
+Prerequisites
+-------------
+
+You will need the following things properly installed on your computer.
+
+* Install Node.js with NPM: https://nodejs.org/download/
+* After Node.js installed, install bower: `npm install -g bower`.
+* Install Ember-cli: `npm install -g ember-cli`
+
+BUILD
+----
+* Please refer to BUILDING.txt in the top directory and pass -Pyarn-ui to build UI-related code
+* Execute `mvn test -Pyarn-ui` to run unit tests
+
+Try it
+------
+
+* Packaging and deploying Hadoop in this branch
+* In `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js`, change `timelineWebUrl` and `rmWebUrl` to your YARN RM/Timeline server web address. 
+* If you are running YARN RM in your localhost, you should update `localBaseUrl` to `localhost:1337/`, install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`. 
+* Run `ember serve` under `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/`
+* Visit your app at [http://localhost:4200](http://localhost:4200).

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc
deleted file mode 100644
index 959e169..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "directory": "bower_components",
-  "analytics": false
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig
deleted file mode 100644
index 47c5438..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig
+++ /dev/null
@@ -1,34 +0,0 @@
-# EditorConfig helps developers define and maintain consistent
-# coding styles between different editors and IDEs
-# editorconfig.org
-
-root = true
-
-
-[*]
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-indent_style = space
-indent_size = 2
-
-[*.js]
-indent_style = space
-indent_size = 2
-
-[*.hbs]
-insert_final_newline = false
-indent_style = space
-indent_size = 2
-
-[*.css]
-indent_style = space
-indent_size = 2
-
-[*.html]
-indent_style = space
-indent_size = 2
-
-[*.{diff,md}]
-trim_trailing_whitespace = false

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli
deleted file mode 100644
index 96bd287..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-  /**
-    Ember CLI sends analytics information by default. The data is completely
-    anonymous, but there are times when you might want to disable this behavior.
-
-    Setting `disableAnalytics` to true will prevent any data from being sent.
-  */
-  "disableAnalytics": false,
-  "liveReload": true,
-  "watcher": "polling"
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore
deleted file mode 100644
index 86fceae..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-# See http://help.github.com/ignore-files/ for more about ignoring files.
-
-# compiled output
-/dist
-/tmp
-
-# dependencies
-/node_modules
-/bower_components
-
-# misc
-/.sass-cache
-/connect.lock
-/coverage/*
-/libpeerconnection.log
-npm-debug.log
-testem.log

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc
deleted file mode 100644
index 08096ef..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc
+++ /dev/null
@@ -1,32 +0,0 @@
-{
-  "predef": [
-    "document",
-    "window",
-    "-Promise"
-  ],
-  "browser": true,
-  "boss": true,
-  "curly": true,
-  "debug": false,
-  "devel": true,
-  "eqeqeq": true,
-  "evil": true,
-  "forin": false,
-  "immed": false,
-  "laxbreak": false,
-  "newcap": true,
-  "noarg": true,
-  "noempty": false,
-  "nonew": false,
-  "nomen": false,
-  "onevar": false,
-  "plusplus": false,
-  "regexp": false,
-  "undef": true,
-  "sub": true,
-  "strict": false,
-  "white": false,
-  "eqnull": true,
-  "esnext": true,
-  "unused": true
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml
deleted file mode 100644
index 66dd107..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-language: node_js
-node_js:
-  - "0.12"
-
-sudo: false
-
-cache:
-  directories:
-    - node_modules
-
-before_install:
-  - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
-  - "npm config set spin false"
-  - "npm install -g npm@^2"
-
-install:
-  - npm install -g bower
-  - npm install
-  - bower install
-
-script:
-  - npm test

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig
deleted file mode 100644
index 5e9462c..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "ignore_dirs": ["tmp"]
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
deleted file mode 100644
index d5cba6e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Yarn-ui
-*This is a WIP project, nobody should use it in production.*
-
-## Prerequisites
-
-You will need the following things properly installed on your computer.
-
-* Install Node.js with NPM: https://nodejs.org/download/
-* After Node.js installed, install bower: `npm install -g bower`.
-* Install Ember-cli: `npm install -g ember-cli`
-
-## Installation
-
-* Goto root directory of yarn-ui project: `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui`
-* `npm install && bower install`, it will take a while to finish.
-
-## Try it
-
-* Packaging and deploying Hadoop in this branch (You can use latest trunk after YARN-4417 committed to trunk)
-* Modify `app/adapters/yarn-app.js`, change `host` to your YARN RM web address
-* If you running YARN RM in your localhost, you should install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`. And the `host` of `app/adapters/yarn-app.js` should start with `localhost:1337`.
-* Run `ember server`
-* Visit your app at [http://localhost:4200](http://localhost:4200).
-

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
deleted file mode 100644
index 5a0d2d3..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
-  pathForType(modelName) {
-    return ''; // move to some common place, return path by modelname.
-  },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
deleted file mode 100644
index d392c9b..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster/metrics', // common const
-  pathForType(modelName) {
-    return ''; // move to some common place, return path by modelname.
-  },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
deleted file mode 100644
index 4e40744..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import DS from 'ember-data';
-import Converter from 'yarn-ui/utils/converter';
-import Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
-
-  urlForQuery(query, modelName) {
-    var url = this._buildURL();
-    return url + '/apps/' + query.appId + "/appattempts";
-  },
-
-  urlForFindRecord(id, modelName, snapshot) {
-    var url = this._buildURL();
-    var url = url + '/apps/' + 
-           Converter.attemptIdToAppId(id) + "/appattempts/" + id;
-    console.log(url);
-    return url;
-  },
-
-  ajax(url, method, hash) {
-    hash = {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
deleted file mode 100644
index faff3e7..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
-  pathForType(modelName) {
-    return 'apps'; // move to some common place, return path by modelname.
-  },
-  /*
-  urlForQuery(query, modelName) {
-    var url = this._buildURL();
-    return url + '/apps/' + query.appId + "/appattempts";
-  },
-  */
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js
deleted file mode 100644
index 7838c98..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container-log.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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';
-import Converter from 'yarn-ui/utils/converter';
-
-/**
- * REST URL's response when fetching container logs will be
- * in plain text format and not JSON.
- */
-export default DS.RESTAdapter.extend({
-  headers: {
-    Accept: 'text/plain'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
-
-  urlForFindRecord(id, modelName, snapshot) {
-    var splits = Converter.splitForContainerLogs(id);
-    var nodeHttpAddr = splits[0];
-    var containerId = splits[1];
-    var filename = splits[2];
-    this.host = this.host + nodeHttpAddr;
-    var url = this._buildURL();
-    url = url + "/containerlogs/" + containerId + "/" + filename;
-    return url;
-  },
-
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  },
-
-  /**
-   * Override options so that result is not expected to be JSON
-   */
-  ajaxOptions: function (url, type, options) {
-    var hash = options || {};
-    hash.url = url;
-    hash.type = type;
-    // Make sure jQuery does not try to convert response to JSON.
-    hash.dataType = 'text';
-    hash.context = this;
-
-    var headers = Ember.get(this, 'headers');
-    if (headers != undefined) {
-      hash.beforeSend = function (xhr) {
-        Object.keys(headers).forEach(function (key) {
-          return xhr.setRequestHeader(key, headers[key]);
-        });
-      };
-    }
-    return hash;
-  },
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
deleted file mode 100644
index d941c38..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import DS from 'ember-data';
-import Converter from 'yarn-ui/utils/converter';
-import Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  rmHost: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
-  tsHost: 'http://localhost:1337/' + Config.TS_HOST + ':' + Config.TS_PORT,
-  host: function() {
-    return undefined
-  }.property(),
-  rmNamespace: 'ws/v1/cluster',
-  tsNamespace: 'ws/v1/applicationhistory',
-  namespace: function() {
-    return undefined
-  }.property(),
-
-  urlForQuery(query, modelName) {
-    if (query.is_rm) {
-      this.set("host", this.rmHost);
-      this.set("namespace", this.rmNamespace);
-    } else {
-      this.set("host", this.tsHost);
-      this.set("namespace", this.tsNamespace);
-    }
-
-    var url = this._buildURL();
-    url = url + '/apps/' + Converter.attemptIdToAppId(query.app_attempt_id) 
-               + "/appattempts/" + query.app_attempt_id + "/containers";
-    console.log(url);
-    return url;
-  },
-
-  ajax(url, method, hash) {
-    hash = {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js
deleted file mode 100644
index 0c60d1f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-app.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
-
-  urlForQuery(query) {
-    this.host = this.host + query.nodeAddr;
-    var url = this._buildURL();
-    url = url + "/apps";
-    return url;
-  },
-
-  urlForQueryRecord: function (query) {
-    this.host = this.host + query.nodeAddr;
-    var url = this._buildURL();
-    url = url + "/apps/" + query.appId;
-    return url;
-  },
-
-  query: function (store, type, query) {
-    var url = this.urlForQuery(query);
-    // Query params not required.
-    query = null;
-    return this.ajax(url, 'GET', { data: query });
-  },
-
-  queryRecord: function (store, type, query) {
-    var url = this.urlForQueryRecord(query);
-    // Query params not required.
-    query = null;
-    return this.ajax(url, 'GET', { data: query });
-  },
-
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js
deleted file mode 100644
index e8bf7b7..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node-container.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * 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.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
-
-  urlForQuery(query) {
-    this.host = this.host + query.nodeHttpAddr;
-    var url = this._buildURL();
-    url = url + "/containers";
-    return url;
-  },
-
-  urlForQueryRecord(query) {
-    this.host = this.host + query.nodeHttpAddr;
-    var url = this._buildURL();
-    url = url + "/containers/" + query.containerId;
-    return url;
-  },
-
-  query: function (store, type, query) {
-    var url = this.urlForQuery(query);
-    // Query params not required.
-    query = null;
-    return this.ajax(url, 'GET', { data: query });
-  },
-
-  queryRecord: function (store, type, query) {
-    var url = this.urlForQueryRecord(query);
-    // Query params not required.
-    query = null;
-    console.log(url);
-    return this.ajax(url, 'GET', { data: query });
-  },
-
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js
deleted file mode 100644
index 64f524a..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-node.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * 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.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/',
-  namespace: 'ws/v1/node',
-
-  urlForFindRecord(id, modelName, snapshot) {
-    this.host = this.host + id;
-    var url = this._buildURL();
-    return url;
-  },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "NM";
-    return this._super(url, method, hash);
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
deleted file mode 100644
index 0f6eb65..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import DS from 'ember-data';
-import Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
-  namespace: 'ws/v1/cluster', // common const
-  pathForType(modelName) {
-    return 'scheduler'; // move to some common place, return path by modelname.
-  },
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash); 
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js
deleted file mode 100644
index c6ad6f3..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-rm-node.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * 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 Config from 'yarn-ui/config';
-
-export default DS.JSONAPIAdapter.extend({
-  headers: {
-    Accept: 'application/json'
-  },
-  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
-  namespace: 'ws/v1/cluster',
-  pathForType(modelName) {
-    return 'nodes';
-  },
-
-  urlForFindRecord(id, modelName, snapshot) {
-    var url = this._buildURL();
-    url = url + "/nodes/" + id;
-    return url;
-  },
-
-  ajax(url, method, hash) {
-    hash = hash || {};
-    hash.crossDomain = true;
-    hash.xhrFields = {withCredentials: true};
-    hash.targetServer = "RM";
-    return this._super(url, method, hash);
-  }
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js
deleted file mode 100644
index ff28ecf..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import Ember from 'ember';
-import Resolver from 'ember/resolver';
-import loadInitializers from 'ember/load-initializers';
-import config from './config/environment';
-import Sorter from 'yarn-ui/utils/sorter';
-
-var App;
-
-Ember.MODEL_FACTORY_INJECTIONS = true;
-
-App = Ember.Application.extend({
-  modulePrefix: config.modulePrefix,
-  podModulePrefix: config.podModulePrefix,
-  Resolver: Resolver
-});
-
-loadInitializers(App, config.modulePrefix);
-Sorter.initDataTableSorter();
-
-export default App;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js
deleted file mode 100644
index aff0493..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js
deleted file mode 100644
index aff0493..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js
deleted file mode 100644
index f24e947..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js
+++ /dev/null
@@ -1,104 +0,0 @@
-import Ember from 'ember';
-import BaseChartComponent from 'yarn-ui/components/base-chart-component';
-
-export default BaseChartComponent.extend({
-  // data: 
-  //    [{label=label1, value=value1}, ...]
-  //    ...
-  renderBarChart: function(data, title, textWidth = 50) {
-    var g = this.chart.g;
-    var layout = this.getLayout();
-    this.renderTitleAndBG(g, title, layout);
-
-    var maxValue = -1;
-    for (var i = 0; i < data.length; i++) {
-      if (data[i] instanceof Array) {
-        if (data[i][0].value > maxValue) {
-          maxValue = data[i][0].value;
-        }
-      } else {
-        if (data[i].value > maxValue) {
-          maxValue = data[i].value;
-        }
-      }
-    }
-
-    var singleBarHeight = 30;
-
-    // 50 is for text
-    var maxBarWidth = layout.x2 - layout.x1 - 2 * layout.margin - textWidth - 50;
-
-    // 30 is for title
-    var maxBarsHeight = layout.y2 - layout.y1 - 2 * layout.margin - 30;
-    var gap = (maxBarsHeight - data.length * singleBarHeight) / (data.length -
-      1);
-
-    var xScaler = d3.scale.linear()
-      .domain([0, maxValue])
-      .range([0, maxBarWidth]);
-
-    // show bar text
-    for (var i = 0; i < data.length; i++) {
-      g.append("text")
-        .text(
-          function() {
-            return data[i].label;
-          })
-        .attr("y", function() {
-          return layout.y1 + singleBarHeight / 2 + layout.margin + (gap +
-            singleBarHeight) * i + 30;
-        })
-        .attr("x", layout.x1 + layout.margin);
-    }
-
-    // show bar
-    var bar = g.selectAll("bars")
-      .data(data)
-      .enter()
-      .append("rect")
-      .attr("y", function(d, i) {
-        return layout.y1 + 30 + layout.margin + (gap + singleBarHeight) * i;
-      })
-      .attr("x", layout.x1 + layout.margin + textWidth)
-      .attr("height", singleBarHeight)
-      .attr("fill", function(d, i) {
-        return this.colors[i];
-      }.bind(this))
-      .attr("width", 0);
-
-    this.bindTooltip(bar);
-
-    bar.transition()
-      .duration(500)
-      .attr("width", function(d) {
-        var w;
-        w = xScaler(d.value);
-        // At least each item has 3 px
-        w = Math.max(w, 3);
-        return w;
-      });
-
-    // show bar value
-    for (var i = 0; i < data.length; i++) {
-      g.append("text")
-        .text(
-          function() {
-            return data[i].value;
-          })
-        .attr("y", function() {
-          return layout.y1 + singleBarHeight / 2 + layout.margin + (gap +
-            singleBarHeight) * i + 30;
-        })
-        .attr("x", layout.x1 + layout.margin + textWidth + 15 + xScaler(data[i].value));
-    }
-  },
-
-  draw: function() {
-    this.initChart();
-    this.renderBarChart(this.get("data"), this.get("title"), this.get("textWidth"));
-  },
-
-  didInsertElement: function() {
-    this.draw();
-  },
-})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js
deleted file mode 100644
index acf2b5f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js
+++ /dev/null
@@ -1,109 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-  chart: undefined,
-  tooltip : undefined,
-  colors: d3.scale.category10().range(),
-
-  initChart: function() {
-    this.chart = {
-      svg: undefined,
-      g: undefined,
-      h: 0,
-      w: 0,
-      tooltip: undefined
-    };
-
-    // Init tooltip if it is not initialized
-    this.tooltip = d3.select("#chart-tooltip");
-    if (!this.tooltip) {
-      this.tooltip = d3.select("body")
-        .append("div")
-        .attr("class", "tooltip")
-        .attr("id", "chart-tooltip")
-        .style("opacity", 0);
-    }
-
-    // Init svg
-    var svg = this.chart.svg;
-    if (svg) {
-      svg.remove();
-    }
-
-    var parentId = this.get("parentId");
-    var parent = d3.select("#" + parentId);
-    var bbox = parent.node().getBoundingClientRect();
-    this.chart.w = bbox.width - 30;
-
-    var ratio = 0.75; // 4:3 by default
-    if (this.get("ratio")) {
-      ratio = this.get("ratio");
-    }
-    this.chart.h = bbox.width * ratio;
-
-    if (this.get("maxHeight")) {
-      this.chart.h = Math.min(this.get("maxHeight"), this.chart.h);
-    }
-
-    this.chart.svg = parent.append("svg")
-      .attr("width", this.chart.w)
-      .attr("height", this.chart.h);
-
-    this.chart.g = this.chart.svg.append("g");
-  },
-
-  renderTitleAndBG: function(g, title, layout) {
-    var bg = g.append("g");
-    bg.append("text")
-      .text(title)
-      .attr("x", (layout.x1 + layout.x2) / 2)
-      .attr("y", layout.y1 + layout.margin + 20)
-      .attr("class", "chart-title");
-
-    bg.append("rect")
-      .attr("x", layout.x1)
-      .attr("y", layout.y1)
-      .attr("width", layout.x2 - layout.x1)
-      .attr("height", layout.y2 - layout.y1)
-      .attr("class", "chart-frame");
-  },
-
-  bindTooltip: function(d) {
-    d.on("mouseover", function(d) {
-        this.tooltip
-          .style("left", (d3.event.pageX) + "px")
-          .style("top", (d3.event.pageY - 28) + "px");
-      }.bind(this))
-      .on("mousemove", function(d) {
-        // Handle pie chart case
-        var data = d;
-        if (d.data) {
-          data = d.data;
-        }
-
-        this.tooltip.style("opacity", .9);
-        this.tooltip.html(data.label + " = " + data.value)
-          .style("left", (d3.event.pageX) + "px")
-          .style("top", (d3.event.pageY - 28) + "px");
-      }.bind(this))
-      .on("mouseout", function(d) {
-        this.tooltip.style("opacity", 0);
-      }.bind(this));
-  },
-
-  getLayout: function() {
-    var x1 = 0;
-    var y1 = 0;
-    var x2 = this.chart.w;
-    var y2 = this.chart.h;
-
-    var layout = {
-      x1: x1,
-      y1: y1,
-      x2: x2 - 10,
-      y2: y2 - 10,
-      margin: 10
-    };
-    return layout;
-  },
-});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js
deleted file mode 100644
index aff0493..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js
deleted file mode 100644
index 608b0c1..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js
+++ /dev/null
@@ -1,148 +0,0 @@
-import Ember from 'ember';
-import BaseChartComponent from 'yarn-ui/components/base-chart-component';
-
-export default BaseChartComponent.extend({
-  /*
-   * data = [{label="xx", value=},{...}]
-   */
-  renderDonutChart: function(data, title, showLabels = false, 
-    middleLabel = "Total", middleValue = undefined) {
-    var g = this.chart.g;
-    var layout = this.getLayout();
-    this.renderTitleAndBG(g, title, layout);
-
-    var total = 0;
-    var allZero = true;
-    for (var i = 0; i < data.length; i++) {
-      total += data[i].value;
-      if (data[i].value > 1e-6) {
-        allZero = false;
-      }
-    }
-
-    if (!middleValue) {
-      middleValue = total;
-    }
-
-    //Width and height
-    var h = layout.y2 - layout.y1;
-
-    // 50 is for title
-    var outerRadius = (h - 50 - 2 * layout.margin) / 2;
-    var innerRadius = outerRadius * 0.618;
-    var arc = d3.svg.arc()
-      .innerRadius(innerRadius)
-      .outerRadius(outerRadius);
-
-    var cx;
-    var cy = layout.y1 + 50 + layout.margin + outerRadius;
-    if (showLabels) {
-      cx = layout.x1 + layout.margin + outerRadius;
-    } else {
-      cx = (layout.x1 + layout.x2) / 2;
-    }
-
-    var pie = d3.layout.pie();
-    pie.sort(null);
-    pie.value(function(d) {
-      var v = d.value;
-      // make sure it > 0
-      v = Math.max(v, 1e-6);
-      return v;
-    });
-
-    //Set up groups
-    var arcs = g
-      .selectAll("g.arc")
-      .data(pie(data))
-      .enter()
-      .append("g")
-      .attr("class", "arc")
-      .attr("transform", "translate(" + cx + "," + cy + ")");
-
-    function tweenPie(finish) {
-      var start = {
-        startAngle: 0,
-        endAngle: 0
-      };
-      var i = d3.interpolate(start, finish);
-      return function(d) {
-        return arc(i(d));
-      };
-    }
-
-    //Draw arc paths
-    var path = arcs.append("path")
-      .attr("fill", function(d, i) {
-        if (d.value > 1e-6) {
-          return this.colors[i];
-        } else {
-          return "white";
-        }
-      }.bind(this))
-      .attr("d", arc)
-      .attr("stroke", function(d, i) {
-        if (allZero) {
-          return this.colors[i];
-        }
-      }.bind(this))
-      .attr("stroke-dasharray", function(d, i) {
-        if (d.value <= 1e-6) {
-          return "10,10";
-        }
-      }.bind(this));
-    this.bindTooltip(path);
-
-    // Show labels
-    if (showLabels) {
-      var lx = layout.x1 + layout.margin + outerRadius * 2 + 30;
-      var squareW = 15;
-      var margin = 10;
-
-      var select = g.selectAll(".rect")
-        .data(data)
-        .enter();
-      select.append("rect")
-        .attr("fill", function(d, i) {
-          return this.colors[i];
-        }.bind(this))
-        .attr("x", lx)
-        .attr("y", function(d, i) {
-          return layout.y1 + 50 + (squareW + margin) * i + layout.margin;
-        })
-        .attr("width", squareW)
-        .attr("height", squareW);
-      select.append("text")
-        .attr("x", lx + squareW + margin)
-        .attr("y", function(d, i) {
-          return layout.y1 + 50 + (squareW + margin) * i + layout.margin + squareW / 2;
-        })
-        .text(function(d) {
-          return d.label + ' = ' + d.value;
-        });
-    }
-
-    if (middleLabel) {
-      var highLightColor = this.colors[0];
-      g.append("text").text(middleLabel).attr("x", cx).attr("y", cy - 10).
-        attr("class", "donut-highlight-text").attr("fill", highLightColor);
-      g.append("text").text(middleValue).attr("x", cx).attr("y", cy + 20).
-        attr("class", "donut-highlight-text").attr("fill", highLightColor).
-        style("font-size", "30px");
-    }
-
-    path.transition()
-      .duration(500)
-      .attrTween('d', tweenPie);
-  },
-
-  draw: function() {
-    this.initChart();
-    this.renderDonutChart(this.get("data"), this.get("title"), this.get("showLabels"), 
-                          this.get("middleLabel"), this.get("middleValue"));
-  },
-
-  didInsertElement: function() {
-    this.draw();
-  },
-})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js
deleted file mode 100644
index a18ccae..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-  didInsertElement: function() {
-    $(".js-example-basic-single").select2(
-      {
-        width: '100%',
-        placeholder: "Select a queue"
-      });
-    var elementId = this.get("element-id");
-    var prefix = this.get("prefix");
-
-    var element = d3.select("#" + elementId);
-
-    if (element) {
-      this.get("model").forEach(function(o) {
-        element.append("option").attr("value", o.get("name")).text(prefix + o.get("name"));
-      });
-    }
-  }
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js
deleted file mode 100644
index aff0493..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js
deleted file mode 100644
index aff0493..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js
deleted file mode 100644
index c1fd8ff..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js
+++ /dev/null
@@ -1,272 +0,0 @@
-import Ember from 'ember';
-import ChartUtilsMixin from 'yarn-ui/mixins/charts-utils';
-
-export default Ember.Component.extend(ChartUtilsMixin, {
-	queues: {
-		data: undefined,
-		foldedQueues: {},
-		selectedQueueCircle: undefined,
-		maxDepth: -1,
-	},
-
-	queueColors: d3.scale.category20().range(),
-
-	renderQueue: function(now, depth, sequence) {
-		if (depth > this.queues.maxDepth) {
-			this.queues.maxDepth = depth;
-		}
-
-		var cx = 20 + depth * 30;
-		var cy = 20 + sequence * 30;
-		var name = now.get("name");
-
-		var g = this.queues.dataGroup.append("g")
-			.attr("id", "queue-" + name + "-g");
-
-		var folded = this.queues.foldedQueues[name];
-		var isParentQueue = false;
-
-		// render its children
-		var children = [];
-		var childrenNames = now.get("children");
-		if (childrenNames) {
-			childrenNames.forEach(function(name) {
-				isParentQueue = true;
-				var child = this.queues.data[name];
-				if (child) {
-					children.push(child);
-				}
-			}.bind(this));
-		}
-		if (folded) {
-			children = [];
-		}
-		var linefunction = d3.svg.line()
-			.interpolate("basis")
-			.x(function(d) {
-				return d.x;
-			})
-			.y(function(d) {
-				return d.y;
-			});
-
-		for (var i = 0; i < children.length; i++) {
-			sequence = sequence + 1;
-			// Get center of children queue
-			var cc = this.renderQueue(children[i],
-				depth + 1, sequence);
-			g.append("path")
-				.attr("class", "queue")
-				.attr("d", linefunction([{
-					x: cx,
-					y: cy
-				}, {
-					x: cc.x - 20,
-					y: cc.y
-				}, cc]));
-		}
-
-		var circle = g.append("circle")
-			.attr("cx", cx)
-			.attr("cy", cy)
-			.attr("class", "queue");
-
-		circle.on('mouseover', function() {
-			circle.style("fill", this.queueColors[1]);
-		}.bind(this));
-		circle.on('mouseout', function() {
-			if (circle != this.queues.selectedQueueCircle) {
-				circle.style("fill", this.queueColors[0]);
-			}
-		}.bind(this));
-		circle.on('click', function() {
-			circle.style("fill", this.queueColors[2]);
-			var pre = this.queues.selectedQueueCircle;
-			this.queues.selectedQueueCircle = circle;
-			if (pre) {
-				pre.on('mouseout')();
-			}
-			this.renderCharts(name);
-		}.bind(this));
-		circle.on('dblclick', function() {
-			if (!isParentQueue) {
-				return;
-			}
-
-			if (this.queues.foldedQueues[name]) {
-				delete this.queues.foldedQueues[name];
-			} else {
-				this.queues.foldedQueues[name] = now;
-			}
-			this.renderQueues();
-		}.bind(this));
-
-		var text = name;
-		if (folded) {
-			text = name + " (+)";
-		}
-
-		// print queue's name
-		g.append("text")
-			.attr("x", cx + 30)
-			.attr("y", cy + 5)
-			.text(text)
-			.attr("class", "queue");
-
-		return {
-			x: cx,
-			y: cy
-		};
-	},
-
-	renderQueues: function() {
-		if (this.queues.dataGroup) {
-			this.queues.dataGroup.remove();
-		}
-		// render queues
-		this.queues.dataGroup = this.canvas.svg.append("g")
-			.attr("id", "queues-g");
-		var rootQueue = undefined;
-
-		if (this.queues.data) {
-			this.renderQueue(this.queues.data['root'], 0, 0);
-
-		}
-	},
-
-	draw: function() {
-		this.queues.data = {};
-		this.get("model")
-			.forEach(function(o) {
-				this.queues.data[o.id] = o;
-			}.bind(this));
-
-		// get w/h of the svg
-		var bbox = d3.select("#main-container")
-			.node()
-			.getBoundingClientRect();
-		this.canvas.w = bbox.width;
-		this.canvas.h = Math.max(Object.keys(this.queues.data)
-			.length * 35, 1500);
-
-		this.canvas.svg = d3.select("#main-container")
-			.append("svg")
-			.attr("width", this.canvas.w)
-			.attr("height", this.canvas.h)
-			.attr("id", "main-svg");
-
-		this.renderBackground();
-
-		this.renderQueues();
-		this.renderCharts("root");
-	},
-
-	didInsertElement: function() {
-		this.draw();
-	},
-
-	/*
-	 * data = [{label="xx", value=},{...}]
-	 */
-	renderTable: function(data, title, layout) {
-		d3.select("#main-svg")
-			.append('table')
-			.selectAll('tr')
-			.data(data)
-			.enter()
-			.append('tr')
-			.selectAll('td')
-			.data(function(d) {
-				return d;
-			})
-			.enter()
-			.append('td')
-			.text(function(d) {
-				return d;
-			});
-	},
-
-	renderQueueCapacities: function(queue, layout) {
-		// Render bar chart
-		this.renderBarChart(this.charts.g, [{
-			label: "Cap",
-			value: queue.get("capacity")
-		}, {
-			label: "MaxCap",
-			value: queue.get("maxCapacity")
-		}, {
-			label: "UsedCap",
-			value: queue.get("usedCapacity")
-		}], "Queue Capacities", layout, 60);
-	},
-
-	renderChildrenCapacities: function(queue, layout) {
-		var data = [];
-		var children = queue.get("children");
-		if (children) {
-			for (var i = 0; i < children.length; i++) {
-				var child = this.queues.data[children[i]];
-				data.push({
-					label: child.get("name"),
-					value: child.get("capacity")
-				});
-			}
-		}
-
-		this.renderDonutChart(this.charts.g, data, "Children Capacities", layout, true);
-	},
-
-	renderChildrenUsedCapacities: function(queue, layout) {
-		var data = [];
-		var children = queue.get("children");
-		if (children) {
-			for (var i = 0; i < children.length; i++) {
-				var child = this.queues.data[children[i]];
-				data.push({
-					label: child.get("name"),
-					value: child.get("usedCapacity")
-				});
-			}
-		}
-
-		this.renderDonutChart(this.charts.g, data, "Children Used Capacities", layout, true);
-	},
-
-	renderLeafQueueUsedCapacities: function(layout) {
-		var leafQueueUsedCaps = [];
-		for (var queueName in this.queues.data) {
-			var q = this.queues.data[queueName];
-			if ((!q.get("children")) || q.get("children")
-				.length == 0) {
-				// it's a leafqueue
-				leafQueueUsedCaps.push({
-					label: q.get("name"),
-					value: q.get("usedCapacity")
-				});
-			}
-		}
-
-		this.renderDonutChart(this.charts.g, leafQueueUsedCaps, "LeafQueues Used Capacities",
-			layout, true);
-	},
-
-	renderCharts: function(queueName) {
-	  this.charts.leftBannerLen = this.queues.maxDepth * 30 + 100;
-		this.initCharts();
-
-		var queue = this.queues.data[queueName];
-		var idx = 0;
-
-		if (queue.get("name") == "root") {
-			this.renderLeafQueueUsedCapacities(this.getLayout(idx++));
-		}
-		if (queue.get("name") != "root") {
-			this.renderQueueCapacities(queue, this.getLayout(idx++));
-		}
-		if (queue.get("children") && queue.get("children")
-			.length > 0) {
-			this.renderChildrenCapacities(queue, this.getLayout(idx++));
-			this.renderChildrenUsedCapacities(queue, this.getLayout(idx++));
-		}
-	},
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
deleted file mode 100644
index 447533e..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import Ember from 'ember';
-
-export default Ember.Component.extend({
-  didInsertElement: function() {
-    var paging = this.get("paging") ? true : this.get("paging");
-    var ordering = this.get("ordering") ? true : this.get("ordering");
-    var info = this.get("info") ? true : this.get("info");
-    var bFilter = this.get("bFilter") ? true : this.get("bFilter");
-
-    // Defines sorter for the columns if not default.
-    // Can also specify a custom sorter.
-    var i;
-    var colDefs = [];
-    if (this.get("colTypes")) {
-      var typesArr = this.get("colTypes").split(' ');
-      var targetsArr = this.get("colTargets").split(' ');
-      for (i = 0; i < typesArr.length; i++) {
-        console.log(typesArr[i] + " " + targetsArr[i]);
-        colDefs.push({
-          type: typesArr[i],
-          targets: parseInt(targetsArr[i])
-        });
-      }
-    }
-    // Defines initial column and sort order.
-    var orderArr = [];
-    if (this.get("colsOrder")) {
-      var cols = this.get("colsOrder").split(' ');
-      for (i = 0; i < cols.length; i++) {
-        var col = cols[i].split(',');
-        if (col.length != 2) {
-          continue;
-        }
-        var order = col[1].trim();
-        if (order != 'asc' && order != 'desc') {
-          continue;
-        }
-        var colOrder = [];
-        colOrder.push(parseInt(col[0]));
-        colOrder.push(order);
-        orderArr.push(colOrder);
-      }
-    }
-    if (orderArr.length == 0) {
-      var defaultOrder = [0, 'asc'];
-      orderArr.push(defaultOrder);
-    }
-    console.log(orderArr[0]);
-    Ember.$('#' + this.get('table-id')).DataTable({
-      "paging":   paging,
-      "ordering": ordering, 
-      "info":     info,
-      "bFilter": bFilter,
-      "order": orderArr,
-      "columnDefs": colDefs
-    });
-  }
-});


[14/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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/e35bf0f2/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}}


[15/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js
new file mode 100644
index 0000000..f7ec020
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js
@@ -0,0 +1,275 @@
+/**
+ * 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.Component.extend({
+  // Map: <queue-name, queue>
+  map : undefined,
+
+  // Normalized data for d3
+  treeData: undefined,
+
+  // folded queues, folded[<queue-name>] == true means <queue-name> is folded
+  foldedQueues: { },
+
+  // maxDepth
+  maxDepth: 0,
+
+  // num of leaf queue, folded queue is treated as leaf queue
+  numOfLeafQueue: 0,
+
+  // mainSvg
+  mainSvg: undefined,
+
+  // Init data
+  initData: function() {
+    this.map = { };
+    this.treeData = { };
+    this.maxDepth = 0;
+    this.numOfLeafQueue = 0;
+
+    this.get("model")
+      .forEach(function(o) {
+        this.map[o.id] = o;
+      }.bind(this));
+
+    var selected = this.get("selected");
+
+    this.initQueue("root", 1, this.treeData);
+  },
+
+  // get Children array of given queue
+  getChildrenNamesArray: function(q) {
+    var namesArr = [];
+
+    // Folded queue's children is empty
+    if (this.foldedQueues[q.get("name")]) {
+      return namesArr;
+    }
+
+    var names = q.get("children");
+    if (names) {
+      names.forEach(function(name) {
+        namesArr.push(name);
+      });
+    }
+
+    return namesArr;
+  },
+
+  // Init queues
+  initQueue: function(queueName, depth, node) {
+    if ((!queueName) || (!this.map[queueName])) {
+      // Queue is not existed
+      return;
+    }
+
+    if (depth > this.maxDepth) {
+      this.maxDepth = this.maxDepth + 1;
+    }
+
+    var queue = this.map[queueName];
+
+    var names = this.getChildrenNamesArray(queue);
+
+    node.name = queueName;
+    node.parent = queue.get("parent");
+    node.queueData = queue;
+
+    if (names.length > 0) {
+      node.children = [];
+
+      names.forEach(function(name) {
+        var childQueueData = {};
+        node.children.push(childQueueData);
+        this.initQueue(name, depth + 1, childQueueData);
+      }.bind(this));
+    } else {
+      this.numOfLeafQueue = this.numOfLeafQueue + 1;
+    }
+  },
+
+  update: function(source, root, tree, diagonal) {
+    var duration = 300;
+    var i = 0;
+
+    // Compute the new tree layout.
+    var nodes = tree.nodes(root).reverse();
+    var links = tree.links(nodes);
+
+    // Normalize for fixed-depth.
+    nodes.forEach(function(d) { d.y = d.depth * 200; });
+
+    // Update the nodes…
+    var node = this.mainSvg.selectAll("g.node")
+      .data(nodes, function(d) { return d.id || (d.id = ++i); });
+
+    // Enter any new nodes at the parent's previous position.
+    var nodeEnter = node.enter().append("g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "translate(" + source.y0 + "," + source.x0 + ")"; })
+      .on("click", function(d,i){
+        if (d.queueData.get("name") != this.get("selected")) {
+            document.location.href = "yarnQueue/" + d.queueData.get("name");
+        }
+      }.bind(this));
+      // .on("click", click);
+
+    nodeEnter.append("circle")
+      .attr("r", 1e-6)
+      .style("fill", function(d) {
+        var usedCap = d.queueData.get("usedCapacity");
+        if (usedCap <= 60.0) {
+          return "LimeGreen";
+        } else if (usedCap <= 100.0) {
+          return "DarkOrange";
+        } else {
+          return "LightCoral";
+        }
+      });
+
+    // append percentage
+    nodeEnter.append("text")
+      .attr("x", function(d) { return 0; })
+      .attr("dy", ".35em")
+      .attr("text-anchor", function(d) { return "middle"; })
+      .text(function(d) {
+        var usedCap = d.queueData.get("usedCapacity");
+        if (usedCap >= 100.0) {
+          return usedCap.toFixed(0) + "%";
+        } else {
+          return usedCap.toFixed(1) + "%";
+        }
+      })
+      .style("fill-opacity", 1e-6);
+
+    // append queue name
+    nodeEnter.append("text")
+      .attr("x", function(d) { return 40; })
+      .attr("dy", ".35em")
+      .attr("text-anchor", function(d) { return "start"; })
+      .text(function(d) { return d.name; })
+      .style("fill-opacity", 1e-6);
+
+    // Transition nodes to their new position.
+    var nodeUpdate = node.transition()
+      .duration(duration)
+      .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; });
+
+    nodeUpdate.select("circle")
+      .attr("r", 20)
+      .attr("href", 
+        function(d) {
+          return "yarnQueues/" + d.queueData.get("name");
+        })
+      .style("stroke", function(d) {
+        if (d.queueData.get("name") == this.get("selected")) {
+          return "red";
+        } else {
+          return "gray";
+        }
+      }.bind(this));
+
+    nodeUpdate.selectAll("text")
+      .style("fill-opacity", 1);
+
+    // Transition exiting nodes to the parent's new position.
+    var nodeExit = node.exit().transition()
+      .duration(duration)
+      .attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
+      .remove();
+
+    nodeExit.select("circle")
+      .attr("r", 1e-6);
+
+    nodeExit.select("text")
+      .style("fill-opacity", 1e-6);
+
+    // Update the links…
+    var link = this.mainSvg.selectAll("path.link")
+      .data(links, function(d) { return d.target.id; });
+
+    // Enter any new links at the parent's previous position.
+    link.enter().insert("path", "g")
+      .attr("class", "link")
+      .attr("d", function(d) {
+      var o = {x: source.x0, y: source.y0};
+      return diagonal({source: o, target: o});
+      });
+
+    // Transition links to their new position.
+    link.transition()
+      .duration(duration)
+      .attr("d", diagonal);
+
+    // Transition exiting nodes to the parent's new position.
+    link.exit().transition()
+      .duration(duration)
+      .attr("d", function(d) {
+      var o = {x: source.x, y: source.y};
+      return diagonal({source: o, target: o});
+      })
+      .remove();
+
+    // Stash the old positions for transition.
+    nodes.forEach(function(d) {
+      d.x0 = d.x;
+      d.y0 = d.y;
+    });
+  },
+
+  reDraw: function() {
+    this.initData();
+
+    var margin = {top: 20, right: 120, bottom: 20, left: 120};
+    var treeWidth = this.maxDepth * 200;
+    var treeHeight = this.numOfLeafQueue * 80;
+    var width = treeWidth + margin.left + margin.right;
+    var height = treeHeight + margin.top + margin.bottom;
+    var layout = { };
+
+    if (this.mainSvg) {
+      this.mainSvg.remove();
+    }
+
+    this.mainSvg = d3.select("#" + this.get("parentId")).append("svg")
+      .attr("width", width)
+      .attr("height", height)
+      .attr("class", "tree-selector")
+      .append("g")
+      .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+    var tree = d3.layout.tree().size([treeHeight, treeWidth]);
+
+    var diagonal = d3.svg.diagonal()
+      .projection(function(d) { return [d.y, d.x]; });
+
+    var root = this.treeData;
+    root.x0 = height / 2;
+    root.y0 = 0;
+
+    d3.select(self.frameElement).style("height", height);
+
+    this.update(root, root, tree, diagonal);
+  },
+
+  didInsertElement: function() {
+   this.reDraw();
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
new file mode 100644
index 0000000..224c65a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/config.js
@@ -0,0 +1,27 @@
+/**
+ * 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.
+ */
+
+/**
+ * Host and port configurations
+ */
+export default {
+  RM_HOST: 'localhost',
+  RM_PORT: '8088',
+  TS_HOST: 'localhost',
+  TS_PORT: '8188',
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/constants.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/constants.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/constants.js
new file mode 100644
index 0000000..d2937a0
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/constants.js
@@ -0,0 +1,24 @@
+/**
+ * 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.
+ */
+
+/**
+ * Application level global constants go here.
+ */
+export default {
+  PARAM_SEPARATOR: '!',
+};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
new file mode 100644
index 0000000..3c68365
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js
@@ -0,0 +1,55 @@
+/**
+ * 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';
+
+/**
+ * Base controller for application.
+ */
+export default Ember.Controller.extend({
+  /**
+   * Output main top UI menu which is common across all pages.
+   * Menu item will be made active based on current path.
+   */
+  outputMainMenu: function(){
+    var path = this.get('currentPath');
+    var html = '<li';
+    if (path == 'yarnQueue') {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="yarnQueue/root">Queues<span class="sr-only">' +
+        '(current)</span></a></li><li';
+    if (path.lastIndexOf('yarnApp', 0) == 0) {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="yarnApps">Applications<span class="sr-only">' +
+        '(current)</span></a></li><li';
+    if (path == 'clusterOverview') {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="clusterOverview">Cluster Overview<span class=' +
+        '"sr-only">(current)</span></a></li><li';
+    if (path.lastIndexOf('yarnNode', 0) == 0) {
+      html = html + ' class="active"';
+    }
+    html = html + '><a href="yarnNodes">Nodes<span class="sr-only">' +
+        '(current)</span></a></li>';
+    return Ember.String.htmlSafe(html);
+  }.property('currentPath')
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/cluster-overview.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/cluster-overview.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/cluster-overview.js
new file mode 100644
index 0000000..dc2f6e4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/cluster-overview.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 Ember from 'ember';
+
+export default Ember.Controller.extend({
+  loading: true,
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js
new file mode 100644
index 0000000..dc99fd1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Controller.extend({
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-queue.js
new file mode 100644
index 0000000..38cf352
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-queue.js
@@ -0,0 +1,24 @@
+/**
+ * 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.Controller.extend({
+  needReload: true,
+  selectedQueue: undefined,
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/divide.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/divide.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/divide.js
new file mode 100644
index 0000000..fcf64dd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/divide.js
@@ -0,0 +1,31 @@
+/**
+ * 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';
+
+/**
+ * Helper assumes values are numeric. num means numerator and
+ * den means denominator.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  var num = hash.num;
+  var den = hash.den;
+  if (den == 0) {
+    return 0;
+  }
+  return Math.floor(num/den);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
new file mode 100644
index 0000000..8c29b34
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/log-files-comma.js
@@ -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.
+ */
+
+import Ember from 'ember';
+
+/**
+ * Represent log files as comma separated list.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  var logFiles = hash.logFiles;
+  if (logFiles == null) {
+    return "";
+  }
+  var logFilesLen = logFiles.length;
+  if (logFilesLen == 0) {
+    return "";
+  }
+  var nodeId = hash.nodeId;
+  var nodeAddr = hash.nodeAddr;
+  var containerId = hash.containerId;
+  var html = '<td>';
+  var logFilesCommaSeparated = "";
+  for (var i = 0; i < logFilesLen; i++) {
+    html = html + '<a href="yarnContainerLog/' + nodeId + '/' +
+        nodeAddr + '/' + containerId + '/' + logFiles[i] + '">' + logFiles[i] +
+        '</a>';
+    if (i != logFilesLen - 1) {
+      html = html + ",";
+    }
+  }
+  html = html + '</td>';
+  return Ember.String.htmlSafe(html);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-link.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-link.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-link.js
new file mode 100644
index 0000000..99d975b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-link.js
@@ -0,0 +1,37 @@
+/**
+ * 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';
+
+/**
+ * Generate link to node page if its not SHUTDOWN or LOST.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  var nodeState = hash.nodeState;
+  var nodeHTTPAddress = hash.nodeHTTPAddress;
+  var nodeId = hash.nodeId;
+  var html = '<td>';
+  if (nodeState == "SHUTDOWN" || nodeState == "LOST") {
+    html = html + nodeHTTPAddress;
+  } else {
+    html = html + '<a href="yarnNode/' + nodeId + "/" + nodeHTTPAddress + '">' +
+        nodeHTTPAddress + '</a>';
+  }
+  html = html + '</td>';
+  return Ember.String.htmlSafe(html);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-menu.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-menu.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-menu.js
new file mode 100644
index 0000000..589111f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/helpers/node-menu.js
@@ -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.
+ */
+import Ember from 'ember';
+
+/**
+ * Create left hand side node manager menu with menu item activated based
+ * on page being accessed.
+ */
+export default Ember.Helper.helper(function(params,hash) {
+  // Place a menu within a panel inside col-md-2 container.
+  var nodeIdSplitAtPort = hash.nodeId;
+  var portIndex = nodeIdSplitAtPort.indexOf(':');
+  if (portIndex != -1) {
+    nodeIdSplitAtPort = nodeIdSplitAtPort.substring(0, portIndex) +
+        ':&#8203;' + nodeIdSplitAtPort.substring(portIndex + 1);
+  }
+  var normalizedNodeId = '';
+  var splitsAlongDots = nodeIdSplitAtPort.split('.');
+  if (splitsAlongDots) {
+    var len = splitsAlongDots.length;
+    for (var i = 0; i < len; i++) {
+      normalizedNodeId = normalizedNodeId + splitsAlongDots[i];
+      if (i != len - 1) {
+        normalizedNodeId = normalizedNodeId + '.&#8203;';
+      }
+    }
+  } else {
+    normalizedNodeId = nodeIdSplitAtPort;
+  }
+
+  var html = '<div class="col-md-2 container-fluid"><div class="panel panel-default">'+
+      '<div class="panel-heading"><h4>Node Manager<br>(' + normalizedNodeId + ')</h4></div>'+
+      '<div class="panel-body"><ul class="nav nav-pills nav-stacked" id="stacked-menu">' +
+      '<ul class="nav nav-pills nav-stacked collapse in"><li';
+  if (hash.path == 'yarnNode') {
+    html = html + ' class="active"';
+  }
+  html = html + '><a href="yarnNode/' + hash.nodeId + '/' + hash.nodeAddr +
+      '">Node Information</a></li><li';
+  if (hash.path == 'yarnNodeApps') {
+    html = html + ' class="active"';
+  }
+  html = html + '><a href="yarnNodeApps/' + hash.nodeId + '/' + hash.nodeAddr +
+      '">List of Applications</a></li><li';
+  if (hash.path == 'yarnNodeContainers') {
+    html = html + ' class="active"';
+  }
+  html = html + '><a href="yarnNodeContainers/' +hash.nodeId + '/' + hash.nodeAddr +
+      '">List of Containers</a></li></ul></ul></div>';
+  return Ember.String.htmlSafe(html);
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
new file mode 100644
index 0000000..969ea2f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/index.html
@@ -0,0 +1,43 @@
+<!--
+* 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.
+-->
+
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>YarnUi</title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    {{content-for 'head'}}
+
+    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/yarn-ui.css">
+
+    {{content-for 'head-footer'}}
+  </head>
+  <body>
+    {{content-for 'body'}}
+
+    <script src="assets/vendor.js"></script>
+    <script src="assets/yarn-ui.js"></script>
+
+    {{content-for 'body-footer'}}
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-info.js
new file mode 100644
index 0000000..332fdf3
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-info.js
@@ -0,0 +1,31 @@
+/**
+ * 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({
+  startedOn: DS.attr('string'),
+  state: DS.attr('string'),
+  haState: DS.attr('string'),
+  rmStateStoreName: DS.attr('string'),
+  resourceManagerVersion: DS.attr('string'),
+  resourceManagerBuildVersion: DS.attr('string'),
+  hadoopVersion: DS.attr('string'),
+  hadoopBuildVersion: DS.attr('string'),
+  hadoopVersionBuiltOn: DS.attr('string')
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-metric.js
new file mode 100644
index 0000000..981375a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/cluster-metric.js
@@ -0,0 +1,133 @@
+/**
+ * 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({
+  appsSubmitted: DS.attr('number'),
+  appsCompleted: DS.attr('number'),
+  appsPending: DS.attr('number'),
+  appsRunning: DS.attr('number'),
+  appsFailed: DS.attr('number'),
+  appsKilled: DS.attr('number'),
+  reservedMB: DS.attr('number'),
+  availableMB: DS.attr('number'),
+  allocatedMB: DS.attr('number'),
+  reservedVirtualCores: DS.attr('number'),
+  availableVirtualCores: DS.attr('number'),
+  allocatedVirtualCores: DS.attr('number'),
+  containersAllocated: DS.attr('number'),
+  containersReserved: DS.attr('number'),
+  containersPending: DS.attr('number'),
+  totalMB: DS.attr('number'),
+  totalVirtualCores: DS.attr('number'),
+  totalNodes: DS.attr('number'),
+  lostNodes: DS.attr('number'),
+  unhealthyNodes: DS.attr('number'),
+  decommissionedNodes: DS.attr('number'),
+  rebootedNodes: DS.attr('number'),
+  activeNodes: DS.attr('number'),
+
+  getFinishedAppsDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Completed",
+      value: this.get("appsCompleted")
+    });
+    arr.push({
+      label: "Killed",
+      value: this.get("appsKilled")
+    });
+    arr.push({
+      label: "Failed",
+      value: this.get("appsFailed")
+    });
+
+    return arr;
+  }.property("appsCompleted", "appsKilled", "appsFailed"),
+
+  getRunningAppsDataForDonutChart: function() {
+    var arr = [];
+
+    arr.push({
+      label: "Pending",
+      value: this.get("appsPending")
+    });
+    arr.push({
+      label: "Running",
+      value: this.get("appsRunning")
+    });
+
+    return arr;
+  }.property("appsPending", "appsRunning"),
+
+  getNodesDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Active",
+      value: this.get("activeNodes")
+    });
+    arr.push({
+      label: "Unhealthy",
+      value: this.get("unhealthyNodes")
+    });
+    arr.push({
+      label: "Decomissioned",
+      value: this.get("decommissionedNodes")
+    });
+    return arr;
+  }.property("activeNodes", "unhealthyNodes", "decommissionedNodes"),
+
+  getMemoryDataForDonutChart: function() {
+    var type = "MB";
+    var arr = [];
+    arr.push({
+      label: "Allocated",
+      value: this.get("allocated" + type)
+    });
+    arr.push({
+      label: "Reserved",
+      value: this.get("reserved" + type)
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("available" + type)
+    });
+
+    return arr;
+  }.property("allocatedMB", "reservedMB", "availableMB"),
+
+  getVCoreDataForDonutChart: function() {
+    var type = "VirtualCores";
+    var arr = [];
+    arr.push({
+      label: "Allocated",
+      value: this.get("allocated" + type)
+    });
+    arr.push({
+      label: "Reserved",
+      value: this.get("reserved" + type)
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("available" + type)
+    });
+
+    return arr;
+  }.property("allocatedVirtualCores", "reservedVirtualCores", "availableVirtualCores"),
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app-attempt.js
new file mode 100644
index 0000000..b699bb3
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app-attempt.js
@@ -0,0 +1,62 @@
+/**
+ * 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.Model.extend({
+  startTime: DS.attr('string'),
+  finishedTime: DS.attr('string'),
+  containerId: DS.attr('string'),
+  nodeHttpAddress: DS.attr('string'),
+  nodeId: DS.attr('string'),
+  logsLink: DS.attr('string'),
+
+  startTs: function() {
+    return Converter.dateToTimeStamp(this.get("startTime"));
+  }.property("startTime"),
+
+  finishedTs: function() {
+    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
+    return ts;
+  }.property("finishedTime"),
+
+  shortAppAttemptId: function() {
+    return "attempt_" + 
+           parseInt(Converter.containerIdToAttemptId(this.get("containerId")).split("_")[3]);
+  }.property("containerId"),
+
+  elapsedTime: function() {
+    var elapsedMs = this.get("finishedTs") - this.get("startTs");
+    if (elapsedMs <= 0) {
+      elapsedMs = Date.now() - this.get("startTs");
+    }
+
+    return Converter.msToElapsedTime(elapsedMs);
+  }.property(),
+
+  tooltipLabel: function() {
+    return "<p>Id:" + this.get("id") + 
+           "</p><p>ElapsedTime:" + 
+           String(this.get("elapsedTime")) + "</p>";
+  }.property(),
+
+  link: function() {
+    return "/yarnAppAttempt/" + this.get("id");
+  }.property(),
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js
new file mode 100644
index 0000000..1d506c2
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js
@@ -0,0 +1,83 @@
+/**
+ * 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 Converter from 'yarn-ui/utils/converter';
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+  appName: DS.attr('string'),
+  user: DS.attr('string'),
+  queue: DS.attr('string'),
+  state: DS.attr('string'),
+  startTime: DS.attr('string'),
+  elapsedTime: DS.attr('string'),
+  finalStatus: DS.attr('string'),
+  finishedTime: DS.attr('finishedTime'),
+  progress: DS.attr('number'),
+  diagnostics: DS.attr('string'),
+  amContainerLogs: DS.attr('string'),
+  amHostHttpAddress: DS.attr('string'),
+  logAggregationStatus: DS.attr('string'),
+  unmanagedApplication: DS.attr('string'),
+  amNodeLabelExpression: DS.attr('string'),
+  applicationTags: DS.attr('string'),
+  priority: DS.attr('number'),
+  allocatedMB: DS.attr('number'),
+  allocatedVCores: DS.attr('number'),
+  runningContainers: DS.attr('number'),
+  memorySeconds: DS.attr('number'),
+  vcoreSeconds: DS.attr('number'),
+  preemptedResourceMB: DS.attr('number'),
+  preemptedResourceVCores: DS.attr('number'),
+  numNonAMContainerPreempted: DS.attr('number'),
+  numAMContainerPreempted: DS.attr('number'),
+
+  isFailed: function() {
+    return this.get('finalStatus') == "FAILED"
+  }.property("finalStatus"),
+
+  allocatedResource: function() {
+    return Converter.resourceToString(this.get("allocatedMB"), this.get("allocatedVCores"));
+  }.property("allocatedMB", "allocatedVCores"),
+
+  preemptedResource: function() {
+    return Converter.resourceToString(this.get("preemptedResourceMB"), this.get("preemptedResourceVCores"));
+  }.property("preemptedResourceMB", "preemptedResourceVCores"),
+
+  aggregatedResourceUsage: function() {
+    return Converter.resourceToString(this.get("memorySeconds"), this.get("vcoreSeconds")) + " (× Secs)";
+  }.property("memorySeconds", "vcoreSeconds"),
+
+  progressStyle: function() {
+    return "width: " + this.get("progress") + "%";
+  }.property("progress"),
+
+  finalStatusStyle: function() {
+    var style = "default";
+    var finalStatus = this.get("finalStatus");
+    if (finalStatus == "KILLED") {
+      style = "warning";
+    } else if (finalStatus == "FAILED") {
+      style = "danger";
+    } else {
+      style = "success";
+    }
+
+    return "label label-" + style;
+  }.property("finalStatus")
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container-log.js
new file mode 100644
index 0000000..31cf61e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container-log.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 DS from 'ember-data';
+
+export default DS.Model.extend({
+  logs: DS.attr('string'),
+  containerID: DS.attr('string'),
+  logFileName: DS.attr('string')
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js
new file mode 100644
index 0000000..b745296
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-container.js
@@ -0,0 +1,57 @@
+/**
+ * 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.Model.extend({
+  allocatedMB: DS.attr('number'),
+  allocatedVCores: DS.attr('number'),
+  assignedNodeId: DS.attr('string'),
+  priority: DS.attr('number'),
+  startedTime: DS.attr('number'),
+  finishedTime: DS.attr('number'),
+  logUrl: DS.attr('string'),
+  containerExitStatus: DS.attr('number'),
+  containerState: DS.attr('string'),
+  nodeHttpAddress: DS.attr('string'),
+
+  startTs: function() {
+    return Converter.dateToTimeStamp(this.get("startedTime"));
+  }.property("startedTime"),
+
+  finishedTs: function() {
+    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
+    return ts;
+  }.property("finishedTime"),
+
+  elapsedTime: function() {
+    var elapsedMs = this.get("finishedTs") - this.get("startTs");
+    if (elapsedMs <= 0) {
+      elapsedMs = Date.now() - this.get("startTs");
+    }
+
+    return Converter.msToElapsedTime(elapsedMs);
+  }.property(),
+
+  tooltipLabel: function() {
+    return "<p>Id:" + this.get("id") + 
+           "</p><p>ElapsedTime:" + 
+           String(this.get("elapsedTime")) + "</p>";
+  }.property(),
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-app.js
new file mode 100644
index 0000000..6dc69ae
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-app.js
@@ -0,0 +1,44 @@
+/**
+ * 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({
+  appId: DS.attr('string'),
+  state: DS.attr('string'),
+  user: DS.attr('string'),
+  containers: DS.attr('array'),
+  /**
+   * Indicates no rows were retrieved from backend
+   */
+  isDummyApp: function() {
+    return this.get('id') == "dummy";
+  }.property("id"),
+
+  appStateStyle: function() {
+    var style = "default";
+    var appState = this.get("state");
+    if (appState == "RUNNING" || appState == "FINISHING_CONTAINERS_WAIT" ||
+        appState == "APPLICATION_RESOURCES_CLEANINGUP") {
+      style = "primary";
+    } else if (appState == "FINISHED") {
+      style = "success";
+    }
+    return "label label-" + style;
+  }.property("state")
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-container.js
new file mode 100644
index 0000000..3ba3216
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node-container.js
@@ -0,0 +1,57 @@
+/**
+ * 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({
+  containerId: DS.attr('string'),
+  state: DS.attr('string'),
+  user: DS.attr('string'),
+  exitCode: DS.attr('string'),
+  diagnostics: DS.attr('string'),
+  totalMemoryNeeded: DS.attr('number'),
+  totalVCoresNeeded: DS.attr('number'),
+  containerLogFiles: DS.attr('array'),
+
+  /**
+   * Indicates that there was no container retrieved from backend.
+   */
+  isDummyContainer: function() {
+    return this.get('id') == "dummy";
+  }.property("id"),
+
+  containerStateStyle: function() {
+    var style = "primary";
+    var containerState = this.get('state');
+    var containerExitCode = this.get('exitCode');
+    if (containerState == "DONE") {
+      if (containerExitCode == "0") {
+        style = "success";
+      } else if (containerExitCode != "N/A") {
+        style = "danger";
+      }
+    }
+    if (containerState == "EXITED_WITH_SUCCESS") {
+      style = "success";
+    }
+    if (containerState == "EXITED_WITH_FAILURE") {
+      style = "danger";
+    }
+    return "label label-" + style;
+  }.property("state", "exitCode")
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node.js
new file mode 100644
index 0000000..4753983
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-node.js
@@ -0,0 +1,33 @@
+/**
+ * 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({
+  totalVmemAllocatedContainersMB: DS.attr('number'),
+  totalPmemAllocatedContainersMB: DS.attr('number'),
+  totalVCoresAllocatedContainers: DS.attr('number'),
+  vmemCheckEnabled: DS.attr('boolean'),
+  pmemCheckEnabled: DS.attr('boolean'),
+  nodeHealthy: DS.attr('boolean'),
+  lastNodeUpdateTime: DS.attr('string'),
+  healthReport: DS.attr('string'),
+  nmStartupTime: DS.attr('string'),
+  nodeManagerBuildVersion: DS.attr('string'),
+  hadoopBuildVersion: DS.attr('string'),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js
new file mode 100644
index 0000000..7de4ccc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-queue.js
@@ -0,0 +1,94 @@
+/**
+ * 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'),
+  capacity: DS.attr('number'),
+  maxCapacity: DS.attr('number'),
+  usedCapacity: DS.attr('number'),
+  absCapacity: DS.attr('number'),
+  absMaxCapacity: DS.attr('number'),
+  absUsedCapacity: DS.attr('number'),
+  state: DS.attr('string'),
+  userLimit: DS.attr('number'),
+  userLimitFactor: DS.attr('number'),
+  preemptionDisabled: DS.attr('number'),
+  numPendingApplications: DS.attr('number'),
+  numActiveApplications: DS.attr('number'),
+  users: DS.hasMany('YarnUser'),
+
+  isLeafQueue: function() {
+    var len = this.get("children.length");
+    if (!len) {
+      return true;
+    }
+    return len <= 0;
+  }.property("children"),
+
+  capacitiesBarChartData: function() {
+    return [
+      {
+        label: "Absolute Capacity",
+        value: this.get("name") == "root" ? 100 : this.get("absCapacity")
+      },
+      {
+        label: "Absolute Used",
+        value: this.get("name") == "root" ? this.get("usedCapacity") : this.get("absUsedCapacity")
+      },
+      {
+        label: "Absolute Max Capacity",
+        value: this.get("name") == "root" ? 100 : this.get("absMaxCapacity")
+      }
+    ]
+  }.property("absCapacity", "absUsedCapacity", "absMaxCapacity"),
+
+  userUsagesDonutChartData: function() {
+    var data = [];
+    if (this.get("users")) {
+      this.get("users").forEach(function(o) {
+        data.push({
+          label: o.get("name"),
+          value: o.get("usedMemoryMB")
+        })
+      });
+    }
+
+    return data;
+  }.property("users"),
+
+  hasUserUsages: function() {
+    return this.get("userUsagesDonutChartData").length > 0;
+  }.property(),
+
+  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(),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-rm-node.js
new file mode 100644
index 0000000..9a1082c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-rm-node.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.Model.extend({
+  rack: DS.attr('string'),
+  state: DS.attr('string'),
+  nodeHostName: DS.attr('string'),
+  nodeHTTPAddress: DS.attr('string'),
+  lastHealthUpdate: DS.attr('string'),
+  healthReport: DS.attr('string'),
+  numContainers: DS.attr('number'),
+  usedMemoryMB: DS.attr('number'),
+  availMemoryMB: DS.attr('number'),
+  usedVirtualCores: DS.attr('number'),
+  availableVirtualCores: DS.attr('number'),
+  version: DS.attr('string'),
+  nodeLabels: DS.attr('array'),
+
+  nodeLabelsAsString: function() {
+    var labels = this.get("nodeLabels");
+    var labelToReturn = "";
+    // Only one label per node supported.
+    if (labels && labels.length > 0) {
+      labelToReturn = labels[0];
+    }
+    return labelToReturn;
+  }.property("nodeLabels"),
+
+  /**
+   * Indicates no rows were retrieved from backend
+   */
+  isDummyNode: function() {
+    return this.get('id') == "dummy";
+  }.property("id"),
+
+  nodeStateStyle: function() {
+    var style = "default";
+    var nodeState = this.get("state");
+    if (nodeState == "REBOOTED") {
+      style = "warning";
+    } else if (nodeState == "UNHEALTHY" || nodeState == "DECOMMISSIONED" ||
+          nodeState == "LOST" || nodeState == "SHUTDOWN") {
+      style = "danger";
+    } else if (nodeState == "RUNNING") {
+      style = "success";
+    }
+    return "label label-" + style;
+  }.property("state"),
+
+  getMemoryDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Used",
+      value: this.get("usedMemoryMB")
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("availMemoryMB")
+    });
+    return arr;
+  }.property("availMemoryMB", "usedMemoryMB"),
+
+  getVCoreDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Used",
+      value: this.get("usedVirtualCores")
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("availableVirtualCores")
+    });
+    return arr;
+  }.property("availableVirtualCores", "usedVirtualCores"),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js
new file mode 100644
index 0000000..7cfd182
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-user.js
@@ -0,0 +1,26 @@
+/**
+ * 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'),
+  queueName: DS.attr('string'),
+  usedMemoryMB: DS.attr('number'),
+  usedVCore: DS.attr('number')
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.js
new file mode 100644
index 0000000..67e9d2c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/router.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 Ember from 'ember';
+import config from './config/environment';
+
+var Router = Ember.Router.extend({
+  location: config.locationType
+});
+
+Router.map(function() {
+  this.route('yarnApps');
+  this.route('yarnNodes');
+  this.route('yarnNode', { path: '/yarnNode/:node_id/:node_addr' });
+  this.route('yarnNodeApps', { path: '/yarnNodeApps/:node_id/:node_addr' });
+  this.route('yarnNodeApp',
+      { path: '/yarnNodeApp/:node_id/:node_addr/:app_id' });
+  this.route('yarnNodeContainers',
+      { path: '/yarnNodeContainers/:node_id/:node_addr' });
+  this.route('yarnNodeContainer',
+      { path: '/yarnNodeContainer/:node_id/:node_addr/:container_id' });
+  this.route('yarnContainerLog', { path:
+      '/yarnContainerLog/:node_id/:node_addr/:container_id/:filename' });
+  this.route('yarnQueue', { path: '/yarnQueue/:queue_name' });
+  this.route('clusterOverview');
+  this.route('yarnApp', { path: '/yarnApp/:app_id' });
+  this.route('yarnAppAttempt', { path: '/yarnAppAttempt/:app_attempt_id'});
+  this.route('error');
+  this.route('notfound', { path: '*:' });
+});
+
+export default Router;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.js
new file mode 100644
index 0000000..b7a5754
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/application.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({
+  actions: {
+    /**
+     * Base error handler for the application.
+     * If specific routes do not handle the error, it will bubble up to
+     * this handler. Here we redirect to either 404 page or a generic
+     * error handler page.
+     */
+    error: function (error) {
+      if (error && error.errors[0] &&
+          error.errors[0].status == 404) {
+        this.intermediateTransitionTo('/notfound');
+      } else {
+        this.intermediateTransitionTo('/error');
+      }
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js
new file mode 100644
index 0000000..4b4e554
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/cluster-overview.js
@@ -0,0 +1,29 @@
+/**
+ * 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('ClusterMetric');
+  },
+
+  afterModel() {
+    this.controllerFor("ClusterOverview").set("loading", false);
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/index.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/index.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/index.js
new file mode 100644
index 0000000..b228ff4
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/index.js
@@ -0,0 +1,29 @@
+/**
+ * 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({
+  /**
+   * Redirect root URL to cluster overview page.
+   */
+  beforeModel: function() {
+    this.replaceWith('clusterOverview');
+  }
+});
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.js
new file mode 100644
index 0000000..72a001c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app-attempt.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 Ember from 'ember';
+
+export default Ember.Route.extend({
+  model(param) {
+    return Ember.RSVP.hash({
+      attempt: this.store.findRecord('yarnAppAttempt', param.app_attempt_id),
+      
+      rmContainers: this.store.query('yarnContainer', 
+        {
+          app_attempt_id: param.app_attempt_id,
+          is_rm: true
+        }),
+      
+      tsContainers: this.store.query('yarnContainer', 
+        {
+          app_attempt_id: param.app_attempt_id,
+          is_rm: false
+        }),
+    });
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
new file mode 100644
index 0000000..fcdfad8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-app.js
@@ -0,0 +1,28 @@
+/**
+ * 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({
+      app: this.store.find('yarnApp', param.app_id),
+      attempts: this.store.query('yarnAppAttempt', { appId: param.app_id})
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js
new file mode 100644
index 0000000..083f62d
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-apps.js
@@ -0,0 +1,26 @@
+/**
+ * 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() {
+    var apps = this.store.findAll('yarnApp');
+    return apps;
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-container-log.js
new file mode 100644
index 0000000..c324025
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-container-log.js
@@ -0,0 +1,55 @@
+/**
+ * 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 Constants from 'yarn-ui/constants';
+
+export default Ember.Route.extend({
+  model(param) {
+    var id = param.node_addr + Constants.PARAM_SEPARATOR + param.container_id +
+        Constants.PARAM_SEPARATOR + param.filename;
+    return Ember.RSVP.hash({
+      containerLog: this.store.findRecord('yarnContainerLog', id),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    }).then(function(hash) {
+      // Just return as its success.
+      return hash;
+    }, function(reason) {
+      if (reason.errors && reason.errors[0]) {
+        // This means HTTP error response was sent by adapter.
+        return reason;
+      } else {
+        // Assume empty response received from server.
+        return { nodeInfo: { id: param.node_id, addr: param.node_addr },
+            containerLog: { logs: "", containerID: param.container_id,
+                logFileName: param.filename}};
+      }
+    });
+  },
+
+  afterModel(model) {
+    // Handle errors and redirect if promise is rejected.
+    if (model.errors && model.errors[0]) {
+      if (model.errors[0].status == 404) {
+        this.replaceWith('/notfound');
+      } else {
+        this.replaceWith('/error');
+      }
+    }
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js
new file mode 100644
index 0000000..63b1f2a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-app.js
@@ -0,0 +1,29 @@
+/**
+ * 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({
+      nodeApp: this.store.queryRecord('yarnNodeApp',
+          { nodeAddr : param.node_addr, appId: param.app_id }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-apps.js
new file mode 100644
index 0000000..ffb5b7b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-apps.js
@@ -0,0 +1,29 @@
+/**
+ * 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) {
+    // Get all apps running on a specific node. Node is contacted by using node_addr.
+    return Ember.RSVP.hash({
+      apps: this.store.query('yarnNodeApp', { nodeAddr: param.node_addr }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js
new file mode 100644
index 0000000..2022662
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-container.js
@@ -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.
+ */
+
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+  model(param) {
+    // Get a specific container running on a specific node.
+    return Ember.RSVP.hash({
+      nodeContainer: this.store.queryRecord('yarnNodeContainer',
+          { nodeHttpAddr: param.node_addr, containerId: param.container_id }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-containers.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-containers.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-containers.js
new file mode 100644
index 0000000..9a69729
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node-containers.js
@@ -0,0 +1,28 @@
+/**
+ * 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) {
+    // Get all containers running on specific node.
+    return Ember.RSVP.hash({
+      containers: this.store.query('yarnNodeContainer', { nodeHttpAddr: param.node_addr }),
+      nodeInfo: { id: param.node_id, addr: param.node_addr }
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js
new file mode 100644
index 0000000..7c58b94
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-node.js
@@ -0,0 +1,29 @@
+/**
+ * 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) {
+    // Fetches data from both NM and RM. RM is queried to get node usage info.
+    return Ember.RSVP.hash({
+      node: this.store.findRecord('yarnNode', param.node_addr),
+      rmNode: this.store.findRecord('yarnRmNode', param.node_id)
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.js
new file mode 100644
index 0000000..f33eef8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/routes/yarn-nodes.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('yarnRmNode');
+  }
+});


[16/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml
new file mode 100644
index 0000000..12ad127
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/pom.xml
@@ -0,0 +1,230 @@
+<!--
+   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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>hadoop-yarn</artifactId>
+    <groupId>org.apache.hadoop</groupId>
+    <version>3.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.hadoop</groupId>
+  <artifactId>hadoop-yarn-ui</artifactId>
+  <version>3.0.0-SNAPSHOT</version>
+  <name>Apache Hadoop YARN UI</name>
+  <packaging>${packaging.type}</packaging>
+
+  <properties>
+    <packaging.type>jar</packaging.type>
+    <webappDir>src/main/webapp</webappDir>
+    <node.executable>node</node.executable>
+    <nodeVersion>v0.12.2</nodeVersion>
+    <npmVersion>2.10.0</npmVersion>
+    <skipTests>false</skipTests>
+  </properties>
+
+  <build>
+    <plugins>
+      <!-- Apache RAT -->
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>src/main/webapp/node/**/*</exclude>
+            <exclude>src/main/webapp/node_modules/**/*</exclude>
+            <exclude>src/main/webapp/bower_components/**/*</exclude>
+            <exclude>src/main/webapp/.tmp/**/*</exclude>
+            <exclude>src/main/webapp/dist/**/*</exclude>
+            <exclude>src/main/webapp/tmp/**/*</exclude>
+            <exclude>src/main/webapp/.bowerrc</exclude>
+            <exclude>src/main/webapp/.editorconfig</exclude>
+            <exclude>src/main/webapp/.ember-cli</exclude>
+            <exclude>src/main/webapp/.gitignore</exclude>
+            <exclude>src/main/webapp/.jshintrc</exclude>
+            <exclude>src/main/webapp/jsconfig.json</exclude>
+            <exclude>src/main/webapp/tests/.jshintrc</exclude>
+            <exclude>src/main/webapp/blueprints/.jshintrc</exclude>
+            <exclude>src/main/webapp/.travis.yml</exclude>
+            <exclude>src/main/webapp/.watchmanconfig</exclude>
+            <exclude>src/main/webapp/bower.json</exclude>
+            <exclude>src/main/webapp/ember-cli-build.js</exclude>
+            <exclude>src/main/webapp/package.json</exclude>
+            <exclude>src/main/webapp/testem.json</exclude>
+            <exclude>src/main/webapp/public/assets/images/*</exclude>
+            <exclude>src/main/webapp/public/robots.txt</exclude>
+            <exclude>.jshintrc</exclude>
+            <exclude>.travis.yml</exclude>
+            <exclude>.ember-cli</exclude>
+            <exclude>.editorconfig</exclude>
+            <exclude>.watchmanconfig</exclude>
+            <exclude>public/crossdomain.xml</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+
+      <plugin>
+         <artifactId>maven-clean-plugin</artifactId>
+         <version>3.0.0</version>
+         <configuration>
+            <followSymLinks>false</followSymLinks>
+            <filesets>
+               <fileset>
+                  <directory>${basedir}/dist</directory>
+               </fileset>
+               <fileset>
+                  <directory>${basedir}/tmp</directory>
+               </fileset>
+               <fileset>
+                  <directory>${basedir}/src/main/webapp/dist</directory>
+               </fileset>
+               <fileset>
+                  <directory>${basedir}/src/main/webapp/bower_components</directory>
+               </fileset>
+               <fileset>
+                  <directory>${basedir}/src/main/webapp/node_modules</directory>
+               </fileset>
+               <fileset>
+                  <directory>${basedir}/src/main/webapp/tmp</directory>
+               </fileset>
+               <fileset>
+                  <directory>${basedir}/src/main/webapp/node</directory>
+               </fileset>
+            </filesets>
+         </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>yarn-ui</id>
+
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+
+      <properties>
+        <packaging.type>war</packaging.type>
+      </properties>
+
+      <build>
+        <plugins>
+          <!-- Bower install & grunt build-->
+          <plugin>
+            <artifactId>exec-maven-plugin</artifactId>
+            <groupId>org.codehaus.mojo</groupId>
+            <executions>
+              <execution>
+                <phase>generate-sources</phase>
+                <id>npm install</id>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <workingDirectory>${webappDir}</workingDirectory>
+                  <executable>npm</executable>
+                  <arguments>
+                    <argument>install</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+              <execution>
+                <phase>generate-sources</phase>
+                <id>bower install</id>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <workingDirectory>${webappDir}</workingDirectory>
+                  <executable>bower</executable>
+                  <arguments>
+                    <argument>--allow-root</argument>
+                    <argument>install</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+              <execution>
+                <phase>generate-sources</phase>
+                <id>bower --allow-root install</id>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <workingDirectory>${webappDir}</workingDirectory>
+                  <executable>bower</executable>
+                  <arguments>
+                    <argument>--allow-root</argument>
+                    <argument>install</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+              <execution>
+                <id>ember build</id>
+                <phase>generate-sources</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <workingDirectory>${webappDir}</workingDirectory>
+                  <executable>ember</executable>
+                  <arguments>
+                    <argument>build</argument>
+                    <argument>-prod</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+              <execution>
+                <id>ember test</id>
+                <phase>generate-resources</phase>
+                <goals>
+                  <goal>exec</goal>
+                </goals>
+                <configuration>
+                  <skip>${skipTests}</skip>
+                  <workingDirectory>${webappDir}</workingDirectory>
+                  <executable>ember</executable>
+                  <arguments>
+                    <argument>test</argument>
+                  </arguments>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+
+          <!-- Package into war -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <webXml>${basedir}/src/main/webapp/WEB-INF/web.xml</webXml>
+              <warSourceDirectory>${webappDir}/dist</warSourceDirectory>
+              <webResources>
+                <resource>
+                  <filtering>false</filtering>
+                  <directory>${basedir}/src/main/resources/</directory>
+                </resource>
+              </webResources>
+            </configuration>
+          </plugin>
+
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt
deleted file mode 100644
index f591645..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/public/robots.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# http://www.robotstxt.org
-User-agent: *
-Disallow:

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/resources/META-INF/NOTICE.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/resources/META-INF/NOTICE.txt b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..9a6feaf
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,10 @@
+Apache Tez
+Copyright (c) 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This tez-ui bundle includes fonts protected under the Open Font License.
+These fonts can only be distributed as part of a piece of software, but
+not individually. See the license for details.  http://scripts.sil.org/OFL.
+More information on included fonts can be found in the LICENSE file.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/WEB-INF/web.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..ddb8532
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/WEB-INF/web.xml
@@ -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.
+-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+  <display-name>YARN UI</display-name>
+</web-app>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.js
new file mode 100644
index 0000000..7dcbe61
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-info.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 DS from 'ember-data';
+import Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
+  namespace: 'ws/v1/cluster', // common const
+  pathForType(modelName) {
+    return ''; // move to some common place, return path by modelname.
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.js
new file mode 100644
index 0000000..ad5ae0e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/cluster-metric.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 DS from 'ember-data';
+import Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
+  namespace: 'ws/v1/cluster/metrics', // common const
+  pathForType(modelName) {
+    return ''; // move to some common place, return path by modelname.
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
new file mode 100644
index 0000000..7b233bc
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app-attempt.js
@@ -0,0 +1,50 @@
+/**
+ * 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';
+import Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
+  namespace: 'ws/v1/cluster', // common const
+
+  urlForQuery(query, modelName) {
+    var url = this._buildURL();
+    return url + '/apps/' + query.appId + "/appattempts";
+  },
+
+  urlForFindRecord(id, modelName, snapshot) {
+    var url = this._buildURL();
+    var url = url + '/apps/' + 
+           Converter.attemptIdToAppId(id) + "/appattempts/" + id;
+    console.log(url);
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
new file mode 100644
index 0000000..5cd888c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-app.js
@@ -0,0 +1,44 @@
+/**
+ * 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 Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
+  namespace: 'ws/v1/cluster', // common const
+  pathForType(modelName) {
+    return 'apps'; // move to some common place, return path by modelname.
+  },
+  /*
+  urlForQuery(query, modelName) {
+    var url = this._buildURL();
+    return url + '/apps/' + query.appId + "/appattempts";
+  },
+  */
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.js
new file mode 100644
index 0000000..7838c98
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container-log.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';
+import Converter from 'yarn-ui/utils/converter';
+
+/**
+ * REST URL's response when fetching container logs will be
+ * in plain text format and not JSON.
+ */
+export default DS.RESTAdapter.extend({
+  headers: {
+    Accept: 'text/plain'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForFindRecord(id, modelName, snapshot) {
+    var splits = Converter.splitForContainerLogs(id);
+    var nodeHttpAddr = splits[0];
+    var containerId = splits[1];
+    var filename = splits[2];
+    this.host = this.host + nodeHttpAddr;
+    var url = this._buildURL();
+    url = url + "/containerlogs/" + containerId + "/" + filename;
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  },
+
+  /**
+   * Override options so that result is not expected to be JSON
+   */
+  ajaxOptions: function (url, type, options) {
+    var hash = options || {};
+    hash.url = url;
+    hash.type = type;
+    // Make sure jQuery does not try to convert response to JSON.
+    hash.dataType = 'text';
+    hash.context = this;
+
+    var headers = Ember.get(this, 'headers');
+    if (headers != undefined) {
+      hash.beforeSend = function (xhr) {
+        Object.keys(headers).forEach(function (key) {
+          return xhr.setRequestHeader(key, headers[key]);
+        });
+      };
+    }
+    return hash;
+  },
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
new file mode 100644
index 0000000..67a37f7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-container.js
@@ -0,0 +1,61 @@
+/**
+ * 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';
+import Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  rmHost: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
+  tsHost: 'http://localhost:1337/' + Config.TS_HOST + ':' + Config.TS_PORT,
+  host: function() {
+    return undefined
+  }.property(),
+  rmNamespace: 'ws/v1/cluster',
+  tsNamespace: 'ws/v1/applicationhistory',
+  namespace: function() {
+    return undefined
+  }.property(),
+
+  urlForQuery(query, modelName) {
+    if (query.is_rm) {
+      this.set("host", this.rmHost);
+      this.set("namespace", this.rmNamespace);
+    } else {
+      this.set("host", this.tsHost);
+      this.set("namespace", this.tsNamespace);
+    }
+
+    var url = this._buildURL();
+    url = url + '/apps/' + Converter.attemptIdToAppId(query.app_attempt_id) 
+               + "/appattempts/" + query.app_attempt_id + "/containers";
+    console.log(url);
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
new file mode 100644
index 0000000..0c60d1f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-app.js
@@ -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.
+ */
+
+import DS from 'ember-data';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForQuery(query) {
+    this.host = this.host + query.nodeAddr;
+    var url = this._buildURL();
+    url = url + "/apps";
+    return url;
+  },
+
+  urlForQueryRecord: function (query) {
+    this.host = this.host + query.nodeAddr;
+    var url = this._buildURL();
+    url = url + "/apps/" + query.appId;
+    return url;
+  },
+
+  query: function (store, type, query) {
+    var url = this.urlForQuery(query);
+    // Query params not required.
+    query = null;
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  queryRecord: function (store, type, query) {
+    var url = this.urlForQueryRecord(query);
+    // Query params not required.
+    query = null;
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
new file mode 100644
index 0000000..e8bf7b7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node-container.js
@@ -0,0 +1,64 @@
+/**
+ * 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.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForQuery(query) {
+    this.host = this.host + query.nodeHttpAddr;
+    var url = this._buildURL();
+    url = url + "/containers";
+    return url;
+  },
+
+  urlForQueryRecord(query) {
+    this.host = this.host + query.nodeHttpAddr;
+    var url = this._buildURL();
+    url = url + "/containers/" + query.containerId;
+    return url;
+  },
+
+  query: function (store, type, query) {
+    var url = this.urlForQuery(query);
+    // Query params not required.
+    query = null;
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  queryRecord: function (store, type, query) {
+    var url = this.urlForQueryRecord(query);
+    // Query params not required.
+    query = null;
+    console.log(url);
+    return this.ajax(url, 'GET', { data: query });
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
new file mode 100644
index 0000000..64f524a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-node.js
@@ -0,0 +1,40 @@
+/**
+ * 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.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/',
+  namespace: 'ws/v1/node',
+
+  urlForFindRecord(id, modelName, snapshot) {
+    this.host = this.host + id;
+    var url = this._buildURL();
+    return url;
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "NM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-queue.js
new file mode 100644
index 0000000..ebe7b39
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/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 DS from 'ember-data';
+import Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT, // configurable
+  namespace: 'ws/v1/cluster', // common const
+  pathForType(modelName) {
+    return 'scheduler'; // move to some common place, return path by modelname.
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
new file mode 100644
index 0000000..c6ad6f3
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/adapters/yarn-rm-node.js
@@ -0,0 +1,45 @@
+/**
+ * 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 Config from 'yarn-ui/config';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/' + Config.RM_HOST + ':' + Config.RM_PORT,
+  namespace: 'ws/v1/cluster',
+  pathForType(modelName) {
+    return 'nodes';
+  },
+
+  urlForFindRecord(id, modelName, snapshot) {
+    var url = this._buildURL();
+    url = url + "/nodes/" + id;
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash);
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.js
new file mode 100644
index 0000000..5617953
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/app.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';
+import Resolver from 'ember/resolver';
+import loadInitializers from 'ember/load-initializers';
+import config from './config/environment';
+import Sorter from 'yarn-ui/utils/sorter';
+
+var App;
+
+Ember.MODEL_FACTORY_INJECTIONS = true;
+
+App = Ember.Application.extend({
+  modulePrefix: config.modulePrefix,
+  podModulePrefix: config.podModulePrefix,
+  Resolver: Resolver
+});
+
+loadInitializers(App, config.modulePrefix);
+Sorter.initDataTableSorter();
+
+export default App;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-attempt-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-attempt-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-attempt-table.js
new file mode 100644
index 0000000..4b741b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-attempt-table.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-table.js
new file mode 100644
index 0000000..4b741b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/app-table.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/bar-chart.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/bar-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/bar-chart.js
new file mode 100644
index 0000000..8e48279
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/bar-chart.js
@@ -0,0 +1,122 @@
+/**
+ * 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 BaseChartComponent from 'yarn-ui/components/base-chart-component';
+
+export default BaseChartComponent.extend({
+  // data: 
+  //    [{label=label1, value=value1}, ...]
+  //    ...
+  renderBarChart: function(data, title, textWidth = 50) {
+    var g = this.chart.g;
+    var layout = this.getLayout();
+    this.renderTitleAndBG(g, title, layout);
+
+    var maxValue = -1;
+    for (var i = 0; i < data.length; i++) {
+      if (data[i] instanceof Array) {
+        if (data[i][0].value > maxValue) {
+          maxValue = data[i][0].value;
+        }
+      } else {
+        if (data[i].value > maxValue) {
+          maxValue = data[i].value;
+        }
+      }
+    }
+
+    var singleBarHeight = 30;
+
+    // 50 is for text
+    var maxBarWidth = layout.x2 - layout.x1 - 2 * layout.margin - textWidth - 50;
+
+    // 30 is for title
+    var maxBarsHeight = layout.y2 - layout.y1 - 2 * layout.margin - 30;
+    var gap = (maxBarsHeight - data.length * singleBarHeight) / (data.length -
+      1);
+
+    var xScaler = d3.scale.linear()
+      .domain([0, maxValue])
+      .range([0, maxBarWidth]);
+
+    // show bar text
+    for (var i = 0; i < data.length; i++) {
+      g.append("text")
+        .text(
+          function() {
+            return data[i].label;
+          })
+        .attr("y", function() {
+          return layout.y1 + singleBarHeight / 2 + layout.margin + (gap +
+            singleBarHeight) * i + 30;
+        })
+        .attr("x", layout.x1 + layout.margin);
+    }
+
+    // show bar
+    var bar = g.selectAll("bars")
+      .data(data)
+      .enter()
+      .append("rect")
+      .attr("y", function(d, i) {
+        return layout.y1 + 30 + layout.margin + (gap + singleBarHeight) * i;
+      })
+      .attr("x", layout.x1 + layout.margin + textWidth)
+      .attr("height", singleBarHeight)
+      .attr("fill", function(d, i) {
+        return this.colors[i];
+      }.bind(this))
+      .attr("width", 0);
+
+    this.bindTooltip(bar);
+
+    bar.transition()
+      .duration(500)
+      .attr("width", function(d) {
+        var w;
+        w = xScaler(d.value);
+        // At least each item has 3 px
+        w = Math.max(w, 3);
+        return w;
+      });
+
+    // show bar value
+    for (var i = 0; i < data.length; i++) {
+      g.append("text")
+        .text(
+          function() {
+            return data[i].value;
+          })
+        .attr("y", function() {
+          return layout.y1 + singleBarHeight / 2 + layout.margin + (gap +
+            singleBarHeight) * i + 30;
+        })
+        .attr("x", layout.x1 + layout.margin + textWidth + 15 + xScaler(data[i].value));
+    }
+  },
+
+  draw: function() {
+    this.initChart();
+    this.renderBarChart(this.get("data"), this.get("title"), this.get("textWidth"));
+  },
+
+  didInsertElement: function() {
+    this.draw();
+  },
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/base-chart-component.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/base-chart-component.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/base-chart-component.js
new file mode 100644
index 0000000..b85b6ab
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/base-chart-component.js
@@ -0,0 +1,127 @@
+/**
+ * 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.Component.extend({
+  chart: undefined,
+  tooltip : undefined,
+  colors: d3.scale.category10().range(),
+
+  initChart: function() {
+    this.chart = {
+      svg: undefined,
+      g: undefined,
+      h: 0,
+      w: 0,
+      tooltip: undefined
+    };
+
+    // Init tooltip if it is not initialized
+    this.tooltip = d3.select("#chart-tooltip");
+    if (!this.tooltip) {
+      this.tooltip = d3.select("body")
+        .append("div")
+        .attr("class", "tooltip")
+        .attr("id", "chart-tooltip")
+        .style("opacity", 0);
+    }
+
+    // Init svg
+    var svg = this.chart.svg;
+    if (svg) {
+      svg.remove();
+    }
+
+    var parentId = this.get("parentId");
+    var parent = d3.select("#" + parentId);
+    var bbox = parent.node().getBoundingClientRect();
+    this.chart.w = bbox.width - 30;
+
+    var ratio = 0.75; // 4:3 by default
+    if (this.get("ratio")) {
+      ratio = this.get("ratio");
+    }
+    this.chart.h = bbox.width * ratio;
+
+    if (this.get("maxHeight")) {
+      this.chart.h = Math.min(this.get("maxHeight"), this.chart.h);
+    }
+
+    this.chart.svg = parent.append("svg")
+      .attr("width", this.chart.w)
+      .attr("height", this.chart.h);
+
+    this.chart.g = this.chart.svg.append("g");
+  },
+
+  renderTitleAndBG: function(g, title, layout) {
+    var bg = g.append("g");
+    bg.append("text")
+      .text(title)
+      .attr("x", (layout.x1 + layout.x2) / 2)
+      .attr("y", layout.y1 + layout.margin + 20)
+      .attr("class", "chart-title");
+
+    bg.append("rect")
+      .attr("x", layout.x1)
+      .attr("y", layout.y1)
+      .attr("width", layout.x2 - layout.x1)
+      .attr("height", layout.y2 - layout.y1)
+      .attr("class", "chart-frame");
+  },
+
+  bindTooltip: function(d) {
+    d.on("mouseover", function(d) {
+        this.tooltip
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mousemove", function(d) {
+        // Handle pie chart case
+        var data = d;
+        if (d.data) {
+          data = d.data;
+        }
+
+        this.tooltip.style("opacity", .9);
+        this.tooltip.html(data.label + " = " + data.value)
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mouseout", function(d) {
+        this.tooltip.style("opacity", 0);
+      }.bind(this));
+  },
+
+  getLayout: function() {
+    var x1 = 0;
+    var y1 = 0;
+    var x2 = this.chart.w;
+    var y2 = this.chart.h;
+
+    var layout = {
+      x1: x1,
+      y1: y1,
+      x2: x2 - 10,
+      y2: y2 - 10,
+      margin: 10
+    };
+    return layout;
+  },
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/container-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/container-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/container-table.js
new file mode 100644
index 0000000..4b741b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/container-table.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/donut-chart.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/donut-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/donut-chart.js
new file mode 100644
index 0000000..e6dcb12
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/donut-chart.js
@@ -0,0 +1,166 @@
+/**
+ * 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 BaseChartComponent from 'yarn-ui/components/base-chart-component';
+
+export default BaseChartComponent.extend({
+  /*
+   * data = [{label="xx", value=},{...}]
+   */
+  renderDonutChart: function(data, title, showLabels = false, 
+    middleLabel = "Total", middleValue = undefined) {
+    var g = this.chart.g;
+    var layout = this.getLayout();
+    this.renderTitleAndBG(g, title, layout);
+
+    var total = 0;
+    var allZero = true;
+    for (var i = 0; i < data.length; i++) {
+      total += data[i].value;
+      if (data[i].value > 1e-6) {
+        allZero = false;
+      }
+    }
+
+    if (!middleValue) {
+      middleValue = total;
+    }
+
+    //Width and height
+    var h = layout.y2 - layout.y1;
+
+    // 50 is for title
+    var outerRadius = (h - 50 - 2 * layout.margin) / 2;
+    var innerRadius = outerRadius * 0.618;
+    var arc = d3.svg.arc()
+      .innerRadius(innerRadius)
+      .outerRadius(outerRadius);
+
+    var cx;
+    var cy = layout.y1 + 50 + layout.margin + outerRadius;
+    if (showLabels) {
+      cx = layout.x1 + layout.margin + outerRadius;
+    } else {
+      cx = (layout.x1 + layout.x2) / 2;
+    }
+
+    var pie = d3.layout.pie();
+    pie.sort(null);
+    pie.value(function(d) {
+      var v = d.value;
+      // make sure it > 0
+      v = Math.max(v, 1e-6);
+      return v;
+    });
+
+    //Set up groups
+    var arcs = g
+      .selectAll("g.arc")
+      .data(pie(data))
+      .enter()
+      .append("g")
+      .attr("class", "arc")
+      .attr("transform", "translate(" + cx + "," + cy + ")");
+
+    function tweenPie(finish) {
+      var start = {
+        startAngle: 0,
+        endAngle: 0
+      };
+      var i = d3.interpolate(start, finish);
+      return function(d) {
+        return arc(i(d));
+      };
+    }
+
+    //Draw arc paths
+    var path = arcs.append("path")
+      .attr("fill", function(d, i) {
+        if (d.value > 1e-6) {
+          return this.colors[i];
+        } else {
+          return "white";
+        }
+      }.bind(this))
+      .attr("d", arc)
+      .attr("stroke", function(d, i) {
+        if (allZero) {
+          return this.colors[i];
+        }
+      }.bind(this))
+      .attr("stroke-dasharray", function(d, i) {
+        if (d.value <= 1e-6) {
+          return "10,10";
+        }
+      }.bind(this));
+    this.bindTooltip(path);
+
+    // Show labels
+    if (showLabels) {
+      var lx = layout.x1 + layout.margin + outerRadius * 2 + 30;
+      var squareW = 15;
+      var margin = 10;
+
+      var select = g.selectAll(".rect")
+        .data(data)
+        .enter();
+      select.append("rect")
+        .attr("fill", function(d, i) {
+          return this.colors[i];
+        }.bind(this))
+        .attr("x", lx)
+        .attr("y", function(d, i) {
+          return layout.y1 + 50 + (squareW + margin) * i + layout.margin;
+        })
+        .attr("width", squareW)
+        .attr("height", squareW);
+      select.append("text")
+        .attr("x", lx + squareW + margin)
+        .attr("y", function(d, i) {
+          return layout.y1 + 50 + (squareW + margin) * i + layout.margin + squareW / 2;
+        })
+        .text(function(d) {
+          return d.label + ' = ' + d.value;
+        });
+    }
+
+    if (middleLabel) {
+      var highLightColor = this.colors[0];
+      g.append("text").text(middleLabel).attr("x", cx).attr("y", cy - 10).
+        attr("class", "donut-highlight-text").attr("fill", highLightColor);
+      g.append("text").text(middleValue).attr("x", cx).attr("y", cy + 20).
+        attr("class", "donut-highlight-text").attr("fill", highLightColor).
+        style("font-size", "30px");
+    }
+
+    path.transition()
+      .duration(500)
+      .attrTween('d', tweenPie);
+  },
+
+  draw: function() {
+    this.initChart();
+    this.renderDonutChart(this.get("data"), this.get("title"), this.get("showLabels"), 
+                          this.get("middleLabel"), this.get("middleValue"));
+  },
+
+  didInsertElement: function() {
+    this.draw();
+  },
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/item-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/item-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/item-selector.js
new file mode 100644
index 0000000..235e438
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/item-selector.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 Ember from 'ember';
+
+export default Ember.Component.extend({
+  didInsertElement: function() {
+    $(".js-example-basic-single").select2(
+      {
+        width: '100%',
+        placeholder: "Select a queue"
+      });
+    var elementId = this.get("element-id");
+    var prefix = this.get("prefix");
+
+    var element = d3.select("#" + elementId);
+
+    if (element) {
+      this.get("model").forEach(function(o) {
+        element.append("option").attr("value", o.get("name")).text(prefix + o.get("name"));
+      });
+    }
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-configuration-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-configuration-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-configuration-table.js
new file mode 100644
index 0000000..4b741b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-configuration-table.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js
new file mode 100644
index 0000000..4b741b8
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js
@@ -0,0 +1,22 @@
+/**
+ * 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.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-view.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-view.js
new file mode 100644
index 0000000..2a90771
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-view.js
@@ -0,0 +1,290 @@
+/**
+ * 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 ChartUtilsMixin from 'yarn-ui/mixins/charts-utils';
+
+export default Ember.Component.extend(ChartUtilsMixin, {
+  queues: {
+    data: undefined,
+    foldedQueues: {},
+    selectedQueueCircle: undefined,
+    maxDepth: -1,
+  },
+
+  queueColors: d3.scale.category20().range(),
+
+  renderQueue: function (now, depth, sequence) {
+    if (depth > this.queues.maxDepth) {
+      this.queues.maxDepth = depth;
+    }
+
+    var cx = 20 + depth * 30;
+    var cy = 20 + sequence * 30;
+    var name = now.get("name");
+
+    var g = this.queues.dataGroup.append("g")
+      .attr("id", "queue-" + name + "-g");
+
+    var folded = this.queues.foldedQueues[name];
+    var isParentQueue = false;
+
+    // render its children
+    var children = [];
+    var childrenNames = now.get("children");
+    if (childrenNames) {
+      childrenNames.forEach(function (name) {
+        isParentQueue = true;
+        var child = this.queues.data[name];
+        if (child) {
+          children.push(child);
+        }
+      }.bind(this));
+    }
+    if (folded) {
+      children = [];
+    }
+    var linefunction = d3.svg.line()
+      .interpolate("basis")
+      .x(function (d) {
+        return d.x;
+      })
+      .y(function (d) {
+        return d.y;
+      });
+
+    for (var i = 0; i < children.length; i++) {
+      sequence = sequence + 1;
+      // Get center of children queue
+      var cc = this.renderQueue(children[i],
+        depth + 1, sequence);
+      g.append("path")
+        .attr("class", "queue")
+        .attr("d", linefunction([{
+          x: cx,
+          y: cy
+        }, {
+          x: cc.x - 20,
+          y: cc.y
+        }, cc]));
+    }
+
+    var circle = g.append("circle")
+      .attr("cx", cx)
+      .attr("cy", cy)
+      .attr("class", "queue");
+
+    circle.on('mouseover', function () {
+      circle.style("fill", this.queueColors[1]);
+    }.bind(this));
+    circle.on('mouseout', function () {
+      if (circle != this.queues.selectedQueueCircle) {
+        circle.style("fill", this.queueColors[0]);
+      }
+    }.bind(this));
+    circle.on('click', function () {
+      circle.style("fill", this.queueColors[2]);
+      var pre = this.queues.selectedQueueCircle;
+      this.queues.selectedQueueCircle = circle;
+      if (pre) {
+        pre.on('mouseout')();
+      }
+      this.renderCharts(name);
+    }.bind(this));
+    circle.on('dblclick', function () {
+      if (!isParentQueue) {
+        return;
+      }
+
+      if (this.queues.foldedQueues[name]) {
+        delete this.queues.foldedQueues[name];
+      } else {
+        this.queues.foldedQueues[name] = now;
+      }
+      this.renderQueues();
+    }.bind(this));
+
+    var text = name;
+    if (folded) {
+      text = name + " (+)";
+    }
+
+    // print queue's name
+    g.append("text")
+      .attr("x", cx + 30)
+      .attr("y", cy + 5)
+      .text(text)
+      .attr("class", "queue");
+
+    return {
+      x: cx,
+      y: cy
+    };
+  },
+
+  renderQueues: function () {
+    if (this.queues.dataGroup) {
+      this.queues.dataGroup.remove();
+    }
+    // render queues
+    this.queues.dataGroup = this.canvas.svg.append("g")
+      .attr("id", "queues-g");
+    var rootQueue = undefined;
+
+    if (this.queues.data) {
+      this.renderQueue(this.queues.data['root'], 0, 0);
+
+    }
+  },
+
+  draw: function () {
+    this.queues.data = {};
+    this.get("model")
+      .forEach(function (o) {
+        this.queues.data[o.id] = o;
+      }.bind(this));
+
+    // get w/h of the svg
+    var bbox = d3.select("#main-container")
+      .node()
+      .getBoundingClientRect();
+    this.canvas.w = bbox.width;
+    this.canvas.h = Math.max(Object.keys(this.queues.data)
+        .length * 35, 1500);
+
+    this.canvas.svg = d3.select("#main-container")
+      .append("svg")
+      .attr("width", this.canvas.w)
+      .attr("height", this.canvas.h)
+      .attr("id", "main-svg");
+
+    this.renderBackground();
+
+    this.renderQueues();
+    this.renderCharts("root");
+  },
+
+  didInsertElement: function () {
+    this.draw();
+  },
+
+  /*
+   * data = [{label="xx", value=},{...}]
+   */
+  renderTable: function (data, title, layout) {
+    d3.select("#main-svg")
+      .append('table')
+      .selectAll('tr')
+      .data(data)
+      .enter()
+      .append('tr')
+      .selectAll('td')
+      .data(function (d) {
+        return d;
+      })
+      .enter()
+      .append('td')
+      .text(function (d) {
+        return d;
+      });
+  },
+
+  renderQueueCapacities: function (queue, layout) {
+    // Render bar chart
+    this.renderBarChart(this.charts.g, [{
+      label: "Cap",
+      value: queue.get("capacity")
+    }, {
+      label: "MaxCap",
+      value: queue.get("maxCapacity")
+    }, {
+      label: "UsedCap",
+      value: queue.get("usedCapacity")
+    }], "Queue Capacities", layout, 60);
+  },
+
+  renderChildrenCapacities: function (queue, layout) {
+    var data = [];
+    var children = queue.get("children");
+    if (children) {
+      for (var i = 0; i < children.length; i++) {
+        var child = this.queues.data[children[i]];
+        data.push({
+          label: child.get("name"),
+          value: child.get("capacity")
+        });
+      }
+    }
+
+    this.renderDonutChart(this.charts.g, data, "Children Capacities", layout, true);
+  },
+
+  renderChildrenUsedCapacities: function (queue, layout) {
+    var data = [];
+    var children = queue.get("children");
+    if (children) {
+      for (var i = 0; i < children.length; i++) {
+        var child = this.queues.data[children[i]];
+        data.push({
+          label: child.get("name"),
+          value: child.get("usedCapacity")
+        });
+      }
+    }
+
+    this.renderDonutChart(this.charts.g, data, "Children Used Capacities", layout, true);
+  },
+
+  renderLeafQueueUsedCapacities: function (layout) {
+    var leafQueueUsedCaps = [];
+    for (var queueName in this.queues.data) {
+      var q = this.queues.data[queueName];
+      if ((!q.get("children")) || q.get("children")
+          .length == 0) {
+        // it's a leafqueue
+        leafQueueUsedCaps.push({
+          label: q.get("name"),
+          value: q.get("usedCapacity")
+        });
+      }
+    }
+
+    this.renderDonutChart(this.charts.g, leafQueueUsedCaps, "LeafQueues Used Capacities",
+      layout, true);
+  },
+
+  renderCharts: function (queueName) {
+    this.charts.leftBannerLen = this.queues.maxDepth * 30 + 100;
+    this.initCharts();
+
+    var queue = this.queues.data[queueName];
+    var idx = 0;
+
+    if (queue.get("name") == "root") {
+      this.renderLeafQueueUsedCapacities(this.getLayout(idx++));
+    }
+    if (queue.get("name") != "root") {
+      this.renderQueueCapacities(queue, this.getLayout(idx++));
+    }
+    if (queue.get("children") && queue.get("children")
+        .length > 0) {
+      this.renderChildrenCapacities(queue, this.getLayout(idx++));
+      this.renderChildrenUsedCapacities(queue, this.getLayout(idx++));
+    }
+  },
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/simple-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/simple-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/simple-table.js
new file mode 100644
index 0000000..e5da81a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/simple-table.js
@@ -0,0 +1,76 @@
+/**
+ * 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.Component.extend({
+  didInsertElement: function() {
+    var paging = this.get("paging") ? true : this.get("paging");
+    var ordering = this.get("ordering") ? true : this.get("ordering");
+    var info = this.get("info") ? true : this.get("info");
+    var bFilter = this.get("bFilter") ? true : this.get("bFilter");
+
+    // Defines sorter for the columns if not default.
+    // Can also specify a custom sorter.
+    var i;
+    var colDefs = [];
+    if (this.get("colTypes")) {
+      var typesArr = this.get("colTypes").split(' ');
+      var targetsArr = this.get("colTargets").split(' ');
+      for (i = 0; i < typesArr.length; i++) {
+        console.log(typesArr[i] + " " + targetsArr[i]);
+        colDefs.push({
+          type: typesArr[i],
+          targets: parseInt(targetsArr[i])
+        });
+      }
+    }
+    // Defines initial column and sort order.
+    var orderArr = [];
+    if (this.get("colsOrder")) {
+      var cols = this.get("colsOrder").split(' ');
+      for (i = 0; i < cols.length; i++) {
+        var col = cols[i].split(',');
+        if (col.length != 2) {
+          continue;
+        }
+        var order = col[1].trim();
+        if (order != 'asc' && order != 'desc') {
+          continue;
+        }
+        var colOrder = [];
+        colOrder.push(parseInt(col[0]));
+        colOrder.push(order);
+        orderArr.push(colOrder);
+      }
+    }
+    if (orderArr.length == 0) {
+      var defaultOrder = [0, 'asc'];
+      orderArr.push(defaultOrder);
+    }
+    console.log(orderArr[0]);
+    Ember.$('#' + this.get('table-id')).DataTable({
+      "paging":   paging,
+      "ordering": ordering, 
+      "info":     info,
+      "bFilter": bFilter,
+      "order": orderArr,
+      "columnDefs": colDefs
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js
new file mode 100644
index 0000000..b92f4bf
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/timeline-view.js
@@ -0,0 +1,268 @@
+/**
+ * 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 Converter from 'yarn-ui/utils/converter';
+
+export default Ember.Component.extend({
+  canvas: {
+    svg: undefined,
+    h: 0,
+    w: 0,
+    tooltip: undefined
+  },
+
+  clusterMetrics: undefined,
+  modelArr: [],
+  colors: d3.scale.category10().range(),
+  _selected: undefined,
+
+  selected: function() {
+    return this._selected;
+  }.property(),
+
+  tableComponentName: function() {
+    return "app-attempt-table";
+  }.property(),
+
+  setSelected: function(d) {
+    if (this._selected == d) {
+      return;
+    }
+
+    // restore color
+    if (this._selected) {
+      var dom = d3.select("#timeline-bar-" + this._selected.get("id"));
+      dom.attr("fill", this.colors[0]);
+    }
+
+    this._selected = d;
+    this.set("selected", d);
+    dom = d3.select("#timeline-bar-" + d.get("id"));
+    dom.attr("fill", this.colors[1]);
+  },
+
+  getPerItemHeight: function() {
+    var arrSize = this.modelArr.length;
+
+    if (arrSize < 20) {
+      return 30;
+    } else if (arrSize < 100) {
+      return 10;
+    } else {
+      return 2;
+    }
+  },
+
+  getPerItemGap: function() {
+    var arrSize = this.modelArr.length;
+
+    if (arrSize < 20) {
+      return 5;
+    } else if (arrSize < 100) {
+      return 1;
+    } else {
+      return 1;
+    }
+  },
+
+  getCanvasHeight: function() {
+    return (this.getPerItemHeight() + this.getPerItemGap()) * this.modelArr.length + 200;
+  },
+
+  draw: function(start, end) {
+    // get w/h of the svg
+    var bbox = d3.select("#" + this.get("parent-id"))
+      .node()
+      .getBoundingClientRect();
+    this.canvas.w = bbox.width;
+    this.canvas.h = this.getCanvasHeight();
+
+    this.canvas.svg = d3.select("#" + this.get("parent-id"))
+      .append("svg")
+      .attr("width", this.canvas.w)
+      .attr("height", this.canvas.h)
+      .attr("id", this.get("my-id"));
+    this.renderTimeline(start, end);
+  },
+
+  renderTimeline: function(start, end) {
+    var border = 30;
+    var singleBarHeight = this.getPerItemHeight();
+    var gap = this.getPerItemGap();
+    var textWidth = 50;
+    /*
+     start-time                              end-time
+      |--------------------------------------|
+         ==============
+                ==============
+                        ==============
+                              ===============
+     */
+    var xScaler = d3.scale.linear()
+      .domain([start, end])
+      .range([0, this.canvas.w - 2 * border - textWidth]);
+
+    /*
+     * Render frame of timeline view
+     */
+    this.canvas.svg.append("line")
+      .attr("x1", border + textWidth)
+      .attr("y1", border - 5)
+      .attr("x2", this.canvas.w - border)
+      .attr("y2", border - 5)
+      .attr("class", "chart");
+
+    this.canvas.svg.append("line")
+      .attr("x1", border + textWidth)
+      .attr("y1", border - 10)
+      .attr("x2", border + textWidth)
+      .attr("y2", border - 5)
+      .attr("class", "chart");
+
+    this.canvas.svg.append("line")
+      .attr("x1", this.canvas.w - border)
+      .attr("y1", border - 10)
+      .attr("x2", this.canvas.w - border)
+      .attr("y2", border - 5)
+      .attr("class", "chart");
+
+    this.canvas.svg.append("text")
+        .text(Converter.timeStampToDate(start))
+        .attr("y", border - 15)
+        .attr("x", border + textWidth)
+        .attr("class", "bar-chart-text")
+        .attr("text-anchor", "left");
+
+    this.canvas.svg.append("text")
+        .text(Converter.timeStampToDate(end))
+        .attr("y", border - 15)
+        .attr("x", this.canvas.w - border)
+        .attr("class", "bar-chart-text")
+        .attr("text-anchor", "end");
+
+    // show bar
+    var bar = this.canvas.svg.selectAll("bars")
+      .data(this.modelArr)
+      .enter()
+      .append("rect")
+      .attr("y", function(d, i) {
+        return border + (gap + singleBarHeight) * i;
+      })
+      .attr("x", function(d, i) {
+        return border + textWidth + xScaler(d.get("startTs"));
+      })
+      .attr("height", singleBarHeight)
+      .attr("fill", function(d, i) {
+        return this.colors[0];
+      }.bind(this))
+      .attr("width", function(d, i) {
+        var finishedTs = xScaler(d.get("finishedTs"));
+        finishedTs = finishedTs > 0 ? finishedTs : xScaler(end);
+        return finishedTs - xScaler(d.get("startTs"));
+      })
+      .attr("id", function(d, i) {
+        return "timeline-bar-" + d.get("id");
+      });
+    bar.on("click", function(d) {
+      this.setSelected(d);
+    }.bind(this));
+
+    this.bindTooltip(bar);
+
+    if (this.modelArr.length <= 20) {
+      // show bar texts
+      for (var i = 0; i < this.modelArr.length; i++) {
+        this.canvas.svg.append("text")
+          .text(this.modelArr[i].get(this.get("label")))
+          .attr("y", border + (gap + singleBarHeight) * i + singleBarHeight / 2)
+          .attr("x", border)
+          .attr("class", "bar-chart-text");
+      }
+    }
+  },
+
+  bindTooltip: function(d) {
+    d.on("mouseover", function(d) {
+        this.tooltip
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mousemove", function(d) {
+        this.tooltip.style("opacity", .9);
+        this.tooltip.html(d.get("tooltipLabel"))
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mouseout", function(d) {
+        this.tooltip.style("opacity", 0);
+      }.bind(this));
+  },
+
+  initTooltip: function() {
+    this.tooltip = d3.select("body")
+      .append("div")
+      .attr("class", "tooltip")
+      .attr("id", "chart-tooltip")
+      .style("opacity", 0);
+  },
+
+  didInsertElement: function() {
+    // init tooltip
+    this.initTooltip();
+
+    // init model
+    if (this.get("rmModel")) {
+      this.get("rmModel").forEach(function(o) {
+        this.modelArr.push(o);
+      }.bind(this));
+    }
+
+    if (this.get("tsModel")) {
+     this.get("tsModel").forEach(function(o) {
+        this.modelArr.push(o);
+      }.bind(this)); 
+    }
+
+    this.modelArr.sort(function(a, b) {
+      var tsA = a.get("startTs");
+      var tsB = b.get("startTs");
+
+      return tsA - tsB;
+    });
+    if (this.modelArr.length > 0) {
+      var begin = this.modelArr[0].get("startTs");
+    }
+    var end = 0;
+    for (var i = 0; i < this.modelArr.length; i++) {
+      var ts = this.modelArr[i].get("finishedTs");
+      if (ts > end) {
+        end = ts;
+      }
+    }
+    if (end < begin) {
+      end = Date.now();
+    }
+
+    this.draw(begin, end);
+
+    if (this.modelArr.length > 0) {
+      this.setSelected(this.modelArr[0]);
+    }
+  },
+});
\ No newline at end of file


[07/20] hadoop git commit: YARN-4733. [YARN-3368] Initial commit of new YARN web UI. (wangda)

Posted by wa...@apache.org.
YARN-4733. [YARN-3368] Initial commit of new YARN web UI. (wangda)


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

Branch: refs/heads/YARN-3368
Commit: 48e18bb44f341c1f7191ed3695ab847790975d03
Parents: ce5b481
Author: Wangda Tan <wa...@apache.org>
Authored: Tue Dec 8 16:37:50 2015 -0800
Committer: Wangda Tan <wa...@apache.org>
Committed: Fri Apr 8 10:48:55 2016 -0700

----------------------------------------------------------------------
 .../hadoop-yarn/hadoop-yarn-ui/.bowerrc         |   4 +
 .../hadoop-yarn/hadoop-yarn-ui/.editorconfig    |  34 +++
 .../hadoop-yarn/hadoop-yarn-ui/.ember-cli       |  11 +
 .../hadoop-yarn/hadoop-yarn-ui/.gitignore       |  17 ++
 .../hadoop-yarn/hadoop-yarn-ui/.jshintrc        |  32 +++
 .../hadoop-yarn/hadoop-yarn-ui/.travis.yml      |  23 ++
 .../hadoop-yarn/hadoop-yarn-ui/.watchmanconfig  |   3 +
 .../hadoop-yarn/hadoop-yarn-ui/README.md        |  24 ++
 .../hadoop-yarn-ui/app/adapters/cluster-info.js |  19 ++
 .../app/adapters/cluster-metric.js              |  19 ++
 .../app/adapters/yarn-app-attempt.js            |  31 +++
 .../hadoop-yarn-ui/app/adapters/yarn-app.js     |  25 ++
 .../app/adapters/yarn-container.js              |  42 +++
 .../hadoop-yarn-ui/app/adapters/yarn-queue.js   |  19 ++
 .../hadoop-yarn/hadoop-yarn-ui/app/app.js       |  20 ++
 .../hadoop-yarn-ui/app/components/.gitkeep      |   0
 .../app/components/app-attempt-table.js         |   4 +
 .../hadoop-yarn-ui/app/components/app-table.js  |   4 +
 .../hadoop-yarn-ui/app/components/bar-chart.js  | 104 +++++++
 .../app/components/base-chart-component.js      | 109 ++++++++
 .../app/components/container-table.js           |   4 +
 .../app/components/donut-chart.js               | 148 ++++++++++
 .../app/components/item-selector.js             |  21 ++
 .../app/components/queue-configuration-table.js |   4 +
 .../app/components/queue-navigator.js           |   4 +
 .../hadoop-yarn-ui/app/components/queue-view.js | 272 +++++++++++++++++++
 .../app/components/simple-table.js              |  30 ++
 .../app/components/timeline-view.js             | 250 +++++++++++++++++
 .../app/components/tree-selector.js             | 257 ++++++++++++++++++
 .../hadoop-yarn-ui/app/controllers/.gitkeep     |   0
 .../app/controllers/cluster-overview.js         |   5 +
 .../hadoop-yarn-ui/app/controllers/yarn-apps.js |   4 +
 .../app/controllers/yarn-queue.js               |   6 +
 .../hadoop-yarn-ui/app/helpers/.gitkeep         |   0
 .../hadoop-yarn/hadoop-yarn-ui/app/index.html   |  25 ++
 .../hadoop-yarn-ui/app/models/.gitkeep          |   0
 .../hadoop-yarn-ui/app/models/cluster-info.js   |  13 +
 .../hadoop-yarn-ui/app/models/cluster-metric.js | 115 ++++++++
 .../app/models/yarn-app-attempt.js              |  44 +++
 .../hadoop-yarn-ui/app/models/yarn-app.js       |  65 +++++
 .../hadoop-yarn-ui/app/models/yarn-container.js |  39 +++
 .../hadoop-yarn-ui/app/models/yarn-queue.js     |  76 ++++++
 .../hadoop-yarn-ui/app/models/yarn-user.js      |   8 +
 .../hadoop-yarn/hadoop-yarn-ui/app/router.js    |  16 ++
 .../hadoop-yarn-ui/app/routes/.gitkeep          |   0
 .../app/routes/cluster-overview.js              |  11 +
 .../app/routes/yarn-app-attempt.js              |  21 ++
 .../hadoop-yarn-ui/app/routes/yarn-app.js       |  10 +
 .../hadoop-yarn-ui/app/routes/yarn-apps.js      |   8 +
 .../hadoop-yarn-ui/app/routes/yarn-queue.js     |  20 ++
 .../app/routes/yarn-queues/index.js             |   5 +
 .../app/routes/yarn-queues/queues-selector.js   |   7 +
 .../app/serializers/cluster-info.js             |  29 ++
 .../app/serializers/cluster-metric.js           |  29 ++
 .../app/serializers/yarn-app-attempt.js         |  49 ++++
 .../hadoop-yarn-ui/app/serializers/yarn-app.js  |  66 +++++
 .../app/serializers/yarn-container.js           |  54 ++++
 .../app/serializers/yarn-queue.js               | 127 +++++++++
 .../hadoop-yarn-ui/app/styles/app.css           | 141 ++++++++++
 .../app/templates/application.hbs               |  25 ++
 .../app/templates/cluster-overview.hbs          |  56 ++++
 .../app/templates/components/.gitkeep           |   0
 .../templates/components/app-attempt-table.hbs  |  28 ++
 .../app/templates/components/app-table.hbs      |  62 +++++
 .../templates/components/container-table.hbs    |  36 +++
 .../components/queue-configuration-table.hbs    |  40 +++
 .../templates/components/queue-navigator.hbs    |  18 ++
 .../app/templates/components/timeline-view.hbs  |  35 +++
 .../app/templates/yarn-app-attempt.hbs          |  12 +
 .../hadoop-yarn-ui/app/templates/yarn-app.hbs   | 145 ++++++++++
 .../hadoop-yarn-ui/app/templates/yarn-apps.hbs  |   3 +
 .../hadoop-yarn-ui/app/templates/yarn-queue.hbs |  48 ++++
 .../hadoop-yarn-ui/app/utils/converter.js       |  74 +++++
 .../hadoop-yarn-ui/app/utils/sorter.js          |  15 +
 .../hadoop-yarn/hadoop-yarn-ui/bower.json       |  22 ++
 .../hadoop-yarn-ui/config/environment.js        |  47 ++++
 .../hadoop-yarn-ui/ember-cli-build.js           |  29 ++
 .../hadoop-yarn/hadoop-yarn-ui/jsconfig.json    |   6 +
 .../hadoop-yarn/hadoop-yarn-ui/package.json     |  44 +++
 .../assets/images/datatables/Sorting icons.psd  | Bin 0 -> 27490 bytes
 .../public/assets/images/datatables/favicon.ico | Bin 0 -> 894 bytes
 .../assets/images/datatables/sort_asc.png       | Bin 0 -> 160 bytes
 .../images/datatables/sort_asc_disabled.png     | Bin 0 -> 148 bytes
 .../assets/images/datatables/sort_both.png      | Bin 0 -> 201 bytes
 .../assets/images/datatables/sort_desc.png      | Bin 0 -> 158 bytes
 .../images/datatables/sort_desc_disabled.png    | Bin 0 -> 146 bytes
 .../hadoop-yarn-ui/public/crossdomain.xml       |  15 +
 .../hadoop-yarn-ui/public/robots.txt            |   3 +
 .../hadoop-yarn/hadoop-yarn-ui/testem.json      |  12 +
 .../hadoop-yarn/hadoop-yarn-ui/tests/.jshintrc  |  52 ++++
 .../hadoop-yarn-ui/tests/helpers/resolver.js    |  11 +
 .../hadoop-yarn-ui/tests/helpers/start-app.js   |  18 ++
 .../hadoop-yarn/hadoop-yarn-ui/tests/index.html |  33 +++
 .../hadoop-yarn-ui/tests/test-helper.js         |   6 +
 .../hadoop-yarn-ui/tests/unit/.gitkeep          |   0
 .../tests/unit/adapters/yarn-app-test.js        |  12 +
 .../tests/unit/controllers/yarn-apps-test.js    |  12 +
 .../tests/unit/controllers/yarn-queues-test.js  |  12 +
 .../tests/unit/mixins/charts-test.js            |  12 +
 .../tests/unit/models/yarn-app-test.js          |  12 +
 .../tests/unit/routes/yarn-apps-test.js         |  11 +
 .../tests/unit/serializers/yarn-app-test.js     |  15 +
 .../tests/unit/utils/converter-test.js          |  10 +
 .../hadoop-yarn/hadoop-yarn-ui/vendor/.gitkeep  |   0
 104 files changed, 3518 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc
new file mode 100644
index 0000000..959e169
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.bowerrc
@@ -0,0 +1,4 @@
+{
+  "directory": "bower_components",
+  "analytics": false
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig
new file mode 100644
index 0000000..47c5438
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.editorconfig
@@ -0,0 +1,34 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = space
+indent_size = 2
+
+[*.js]
+indent_style = space
+indent_size = 2
+
+[*.hbs]
+insert_final_newline = false
+indent_style = space
+indent_size = 2
+
+[*.css]
+indent_style = space
+indent_size = 2
+
+[*.html]
+indent_style = space
+indent_size = 2
+
+[*.{diff,md}]
+trim_trailing_whitespace = false

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli
new file mode 100644
index 0000000..96bd287
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.ember-cli
@@ -0,0 +1,11 @@
+{
+  /**
+    Ember CLI sends analytics information by default. The data is completely
+    anonymous, but there are times when you might want to disable this behavior.
+
+    Setting `disableAnalytics` to true will prevent any data from being sent.
+  */
+  "disableAnalytics": false,
+  "liveReload": true,
+  "watcher": "polling"
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore
new file mode 100644
index 0000000..86fceae
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.gitignore
@@ -0,0 +1,17 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+
+# dependencies
+/node_modules
+/bower_components
+
+# misc
+/.sass-cache
+/connect.lock
+/coverage/*
+/libpeerconnection.log
+npm-debug.log
+testem.log

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc
new file mode 100644
index 0000000..08096ef
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.jshintrc
@@ -0,0 +1,32 @@
+{
+  "predef": [
+    "document",
+    "window",
+    "-Promise"
+  ],
+  "browser": true,
+  "boss": true,
+  "curly": true,
+  "debug": false,
+  "devel": true,
+  "eqeqeq": true,
+  "evil": true,
+  "forin": false,
+  "immed": false,
+  "laxbreak": false,
+  "newcap": true,
+  "noarg": true,
+  "noempty": false,
+  "nonew": false,
+  "nomen": false,
+  "onevar": false,
+  "plusplus": false,
+  "regexp": false,
+  "undef": true,
+  "sub": true,
+  "strict": false,
+  "white": false,
+  "eqnull": true,
+  "esnext": true,
+  "unused": true
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml
new file mode 100644
index 0000000..66dd107
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.travis.yml
@@ -0,0 +1,23 @@
+---
+language: node_js
+node_js:
+  - "0.12"
+
+sudo: false
+
+cache:
+  directories:
+    - node_modules
+
+before_install:
+  - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
+  - "npm config set spin false"
+  - "npm install -g npm@^2"
+
+install:
+  - npm install -g bower
+  - npm install
+  - bower install
+
+script:
+  - npm test

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig
new file mode 100644
index 0000000..5e9462c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/.watchmanconfig
@@ -0,0 +1,3 @@
+{
+  "ignore_dirs": ["tmp"]
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
new file mode 100644
index 0000000..d5cba6e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/README.md
@@ -0,0 +1,24 @@
+# Yarn-ui
+*This is a WIP project, nobody should use it in production.*
+
+## Prerequisites
+
+You will need the following things properly installed on your computer.
+
+* Install Node.js with NPM: https://nodejs.org/download/
+* After Node.js installed, install bower: `npm install -g bower`.
+* Install Ember-cli: `npm install -g ember-cli`
+
+## Installation
+
+* Goto root directory of yarn-ui project: `hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui`
+* `npm install && bower install`, it will take a while to finish.
+
+## Try it
+
+* Packaging and deploying Hadoop in this branch (You can use latest trunk after YARN-4417 committed to trunk)
+* Modify `app/adapters/yarn-app.js`, change `host` to your YARN RM web address
+* If you running YARN RM in your localhost, you should install `npm install -g corsproxy` and run `corsproxy` to avoid CORS errors. More details: `https://www.npmjs.com/package/corsproxy`. And the `host` of `app/adapters/yarn-app.js` should start with `localhost:1337`.
+* Run `ember server`
+* Visit your app at [http://localhost:4200](http://localhost:4200).
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
new file mode 100644
index 0000000..ef65792
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-info.js
@@ -0,0 +1,19 @@
+import DS from 'ember-data';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/localhost:8088', // configurable
+  namespace: 'ws/v1/cluster', // common const
+  pathForType(modelName) {
+    return ''; // move to some common place, return path by modelname.
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
new file mode 100644
index 0000000..d0f084c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/cluster-metric.js
@@ -0,0 +1,19 @@
+import DS from 'ember-data';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/localhost:8088', // configurable
+  namespace: 'ws/v1/cluster/metrics', // common const
+  pathForType(modelName) {
+    return ''; // move to some common place, return path by modelname.
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
new file mode 100644
index 0000000..3c95d64
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app-attempt.js
@@ -0,0 +1,31 @@
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/localhost:8088', // configurable
+  namespace: 'ws/v1/cluster', // common const
+
+  urlForQuery(query, modelName) {
+    var url = this._buildURL();
+    return url + '/apps/' + query.appId + "/appattempts";
+  },
+
+  urlForFindRecord(id, modelName, snapshot) {
+    var url = this._buildURL();
+    var url = url + '/apps/' + 
+           Converter.attemptIdToAppId(id) + "/appattempts/" + id;
+    console.log(url);
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
new file mode 100644
index 0000000..e1108be
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-app.js
@@ -0,0 +1,25 @@
+import DS from 'ember-data';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/localhost:8088', // configurable
+  namespace: 'ws/v1/cluster', // common const
+  pathForType(modelName) {
+    return 'apps'; // move to some common place, return path by modelname.
+  },
+  /*
+  urlForQuery(query, modelName) {
+    var url = this._buildURL();
+    return url + '/apps/' + query.appId + "/appattempts";
+  },
+  */
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
new file mode 100644
index 0000000..fe09f59
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-container.js
@@ -0,0 +1,42 @@
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  rmHost: 'http://localhost:1337/localhost:8088',
+  tsHost: 'http://localhost:1337/localhost:8188',
+  host: function() {
+    return undefined
+  }.property(),
+  rmNamespace: 'ws/v1/cluster',
+  tsNamespace: 'ws/v1/applicationhistory',
+  namespace: function() {
+    return undefined
+  }.property(),
+
+  urlForQuery(query, modelName) {
+    if (query.is_rm) {
+      this.set("host", this.rmHost);
+      this.set("namespace", this.rmNamespace);
+    } else {
+      this.set("host", this.tsHost);
+      this.set("namespace", this.tsNamespace);
+    }
+
+    var url = this._buildURL();
+    url = url + '/apps/' + Converter.attemptIdToAppId(query.app_attempt_id) 
+               + "/appattempts/" + query.app_attempt_id + "/containers";
+    console.log(url);
+    return url;
+  },
+
+  ajax(url, method, hash) {
+    hash = {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
new file mode 100644
index 0000000..39cf796
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/adapters/yarn-queue.js
@@ -0,0 +1,19 @@
+import DS from 'ember-data';
+
+export default DS.JSONAPIAdapter.extend({
+  headers: {
+    Accept: 'application/json'
+  },
+  host: 'http://localhost:1337/localhost:8088', // configurable
+  namespace: 'ws/v1/cluster', // common const
+  pathForType(modelName) {
+    return 'scheduler'; // move to some common place, return path by modelname.
+  },
+  ajax(url, method, hash) {
+    hash = hash || {};
+    hash.crossDomain = true;
+    hash.xhrFields = {withCredentials: true};
+    hash.targetServer = "RM";
+    return this._super(url, method, hash); 
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js
new file mode 100644
index 0000000..ff28ecf
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/app.js
@@ -0,0 +1,20 @@
+import Ember from 'ember';
+import Resolver from 'ember/resolver';
+import loadInitializers from 'ember/load-initializers';
+import config from './config/environment';
+import Sorter from 'yarn-ui/utils/sorter';
+
+var App;
+
+Ember.MODEL_FACTORY_INJECTIONS = true;
+
+App = Ember.Application.extend({
+  modulePrefix: config.modulePrefix,
+  podModulePrefix: config.podModulePrefix,
+  Resolver: Resolver
+});
+
+loadInitializers(App, config.modulePrefix);
+Sorter.initDataTableSorter();
+
+export default App;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js
new file mode 100644
index 0000000..aff0493
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-attempt-table.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js
new file mode 100644
index 0000000..aff0493
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/app-table.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js
new file mode 100644
index 0000000..f24e947
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/bar-chart.js
@@ -0,0 +1,104 @@
+import Ember from 'ember';
+import BaseChartComponent from 'yarn-ui/components/base-chart-component';
+
+export default BaseChartComponent.extend({
+  // data: 
+  //    [{label=label1, value=value1}, ...]
+  //    ...
+  renderBarChart: function(data, title, textWidth = 50) {
+    var g = this.chart.g;
+    var layout = this.getLayout();
+    this.renderTitleAndBG(g, title, layout);
+
+    var maxValue = -1;
+    for (var i = 0; i < data.length; i++) {
+      if (data[i] instanceof Array) {
+        if (data[i][0].value > maxValue) {
+          maxValue = data[i][0].value;
+        }
+      } else {
+        if (data[i].value > maxValue) {
+          maxValue = data[i].value;
+        }
+      }
+    }
+
+    var singleBarHeight = 30;
+
+    // 50 is for text
+    var maxBarWidth = layout.x2 - layout.x1 - 2 * layout.margin - textWidth - 50;
+
+    // 30 is for title
+    var maxBarsHeight = layout.y2 - layout.y1 - 2 * layout.margin - 30;
+    var gap = (maxBarsHeight - data.length * singleBarHeight) / (data.length -
+      1);
+
+    var xScaler = d3.scale.linear()
+      .domain([0, maxValue])
+      .range([0, maxBarWidth]);
+
+    // show bar text
+    for (var i = 0; i < data.length; i++) {
+      g.append("text")
+        .text(
+          function() {
+            return data[i].label;
+          })
+        .attr("y", function() {
+          return layout.y1 + singleBarHeight / 2 + layout.margin + (gap +
+            singleBarHeight) * i + 30;
+        })
+        .attr("x", layout.x1 + layout.margin);
+    }
+
+    // show bar
+    var bar = g.selectAll("bars")
+      .data(data)
+      .enter()
+      .append("rect")
+      .attr("y", function(d, i) {
+        return layout.y1 + 30 + layout.margin + (gap + singleBarHeight) * i;
+      })
+      .attr("x", layout.x1 + layout.margin + textWidth)
+      .attr("height", singleBarHeight)
+      .attr("fill", function(d, i) {
+        return this.colors[i];
+      }.bind(this))
+      .attr("width", 0);
+
+    this.bindTooltip(bar);
+
+    bar.transition()
+      .duration(500)
+      .attr("width", function(d) {
+        var w;
+        w = xScaler(d.value);
+        // At least each item has 3 px
+        w = Math.max(w, 3);
+        return w;
+      });
+
+    // show bar value
+    for (var i = 0; i < data.length; i++) {
+      g.append("text")
+        .text(
+          function() {
+            return data[i].value;
+          })
+        .attr("y", function() {
+          return layout.y1 + singleBarHeight / 2 + layout.margin + (gap +
+            singleBarHeight) * i + 30;
+        })
+        .attr("x", layout.x1 + layout.margin + textWidth + 15 + xScaler(data[i].value));
+    }
+  },
+
+  draw: function() {
+    this.initChart();
+    this.renderBarChart(this.get("data"), this.get("title"), this.get("textWidth"));
+  },
+
+  didInsertElement: function() {
+    this.draw();
+  },
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js
new file mode 100644
index 0000000..acf2b5f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/base-chart-component.js
@@ -0,0 +1,109 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+  chart: undefined,
+  tooltip : undefined,
+  colors: d3.scale.category10().range(),
+
+  initChart: function() {
+    this.chart = {
+      svg: undefined,
+      g: undefined,
+      h: 0,
+      w: 0,
+      tooltip: undefined
+    };
+
+    // Init tooltip if it is not initialized
+    this.tooltip = d3.select("#chart-tooltip");
+    if (!this.tooltip) {
+      this.tooltip = d3.select("body")
+        .append("div")
+        .attr("class", "tooltip")
+        .attr("id", "chart-tooltip")
+        .style("opacity", 0);
+    }
+
+    // Init svg
+    var svg = this.chart.svg;
+    if (svg) {
+      svg.remove();
+    }
+
+    var parentId = this.get("parentId");
+    var parent = d3.select("#" + parentId);
+    var bbox = parent.node().getBoundingClientRect();
+    this.chart.w = bbox.width - 30;
+
+    var ratio = 0.75; // 4:3 by default
+    if (this.get("ratio")) {
+      ratio = this.get("ratio");
+    }
+    this.chart.h = bbox.width * ratio;
+
+    if (this.get("maxHeight")) {
+      this.chart.h = Math.min(this.get("maxHeight"), this.chart.h);
+    }
+
+    this.chart.svg = parent.append("svg")
+      .attr("width", this.chart.w)
+      .attr("height", this.chart.h);
+
+    this.chart.g = this.chart.svg.append("g");
+  },
+
+  renderTitleAndBG: function(g, title, layout) {
+    var bg = g.append("g");
+    bg.append("text")
+      .text(title)
+      .attr("x", (layout.x1 + layout.x2) / 2)
+      .attr("y", layout.y1 + layout.margin + 20)
+      .attr("class", "chart-title");
+
+    bg.append("rect")
+      .attr("x", layout.x1)
+      .attr("y", layout.y1)
+      .attr("width", layout.x2 - layout.x1)
+      .attr("height", layout.y2 - layout.y1)
+      .attr("class", "chart-frame");
+  },
+
+  bindTooltip: function(d) {
+    d.on("mouseover", function(d) {
+        this.tooltip
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mousemove", function(d) {
+        // Handle pie chart case
+        var data = d;
+        if (d.data) {
+          data = d.data;
+        }
+
+        this.tooltip.style("opacity", .9);
+        this.tooltip.html(data.label + " = " + data.value)
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mouseout", function(d) {
+        this.tooltip.style("opacity", 0);
+      }.bind(this));
+  },
+
+  getLayout: function() {
+    var x1 = 0;
+    var y1 = 0;
+    var x2 = this.chart.w;
+    var y2 = this.chart.h;
+
+    var layout = {
+      x1: x1,
+      y1: y1,
+      x2: x2 - 10,
+      y2: y2 - 10,
+      margin: 10
+    };
+    return layout;
+  },
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js
new file mode 100644
index 0000000..aff0493
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/container-table.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js
new file mode 100644
index 0000000..608b0c1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/donut-chart.js
@@ -0,0 +1,148 @@
+import Ember from 'ember';
+import BaseChartComponent from 'yarn-ui/components/base-chart-component';
+
+export default BaseChartComponent.extend({
+  /*
+   * data = [{label="xx", value=},{...}]
+   */
+  renderDonutChart: function(data, title, showLabels = false, 
+    middleLabel = "Total", middleValue = undefined) {
+    var g = this.chart.g;
+    var layout = this.getLayout();
+    this.renderTitleAndBG(g, title, layout);
+
+    var total = 0;
+    var allZero = true;
+    for (var i = 0; i < data.length; i++) {
+      total += data[i].value;
+      if (data[i].value > 1e-6) {
+        allZero = false;
+      }
+    }
+
+    if (!middleValue) {
+      middleValue = total;
+    }
+
+    //Width and height
+    var h = layout.y2 - layout.y1;
+
+    // 50 is for title
+    var outerRadius = (h - 50 - 2 * layout.margin) / 2;
+    var innerRadius = outerRadius * 0.618;
+    var arc = d3.svg.arc()
+      .innerRadius(innerRadius)
+      .outerRadius(outerRadius);
+
+    var cx;
+    var cy = layout.y1 + 50 + layout.margin + outerRadius;
+    if (showLabels) {
+      cx = layout.x1 + layout.margin + outerRadius;
+    } else {
+      cx = (layout.x1 + layout.x2) / 2;
+    }
+
+    var pie = d3.layout.pie();
+    pie.sort(null);
+    pie.value(function(d) {
+      var v = d.value;
+      // make sure it > 0
+      v = Math.max(v, 1e-6);
+      return v;
+    });
+
+    //Set up groups
+    var arcs = g
+      .selectAll("g.arc")
+      .data(pie(data))
+      .enter()
+      .append("g")
+      .attr("class", "arc")
+      .attr("transform", "translate(" + cx + "," + cy + ")");
+
+    function tweenPie(finish) {
+      var start = {
+        startAngle: 0,
+        endAngle: 0
+      };
+      var i = d3.interpolate(start, finish);
+      return function(d) {
+        return arc(i(d));
+      };
+    }
+
+    //Draw arc paths
+    var path = arcs.append("path")
+      .attr("fill", function(d, i) {
+        if (d.value > 1e-6) {
+          return this.colors[i];
+        } else {
+          return "white";
+        }
+      }.bind(this))
+      .attr("d", arc)
+      .attr("stroke", function(d, i) {
+        if (allZero) {
+          return this.colors[i];
+        }
+      }.bind(this))
+      .attr("stroke-dasharray", function(d, i) {
+        if (d.value <= 1e-6) {
+          return "10,10";
+        }
+      }.bind(this));
+    this.bindTooltip(path);
+
+    // Show labels
+    if (showLabels) {
+      var lx = layout.x1 + layout.margin + outerRadius * 2 + 30;
+      var squareW = 15;
+      var margin = 10;
+
+      var select = g.selectAll(".rect")
+        .data(data)
+        .enter();
+      select.append("rect")
+        .attr("fill", function(d, i) {
+          return this.colors[i];
+        }.bind(this))
+        .attr("x", lx)
+        .attr("y", function(d, i) {
+          return layout.y1 + 50 + (squareW + margin) * i + layout.margin;
+        })
+        .attr("width", squareW)
+        .attr("height", squareW);
+      select.append("text")
+        .attr("x", lx + squareW + margin)
+        .attr("y", function(d, i) {
+          return layout.y1 + 50 + (squareW + margin) * i + layout.margin + squareW / 2;
+        })
+        .text(function(d) {
+          return d.label + ' = ' + d.value;
+        });
+    }
+
+    if (middleLabel) {
+      var highLightColor = this.colors[0];
+      g.append("text").text(middleLabel).attr("x", cx).attr("y", cy - 10).
+        attr("class", "donut-highlight-text").attr("fill", highLightColor);
+      g.append("text").text(middleValue).attr("x", cx).attr("y", cy + 20).
+        attr("class", "donut-highlight-text").attr("fill", highLightColor).
+        style("font-size", "30px");
+    }
+
+    path.transition()
+      .duration(500)
+      .attrTween('d', tweenPie);
+  },
+
+  draw: function() {
+    this.initChart();
+    this.renderDonutChart(this.get("data"), this.get("title"), this.get("showLabels"), 
+                          this.get("middleLabel"), this.get("middleValue"));
+  },
+
+  didInsertElement: function() {
+    this.draw();
+  },
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js
new file mode 100644
index 0000000..a18ccae
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/item-selector.js
@@ -0,0 +1,21 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+  didInsertElement: function() {
+    $(".js-example-basic-single").select2(
+      {
+        width: '100%',
+        placeholder: "Select a queue"
+      });
+    var elementId = this.get("element-id");
+    var prefix = this.get("prefix");
+
+    var element = d3.select("#" + elementId);
+
+    if (element) {
+      this.get("model").forEach(function(o) {
+        element.append("option").attr("value", o.get("name")).text(prefix + o.get("name"));
+      });
+    }
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js
new file mode 100644
index 0000000..aff0493
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-configuration-table.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js
new file mode 100644
index 0000000..aff0493
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-navigator.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js
new file mode 100644
index 0000000..c1fd8ff
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/queue-view.js
@@ -0,0 +1,272 @@
+import Ember from 'ember';
+import ChartUtilsMixin from 'yarn-ui/mixins/charts-utils';
+
+export default Ember.Component.extend(ChartUtilsMixin, {
+	queues: {
+		data: undefined,
+		foldedQueues: {},
+		selectedQueueCircle: undefined,
+		maxDepth: -1,
+	},
+
+	queueColors: d3.scale.category20().range(),
+
+	renderQueue: function(now, depth, sequence) {
+		if (depth > this.queues.maxDepth) {
+			this.queues.maxDepth = depth;
+		}
+
+		var cx = 20 + depth * 30;
+		var cy = 20 + sequence * 30;
+		var name = now.get("name");
+
+		var g = this.queues.dataGroup.append("g")
+			.attr("id", "queue-" + name + "-g");
+
+		var folded = this.queues.foldedQueues[name];
+		var isParentQueue = false;
+
+		// render its children
+		var children = [];
+		var childrenNames = now.get("children");
+		if (childrenNames) {
+			childrenNames.forEach(function(name) {
+				isParentQueue = true;
+				var child = this.queues.data[name];
+				if (child) {
+					children.push(child);
+				}
+			}.bind(this));
+		}
+		if (folded) {
+			children = [];
+		}
+		var linefunction = d3.svg.line()
+			.interpolate("basis")
+			.x(function(d) {
+				return d.x;
+			})
+			.y(function(d) {
+				return d.y;
+			});
+
+		for (var i = 0; i < children.length; i++) {
+			sequence = sequence + 1;
+			// Get center of children queue
+			var cc = this.renderQueue(children[i],
+				depth + 1, sequence);
+			g.append("path")
+				.attr("class", "queue")
+				.attr("d", linefunction([{
+					x: cx,
+					y: cy
+				}, {
+					x: cc.x - 20,
+					y: cc.y
+				}, cc]));
+		}
+
+		var circle = g.append("circle")
+			.attr("cx", cx)
+			.attr("cy", cy)
+			.attr("class", "queue");
+
+		circle.on('mouseover', function() {
+			circle.style("fill", this.queueColors[1]);
+		}.bind(this));
+		circle.on('mouseout', function() {
+			if (circle != this.queues.selectedQueueCircle) {
+				circle.style("fill", this.queueColors[0]);
+			}
+		}.bind(this));
+		circle.on('click', function() {
+			circle.style("fill", this.queueColors[2]);
+			var pre = this.queues.selectedQueueCircle;
+			this.queues.selectedQueueCircle = circle;
+			if (pre) {
+				pre.on('mouseout')();
+			}
+			this.renderCharts(name);
+		}.bind(this));
+		circle.on('dblclick', function() {
+			if (!isParentQueue) {
+				return;
+			}
+
+			if (this.queues.foldedQueues[name]) {
+				delete this.queues.foldedQueues[name];
+			} else {
+				this.queues.foldedQueues[name] = now;
+			}
+			this.renderQueues();
+		}.bind(this));
+
+		var text = name;
+		if (folded) {
+			text = name + " (+)";
+		}
+
+		// print queue's name
+		g.append("text")
+			.attr("x", cx + 30)
+			.attr("y", cy + 5)
+			.text(text)
+			.attr("class", "queue");
+
+		return {
+			x: cx,
+			y: cy
+		};
+	},
+
+	renderQueues: function() {
+		if (this.queues.dataGroup) {
+			this.queues.dataGroup.remove();
+		}
+		// render queues
+		this.queues.dataGroup = this.canvas.svg.append("g")
+			.attr("id", "queues-g");
+		var rootQueue = undefined;
+
+		if (this.queues.data) {
+			this.renderQueue(this.queues.data['root'], 0, 0);
+
+		}
+	},
+
+	draw: function() {
+		this.queues.data = {};
+		this.get("model")
+			.forEach(function(o) {
+				this.queues.data[o.id] = o;
+			}.bind(this));
+
+		// get w/h of the svg
+		var bbox = d3.select("#main-container")
+			.node()
+			.getBoundingClientRect();
+		this.canvas.w = bbox.width;
+		this.canvas.h = Math.max(Object.keys(this.queues.data)
+			.length * 35, 1500);
+
+		this.canvas.svg = d3.select("#main-container")
+			.append("svg")
+			.attr("width", this.canvas.w)
+			.attr("height", this.canvas.h)
+			.attr("id", "main-svg");
+
+		this.renderBackground();
+
+		this.renderQueues();
+		this.renderCharts("root");
+	},
+
+	didInsertElement: function() {
+		this.draw();
+	},
+
+	/*
+	 * data = [{label="xx", value=},{...}]
+	 */
+	renderTable: function(data, title, layout) {
+		d3.select("#main-svg")
+			.append('table')
+			.selectAll('tr')
+			.data(data)
+			.enter()
+			.append('tr')
+			.selectAll('td')
+			.data(function(d) {
+				return d;
+			})
+			.enter()
+			.append('td')
+			.text(function(d) {
+				return d;
+			});
+	},
+
+	renderQueueCapacities: function(queue, layout) {
+		// Render bar chart
+		this.renderBarChart(this.charts.g, [{
+			label: "Cap",
+			value: queue.get("capacity")
+		}, {
+			label: "MaxCap",
+			value: queue.get("maxCapacity")
+		}, {
+			label: "UsedCap",
+			value: queue.get("usedCapacity")
+		}], "Queue Capacities", layout, 60);
+	},
+
+	renderChildrenCapacities: function(queue, layout) {
+		var data = [];
+		var children = queue.get("children");
+		if (children) {
+			for (var i = 0; i < children.length; i++) {
+				var child = this.queues.data[children[i]];
+				data.push({
+					label: child.get("name"),
+					value: child.get("capacity")
+				});
+			}
+		}
+
+		this.renderDonutChart(this.charts.g, data, "Children Capacities", layout, true);
+	},
+
+	renderChildrenUsedCapacities: function(queue, layout) {
+		var data = [];
+		var children = queue.get("children");
+		if (children) {
+			for (var i = 0; i < children.length; i++) {
+				var child = this.queues.data[children[i]];
+				data.push({
+					label: child.get("name"),
+					value: child.get("usedCapacity")
+				});
+			}
+		}
+
+		this.renderDonutChart(this.charts.g, data, "Children Used Capacities", layout, true);
+	},
+
+	renderLeafQueueUsedCapacities: function(layout) {
+		var leafQueueUsedCaps = [];
+		for (var queueName in this.queues.data) {
+			var q = this.queues.data[queueName];
+			if ((!q.get("children")) || q.get("children")
+				.length == 0) {
+				// it's a leafqueue
+				leafQueueUsedCaps.push({
+					label: q.get("name"),
+					value: q.get("usedCapacity")
+				});
+			}
+		}
+
+		this.renderDonutChart(this.charts.g, leafQueueUsedCaps, "LeafQueues Used Capacities",
+			layout, true);
+	},
+
+	renderCharts: function(queueName) {
+	  this.charts.leftBannerLen = this.queues.maxDepth * 30 + 100;
+		this.initCharts();
+
+		var queue = this.queues.data[queueName];
+		var idx = 0;
+
+		if (queue.get("name") == "root") {
+			this.renderLeafQueueUsedCapacities(this.getLayout(idx++));
+		}
+		if (queue.get("name") != "root") {
+			this.renderQueueCapacities(queue, this.getLayout(idx++));
+		}
+		if (queue.get("children") && queue.get("children")
+			.length > 0) {
+			this.renderChildrenCapacities(queue, this.getLayout(idx++));
+			this.renderChildrenUsedCapacities(queue, this.getLayout(idx++));
+		}
+	},
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
new file mode 100644
index 0000000..ed8ff9b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/simple-table.js
@@ -0,0 +1,30 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+  didInsertElement: function() {
+    var paging = this.get("paging") ? true : this.get("paging");
+    var ordering = this.get("ordering") ? true : this.get("ordering");
+    var info = this.get("info") ? true : this.get("info");
+    var bFilter = this.get("bFilter") ? true : this.get("bFilter");
+
+    var colDefs = [];
+    if (this.get("colTypes")) {
+      var typesArr = this.get("colTypes").split(' ');
+      var targetsArr = this.get("colTargets").split(' ');
+      for (var i = 0; i < typesArr.length; i++) {
+        colDefs.push({
+          type: typesArr[i],
+          targets: parseInt(targetsArr[i])
+        });
+      }
+    }
+
+    $('#' + this.get('table-id')).DataTable({
+      "paging":   paging,
+      "ordering": ordering, 
+      "info":     info,
+      "bFilter": bFilter,
+      columnDefs: colDefs
+    });
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js
new file mode 100644
index 0000000..fe402bb
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/timeline-view.js
@@ -0,0 +1,250 @@
+import Ember from 'ember';
+import Converter from 'yarn-ui/utils/converter';
+
+export default Ember.Component.extend({
+  canvas: {
+    svg: undefined,
+    h: 0,
+    w: 0,
+    tooltip: undefined
+  },
+
+  clusterMetrics: undefined,
+  modelArr: [],
+  colors: d3.scale.category10().range(),
+  _selected: undefined,
+
+  selected: function() {
+    return this._selected;
+  }.property(),
+
+  tableComponentName: function() {
+    return "app-attempt-table";
+  }.property(),
+
+  setSelected: function(d) {
+    if (this._selected == d) {
+      return;
+    }
+
+    // restore color
+    if (this._selected) {
+      var dom = d3.select("#timeline-bar-" + this._selected.get("id"));
+      dom.attr("fill", this.colors[0]);
+    }
+
+    this._selected = d;
+    this.set("selected", d);
+    dom = d3.select("#timeline-bar-" + d.get("id"));
+    dom.attr("fill", this.colors[1]);
+  },
+
+  getPerItemHeight: function() {
+    var arrSize = this.modelArr.length;
+
+    if (arrSize < 20) {
+      return 30;
+    } else if (arrSize < 100) {
+      return 10;
+    } else {
+      return 2;
+    }
+  },
+
+  getPerItemGap: function() {
+    var arrSize = this.modelArr.length;
+
+    if (arrSize < 20) {
+      return 5;
+    } else if (arrSize < 100) {
+      return 1;
+    } else {
+      return 1;
+    }
+  },
+
+  getCanvasHeight: function() {
+    return (this.getPerItemHeight() + this.getPerItemGap()) * this.modelArr.length + 200;
+  },
+
+  draw: function(start, end) {
+    // get w/h of the svg
+    var bbox = d3.select("#" + this.get("parent-id"))
+      .node()
+      .getBoundingClientRect();
+    this.canvas.w = bbox.width;
+    this.canvas.h = this.getCanvasHeight();
+
+    this.canvas.svg = d3.select("#" + this.get("parent-id"))
+      .append("svg")
+      .attr("width", this.canvas.w)
+      .attr("height", this.canvas.h)
+      .attr("id", this.get("my-id"));
+    this.renderTimeline(start, end);
+  },
+
+  renderTimeline: function(start, end) {
+    var border = 30;
+    var singleBarHeight = this.getPerItemHeight();
+    var gap = this.getPerItemGap();
+    var textWidth = 50;
+    /*
+     start-time                              end-time
+      |--------------------------------------|
+         ==============
+                ==============
+                        ==============
+                              ===============
+     */
+    var xScaler = d3.scale.linear()
+      .domain([start, end])
+      .range([0, this.canvas.w - 2 * border - textWidth]);
+
+    /*
+     * Render frame of timeline view
+     */
+    this.canvas.svg.append("line")
+      .attr("x1", border + textWidth)
+      .attr("y1", border - 5)
+      .attr("x2", this.canvas.w - border)
+      .attr("y2", border - 5)
+      .attr("class", "chart");
+
+    this.canvas.svg.append("line")
+      .attr("x1", border + textWidth)
+      .attr("y1", border - 10)
+      .attr("x2", border + textWidth)
+      .attr("y2", border - 5)
+      .attr("class", "chart");
+
+    this.canvas.svg.append("line")
+      .attr("x1", this.canvas.w - border)
+      .attr("y1", border - 10)
+      .attr("x2", this.canvas.w - border)
+      .attr("y2", border - 5)
+      .attr("class", "chart");
+
+    this.canvas.svg.append("text")
+        .text(Converter.timeStampToDate(start))
+        .attr("y", border - 15)
+        .attr("x", border + textWidth)
+        .attr("class", "bar-chart-text")
+        .attr("text-anchor", "left");
+
+    this.canvas.svg.append("text")
+        .text(Converter.timeStampToDate(end))
+        .attr("y", border - 15)
+        .attr("x", this.canvas.w - border)
+        .attr("class", "bar-chart-text")
+        .attr("text-anchor", "end");
+
+    // show bar
+    var bar = this.canvas.svg.selectAll("bars")
+      .data(this.modelArr)
+      .enter()
+      .append("rect")
+      .attr("y", function(d, i) {
+        return border + (gap + singleBarHeight) * i;
+      })
+      .attr("x", function(d, i) {
+        return border + textWidth + xScaler(d.get("startTs"));
+      })
+      .attr("height", singleBarHeight)
+      .attr("fill", function(d, i) {
+        return this.colors[0];
+      }.bind(this))
+      .attr("width", function(d, i) {
+        var finishedTs = xScaler(d.get("finishedTs"));
+        finishedTs = finishedTs > 0 ? finishedTs : xScaler(end);
+        return finishedTs - xScaler(d.get("startTs"));
+      })
+      .attr("id", function(d, i) {
+        return "timeline-bar-" + d.get("id");
+      });
+    bar.on("click", function(d) {
+      this.setSelected(d);
+    }.bind(this));
+
+    this.bindTooltip(bar);
+
+    if (this.modelArr.length <= 20) {
+      // show bar texts
+      for (var i = 0; i < this.modelArr.length; i++) {
+        this.canvas.svg.append("text")
+          .text(this.modelArr[i].get(this.get("label")))
+          .attr("y", border + (gap + singleBarHeight) * i + singleBarHeight / 2)
+          .attr("x", border)
+          .attr("class", "bar-chart-text");
+      }
+    }
+  },
+
+  bindTooltip: function(d) {
+    d.on("mouseover", function(d) {
+        this.tooltip
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mousemove", function(d) {
+        this.tooltip.style("opacity", .9);
+        this.tooltip.html(d.get("tooltipLabel"))
+          .style("left", (d3.event.pageX) + "px")
+          .style("top", (d3.event.pageY - 28) + "px");
+      }.bind(this))
+      .on("mouseout", function(d) {
+        this.tooltip.style("opacity", 0);
+      }.bind(this));
+  },
+
+  initTooltip: function() {
+    this.tooltip = d3.select("body")
+      .append("div")
+      .attr("class", "tooltip")
+      .attr("id", "chart-tooltip")
+      .style("opacity", 0);
+  },
+
+  didInsertElement: function() {
+    // init tooltip
+    this.initTooltip();
+
+    // init model
+    if (this.get("rmModel")) {
+      this.get("rmModel").forEach(function(o) {
+        this.modelArr.push(o);
+      }.bind(this));
+    }
+
+    if (this.get("tsModel")) {
+     this.get("tsModel").forEach(function(o) {
+        this.modelArr.push(o);
+      }.bind(this)); 
+    }
+
+    this.modelArr.sort(function(a, b) {
+      var tsA = a.get("startTs");
+      var tsB = b.get("startTs");
+
+      return tsA - tsB;
+    });
+    if (this.modelArr.length > 0) {
+      var begin = this.modelArr[0].get("startTs");
+    }
+    var end = 0;
+    for (var i = 0; i < this.modelArr.length; i++) {
+      var ts = this.modelArr[i].get("finishedTs");
+      if (ts > end) {
+        end = ts;
+      }
+    }
+    if (end < begin) {
+      end = Date.now();
+    }
+
+    this.draw(begin, end);
+
+    if (this.modelArr.length > 0) {
+      this.setSelected(this.modelArr[0]);
+    }
+  },
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js
new file mode 100644
index 0000000..470deaf
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/components/tree-selector.js
@@ -0,0 +1,257 @@
+import Ember from 'ember';
+
+export default Ember.Component.extend({
+  // Map: <queue-name, queue>
+  map : undefined,
+
+  // Normalized data for d3
+  treeData: undefined,
+
+  // folded queues, folded[<queue-name>] == true means <queue-name> is folded
+  foldedQueues: { },
+
+  // maxDepth
+  maxDepth: 0,
+
+  // num of leaf queue, folded queue is treated as leaf queue
+  numOfLeafQueue: 0,
+
+  // mainSvg
+  mainSvg: undefined,
+
+  // Init data
+  initData: function() {
+    this.map = { };
+    this.treeData = { };
+    this.maxDepth = 0;
+    this.numOfLeafQueue = 0;
+
+    this.get("model")
+      .forEach(function(o) {
+        this.map[o.id] = o;
+      }.bind(this));
+
+    var selected = this.get("selected");
+
+    this.initQueue("root", 1, this.treeData);
+  },
+
+  // get Children array of given queue
+  getChildrenNamesArray: function(q) {
+    var namesArr = [];
+
+    // Folded queue's children is empty
+    if (this.foldedQueues[q.get("name")]) {
+      return namesArr;
+    }
+
+    var names = q.get("children");
+    if (names) {
+      names.forEach(function(name) {
+        namesArr.push(name);
+      });
+    }
+
+    return namesArr;
+  },
+
+  // Init queues
+  initQueue: function(queueName, depth, node) {
+    if ((!queueName) || (!this.map[queueName])) {
+      // Queue is not existed
+      return;
+    }
+
+    if (depth > this.maxDepth) {
+      this.maxDepth = this.maxDepth + 1;
+    }
+
+    var queue = this.map[queueName];
+
+    var names = this.getChildrenNamesArray(queue);
+
+    node.name = queueName;
+    node.parent = queue.get("parent");
+    node.queueData = queue;
+
+    if (names.length > 0) {
+      node.children = [];
+
+      names.forEach(function(name) {
+        var childQueueData = {};
+        node.children.push(childQueueData);
+        this.initQueue(name, depth + 1, childQueueData);
+      }.bind(this));
+    } else {
+      this.numOfLeafQueue = this.numOfLeafQueue + 1;
+    }
+  },
+
+  update: function(source, root, tree, diagonal) {
+    var duration = 300;
+    var i = 0;
+
+    // Compute the new tree layout.
+    var nodes = tree.nodes(root).reverse();
+    var links = tree.links(nodes);
+
+    // Normalize for fixed-depth.
+    nodes.forEach(function(d) { d.y = d.depth * 200; });
+
+    // Update the nodes…
+    var node = this.mainSvg.selectAll("g.node")
+      .data(nodes, function(d) { return d.id || (d.id = ++i); });
+
+    // Enter any new nodes at the parent's previous position.
+    var nodeEnter = node.enter().append("g")
+      .attr("class", "node")
+      .attr("transform", function(d) { return "translate(" + source.y0 + "," + source.x0 + ")"; })
+      .on("click", function(d,i){
+        if (d.queueData.get("name") != this.get("selected")) {
+            document.location.href = "yarnQueue/" + d.queueData.get("name");
+        }
+      }.bind(this));
+      // .on("click", click);
+
+    nodeEnter.append("circle")
+      .attr("r", 1e-6)
+      .style("fill", function(d) {
+        var usedCap = d.queueData.get("usedCapacity");
+        if (usedCap <= 60.0) {
+          return "LimeGreen";
+        } else if (usedCap <= 100.0) {
+          return "DarkOrange";
+        } else {
+          return "LightCoral";
+        }
+      });
+
+    // append percentage
+    nodeEnter.append("text")
+      .attr("x", function(d) { return 0; })
+      .attr("dy", ".35em")
+      .attr("text-anchor", function(d) { return "middle"; })
+      .text(function(d) {
+        var usedCap = d.queueData.get("usedCapacity");
+        if (usedCap >= 100.0) {
+          return usedCap.toFixed(0) + "%";
+        } else {
+          return usedCap.toFixed(1) + "%";
+        }
+      })
+      .style("fill-opacity", 1e-6);
+
+    // append queue name
+    nodeEnter.append("text")
+      .attr("x", function(d) { return 40; })
+      .attr("dy", ".35em")
+      .attr("text-anchor", function(d) { return "start"; })
+      .text(function(d) { return d.name; })
+      .style("fill-opacity", 1e-6);
+
+    // Transition nodes to their new position.
+    var nodeUpdate = node.transition()
+      .duration(duration)
+      .attr("transform", function(d) { return "translate(" + d.y + "," + d.x + ")"; });
+
+    nodeUpdate.select("circle")
+      .attr("r", 20)
+      .attr("href", 
+        function(d) {
+          return "yarnQueues/" + d.queueData.get("name");
+        })
+      .style("stroke", function(d) {
+        if (d.queueData.get("name") == this.get("selected")) {
+          return "red";
+        } else {
+          return "gray";
+        }
+      }.bind(this));
+
+    nodeUpdate.selectAll("text")
+      .style("fill-opacity", 1);
+
+    // Transition exiting nodes to the parent's new position.
+    var nodeExit = node.exit().transition()
+      .duration(duration)
+      .attr("transform", function(d) { return "translate(" + source.y + "," + source.x + ")"; })
+      .remove();
+
+    nodeExit.select("circle")
+      .attr("r", 1e-6);
+
+    nodeExit.select("text")
+      .style("fill-opacity", 1e-6);
+
+    // Update the links…
+    var link = this.mainSvg.selectAll("path.link")
+      .data(links, function(d) { return d.target.id; });
+
+    // Enter any new links at the parent's previous position.
+    link.enter().insert("path", "g")
+      .attr("class", "link")
+      .attr("d", function(d) {
+      var o = {x: source.x0, y: source.y0};
+      return diagonal({source: o, target: o});
+      });
+
+    // Transition links to their new position.
+    link.transition()
+      .duration(duration)
+      .attr("d", diagonal);
+
+    // Transition exiting nodes to the parent's new position.
+    link.exit().transition()
+      .duration(duration)
+      .attr("d", function(d) {
+      var o = {x: source.x, y: source.y};
+      return diagonal({source: o, target: o});
+      })
+      .remove();
+
+    // Stash the old positions for transition.
+    nodes.forEach(function(d) {
+      d.x0 = d.x;
+      d.y0 = d.y;
+    });
+  },
+
+  reDraw: function() {
+    this.initData();
+
+    var margin = {top: 20, right: 120, bottom: 20, left: 120};
+    var treeWidth = this.maxDepth * 200;
+    var treeHeight = this.numOfLeafQueue * 80;
+    var width = treeWidth + margin.left + margin.right;
+    var height = treeHeight + margin.top + margin.bottom;
+    var layout = { };
+
+    if (this.mainSvg) {
+      this.mainSvg.remove();
+    }
+
+    this.mainSvg = d3.select("#" + this.get("parentId")).append("svg")
+      .attr("width", width)
+      .attr("height", height)
+      .attr("class", "tree-selector")
+      .append("g")
+      .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
+
+    var tree = d3.layout.tree().size([treeHeight, treeWidth]);
+
+    var diagonal = d3.svg.diagonal()
+      .projection(function(d) { return [d.y, d.x]; });
+
+    var root = this.treeData;
+    root.x0 = height / 2;
+    root.y0 = 0;
+
+    d3.select(self.frameElement).style("height", height);
+
+    this.update(root, root, tree, diagonal);
+  },
+
+  didInsertElement: function() {
+   this.reDraw();
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js
new file mode 100644
index 0000000..5c3c825
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/cluster-overview.js
@@ -0,0 +1,5 @@
+import Ember from 'ember';
+
+export default Ember.Controller.extend({
+  loading: true,
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js
new file mode 100644
index 0000000..55ff9aa
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-apps.js
@@ -0,0 +1,4 @@
+import Ember from 'ember';
+
+export default Ember.Controller.extend({
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js
new file mode 100644
index 0000000..b16864e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/controllers/yarn-queue.js
@@ -0,0 +1,6 @@
+import Ember from 'ember';
+
+export default Ember.Controller.extend({
+	needReload: true,
+  selectedQueue: undefined,
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/helpers/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html
new file mode 100644
index 0000000..edc4f2e
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/index.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>YarnUi</title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+
+    {{content-for 'head'}}
+
+    <link rel="stylesheet" href="assets/vendor.css">
+    <link rel="stylesheet" href="assets/yarn-ui.css">
+
+    {{content-for 'head-footer'}}
+  </head>
+  <body>
+    {{content-for 'body'}}
+
+    <script src="assets/vendor.js"></script>
+    <script src="assets/yarn-ui.js"></script>
+
+    {{content-for 'body-footer'}}
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js
new file mode 100644
index 0000000..b1f0a88
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-info.js
@@ -0,0 +1,13 @@
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+  startedOn: DS.attr('string'),
+  state: DS.attr('string'),
+  haState: DS.attr('string'),
+  rmStateStoreName: DS.attr('string'),
+  resourceManagerVersion: DS.attr('string'),
+  resourceManagerBuildVersion: DS.attr('string'),
+  hadoopVersion: DS.attr('string'),
+  hadoopBuildVersion: DS.attr('string'),
+  hadoopVersionBuiltOn: DS.attr('string')
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js
new file mode 100644
index 0000000..2dd428c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/cluster-metric.js
@@ -0,0 +1,115 @@
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+  appsSubmitted: DS.attr('number'),
+  appsCompleted: DS.attr('number'),
+  appsPending: DS.attr('number'),
+  appsRunning: DS.attr('number'),
+  appsFailed: DS.attr('number'),
+  appsKilled: DS.attr('number'),
+  reservedMB: DS.attr('number'),
+  availableMB: DS.attr('number'),
+  allocatedMB: DS.attr('number'),
+  reservedVirtualCores: DS.attr('number'),
+  availableVirtualCores: DS.attr('number'),
+  allocatedVirtualCores: DS.attr('number'),
+  containersAllocated: DS.attr('number'),
+  containersReserved: DS.attr('number'),
+  containersPending: DS.attr('number'),
+  totalMB: DS.attr('number'),
+  totalVirtualCores: DS.attr('number'),
+  totalNodes: DS.attr('number'),
+  lostNodes: DS.attr('number'),
+  unhealthyNodes: DS.attr('number'),
+  decommissionedNodes: DS.attr('number'),
+  rebootedNodes: DS.attr('number'),
+  activeNodes: DS.attr('number'),
+
+  getFinishedAppsDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Completed",
+      value: this.get("appsCompleted")
+    });
+    arr.push({
+      label: "Killed",
+      value: this.get("appsKilled")
+    });
+    arr.push({
+      label: "Failed",
+      value: this.get("appsFailed")
+    });
+
+    return arr;
+  }.property("appsCompleted", "appsKilled", "appsFailed"),
+
+  getRunningAppsDataForDonutChart: function() {
+    var arr = [];
+
+    arr.push({
+      label: "Pending",
+      value: this.get("appsPending")
+    });
+    arr.push({
+      label: "Running",
+      value: this.get("appsRunning")
+    });
+
+    return arr;
+  }.property("appsPending", "appsRunning"),
+
+  getNodesDataForDonutChart: function() {
+    var arr = [];
+    arr.push({
+      label: "Active",
+      value: this.get("activeNodes")
+    });
+    arr.push({
+      label: "Unhealthy",
+      value: this.get("unhealthyNodes")
+    });
+    arr.push({
+      label: "Decomissioned",
+      value: this.get("decommissionedNodes")
+    });
+    return arr;
+  }.property("activeNodes", "unhealthyNodes", "decommissionedNodes"),
+
+  getMemoryDataForDonutChart: function() {
+    var type = "MB";
+    var arr = [];
+    arr.push({
+      label: "Allocated",
+      value: this.get("allocated" + type)
+    });
+    arr.push({
+      label: "Reserved",
+      value: this.get("reserved" + type)
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("available" + type)
+    });
+
+    return arr;
+  }.property("allocatedMB", "reservedMB", "availableMB"),
+
+  getVCoreDataForDonutChart: function() {
+    var type = "VirtualCores";
+    var arr = [];
+    arr.push({
+      label: "Allocated",
+      value: this.get("allocated" + type)
+    });
+    arr.push({
+      label: "Reserved",
+      value: this.get("reserved" + type)
+    });
+    arr.push({
+      label: "Available",
+      value: this.get("available" + type)
+    });
+
+    return arr;
+  }.property("allocatedVirtualCores", "reservedVirtualCores", "availableVirtualCores"),
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js
new file mode 100644
index 0000000..fcb5134
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app-attempt.js
@@ -0,0 +1,44 @@
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.Model.extend({
+  startTime: DS.attr('string'),
+  finishedTime: DS.attr('string'),
+  containerId: DS.attr('string'),
+  nodeHttpAddress: DS.attr('string'),
+  nodeId: DS.attr('string'),
+  logsLink: DS.attr('string'),
+
+  startTs: function() {
+    return Converter.dateToTimeStamp(this.get("startTime"));
+  }.property("startTime"),
+
+  finishedTs: function() {
+    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
+    return ts;
+  }.property("finishedTime"),
+
+  shortAppAttemptId: function() {
+    return "attempt_" + 
+           parseInt(Converter.containerIdToAttemptId(this.get("containerId")).split("_")[3]);
+  }.property("containerId"),
+
+  elapsedTime: function() {
+    var elapsedMs = this.get("finishedTs") - this.get("startTs");
+    if (elapsedMs <= 0) {
+      elapsedMs = Date.now() - this.get("startTs");
+    }
+
+    return Converter.msToElapsedTime(elapsedMs);
+  }.property(),
+
+  tooltipLabel: function() {
+    return "<p>Id:" + this.get("id") + 
+           "</p><p>ElapsedTime:" + 
+           String(this.get("elapsedTime")) + "</p>";
+  }.property(),
+
+  link: function() {
+    return "/yarnAppAttempt/" + this.get("id");
+  }.property(),
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
new file mode 100644
index 0000000..cb79be1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-app.js
@@ -0,0 +1,65 @@
+import Converter from 'yarn-ui/utils/converter';
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+	appName: DS.attr('string'),
+	user: DS.attr('string'),
+	queue: DS.attr('string'),
+	state: DS.attr('string'),
+	startTime: DS.attr('string'),
+	elapsedTime: DS.attr('string'),
+  finalStatus: DS.attr('string'),
+  finishedTime: DS.attr('finishedTime'),
+  progress: DS.attr('number'),
+  diagnostics: DS.attr('string'),
+  amContainerLogs: DS.attr('string'),
+  amHostHttpAddress: DS.attr('string'),
+  logAggregationStatus: DS.attr('string'),
+  unmanagedApplication: DS.attr('string'),
+  amNodeLabelExpression: DS.attr('string'),
+  applicationTags: DS.attr('string'),
+  priority: DS.attr('number'),
+  allocatedMB: DS.attr('number'),
+  allocatedVCores: DS.attr('number'),
+  runningContainers: DS.attr('number'),
+  memorySeconds: DS.attr('number'),
+  vcoreSeconds: DS.attr('number'),
+  preemptedResourceMB: DS.attr('number'),
+  preemptedResourceVCores: DS.attr('number'),
+  numNonAMContainerPreempted: DS.attr('number'),
+  numAMContainerPreempted: DS.attr('number'),
+
+  isFailed: function() {
+    return this.get('finalStatus') == "FAILED"
+  }.property("finalStatus"),
+
+  allocatedResource: function() {
+    return Converter.resourceToString(this.get("allocatedMB"), this.get("allocatedVCores"));
+  }.property("allocatedMB", "allocatedVCores"),
+
+  preemptedResource: function() {
+    return Converter.resourceToString(this.get("preemptedResourceMB"), this.get("preemptedResourceVCores"));
+  }.property("preemptedResourceMB", "preemptedResourceVCores"),
+
+  aggregatedResourceUsage: function() {
+    return Converter.resourceToString(this.get("memorySeconds"), this.get("vcoreSeconds")) + " (× Secs)";
+  }.property("memorySeconds", "vcoreSeconds"),
+
+  progressStyle: function() {
+    return "width: " + this.get("progress") + "%";
+  }.property("progress"),
+
+  finalStatusStyle: function() {
+    var style = "default";
+    var finalStatus = this.get("finalStatus");
+    if (finalStatus == "KILLED") {
+      style = "warning";
+    } else if (finalStatus == "FAILED") {
+      style = "danger";
+    } else {
+      style = "success";
+    }
+
+    return "label label-" + style;
+  }.property("finalStatus")
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js
new file mode 100644
index 0000000..f7977be
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-container.js
@@ -0,0 +1,39 @@
+import DS from 'ember-data';
+import Converter from 'yarn-ui/utils/converter';
+
+export default DS.Model.extend({
+  allocatedMB: DS.attr('number'),
+  allocatedVCores: DS.attr('number'),
+  assignedNodeId: DS.attr('string'),
+  priority: DS.attr('number'),
+  startedTime: DS.attr('number'),
+  finishedTime: DS.attr('number'),
+  logUrl: DS.attr('string'),
+  containerExitStatus: DS.attr('number'),
+  containerState: DS.attr('string'),
+  nodeHttpAddress: DS.attr('string'),
+
+  startTs: function() {
+    return Converter.dateToTimeStamp(this.get("startedTime"));
+  }.property("startedTime"),
+
+  finishedTs: function() {
+    var ts = Converter.dateToTimeStamp(this.get("finishedTime"));
+    return ts;
+  }.property("finishedTime"),
+
+  elapsedTime: function() {
+    var elapsedMs = this.get("finishedTs") - this.get("startTs");
+    if (elapsedMs <= 0) {
+      elapsedMs = Date.now() - this.get("startTs");
+    }
+
+    return Converter.msToElapsedTime(elapsedMs);
+  }.property(),
+
+  tooltipLabel: function() {
+    return "<p>Id:" + this.get("id") + 
+           "</p><p>ElapsedTime:" + 
+           String(this.get("elapsedTime")) + "</p>";
+  }.property(),
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js
new file mode 100644
index 0000000..5b91d70
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-queue.js
@@ -0,0 +1,76 @@
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+  name: DS.attr('string'),
+  children: DS.attr('array'),
+  parent: DS.attr('string'),
+  capacity: DS.attr('number'),
+  maxCapacity: DS.attr('number'),
+  usedCapacity: DS.attr('number'),
+  absCapacity: DS.attr('number'),
+  absMaxCapacity: DS.attr('number'),
+  absUsedCapacity: DS.attr('number'),
+  state: DS.attr('string'),
+  userLimit: DS.attr('number'),
+  userLimitFactor: DS.attr('number'),
+  preemptionDisabled: DS.attr('number'),
+  numPendingApplications: DS.attr('number'),
+  numActiveApplications: DS.attr('number'),
+  users: DS.hasMany('YarnUser'),
+
+  isLeafQueue: function() {
+    var len = this.get("children.length");
+    if (!len) {
+      return true;
+    }
+    return len <= 0;
+  }.property("children"),
+
+  capacitiesBarChartData: function() {
+    return [
+      {
+        label: "Absolute Capacity",
+        value: this.get("name") == "root" ? 100 : this.get("absCapacity")
+      },
+      {
+        label: "Absolute Used",
+        value: this.get("name") == "root" ? this.get("usedCapacity") : this.get("absUsedCapacity")
+      },
+      {
+        label: "Absolute Max Capacity",
+        value: this.get("name") == "root" ? 100 : this.get("absMaxCapacity")
+      }
+    ]
+  }.property("absCapacity", "absUsedCapacity", "absMaxCapacity"),
+
+  userUsagesDonutChartData: function() {
+    var data = [];
+    if (this.get("users")) {
+      this.get("users").forEach(function(o) {
+        data.push({
+          label: o.get("name"),
+          value: o.get("usedMemoryMB")
+        })
+      });
+    }
+
+    return data;
+  }.property("users"),
+
+  hasUserUsages: function() {
+    return this.get("userUsagesDonutChartData").length > 0;
+  }.property(),
+
+  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(),
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js
new file mode 100644
index 0000000..6e9c03c
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/models/yarn-user.js
@@ -0,0 +1,8 @@
+import DS from 'ember-data';
+
+export default DS.Model.extend({
+  name: DS.attr('string'),
+  queueName: DS.attr('string'),
+  usedMemoryMB: DS.attr('number'),
+  usedVCore: DS.attr('number')
+})
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
new file mode 100644
index 0000000..c31190f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/router.js
@@ -0,0 +1,16 @@
+import Ember from 'ember';
+import config from './config/environment';
+
+var Router = Ember.Router.extend({
+  location: config.locationType
+});
+
+Router.map(function() {
+  this.route('yarnApps');
+  this.route('yarnQueue', { path: '/yarnQueue/:queue_name' });
+  this.route('clusterOverview');
+  this.route('yarnApp', { path: '/yarnApp/:app_id' });
+  this.route('yarnAppAttempt', { path: '/yarnAppAttempt/:app_attempt_id'});
+});
+
+export default Router;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/.gitkeep
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js
new file mode 100644
index 0000000..4ba5dcd
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/cluster-overview.js
@@ -0,0 +1,11 @@
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+  model() {
+    return this.store.findAll('ClusterMetric');
+  },
+
+  afterModel() {
+    this.controllerFor("ClusterOverview").set("loading", false);
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js
new file mode 100644
index 0000000..3b6adc7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app-attempt.js
@@ -0,0 +1,21 @@
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+  model(param) {
+    return Ember.RSVP.hash({
+      attempt: this.store.findRecord('yarnAppAttempt', param.app_attempt_id),
+      
+      rmContainers: this.store.query('yarnContainer', 
+        {
+          app_attempt_id: param.app_attempt_id,
+          is_rm: true
+        }),
+      
+      tsContainers: this.store.query('yarnContainer', 
+        {
+          app_attempt_id: param.app_attempt_id,
+          is_rm: false
+        }),
+    });
+  }
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js
new file mode 100644
index 0000000..03092aa
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-app.js
@@ -0,0 +1,10 @@
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+  model(param) {
+    return Ember.RSVP.hash({
+      app: this.store.find('yarnApp', param.app_id),
+      attempts: this.store.query('yarnAppAttempt', { appId: param.app_id})
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
new file mode 100644
index 0000000..79d184f
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-apps.js
@@ -0,0 +1,8 @@
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+  model() {
+  	var apps = this.store.findAll('yarnApp');
+    return apps
+  }
+});

http://git-wip-us.apache.org/repos/asf/hadoop/blob/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js
new file mode 100644
index 0000000..9396bac
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queue.js
@@ -0,0 +1,20 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js
new file mode 100644
index 0000000..9be90b1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/index.js
@@ -0,0 +1,5 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js
new file mode 100644
index 0000000..0f6c572
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/routes/yarn-queues/queues-selector.js
@@ -0,0 +1,7 @@
+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/48e18bb4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js
new file mode 100644
index 0000000..cc936cb
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/cluster-info.js
@@ -0,0 +1,29 @@
+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


[17/20] hadoop git commit: YARN-4849. [YARN-3368] cleanup code base, integrate web UI related build to mvn, and fix licenses. (wangda)

Posted by wa...@apache.org.
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js
deleted file mode 100644
index a038fff..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-app.js
+++ /dev/null
@@ -1,66 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js
deleted file mode 100644
index 9e10615..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container-log.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * 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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js
deleted file mode 100644
index 665b9df..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-container.js
+++ /dev/null
@@ -1,54 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js
deleted file mode 100644
index 8b1f152..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-app.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js
deleted file mode 100644
index 528f2fe..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node-container.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * 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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js
deleted file mode 100644
index 19308e2..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-node.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * 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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js
deleted file mode 100644
index ce4d775..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-queue.js
+++ /dev/null
@@ -1,127 +0,0 @@
-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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js
deleted file mode 100644
index 6cb9320..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/serializers/yarn-rm-node.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css
deleted file mode 100644
index e1ff994..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/styles/app.css
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- 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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
deleted file mode 100644
index a9de203..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/application.hbs
+++ /dev/null
@@ -1,23 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs
deleted file mode 100644
index 81c11e9..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/cluster-overview.hbs
+++ /dev/null
@@ -1,56 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/.gitkeep
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/.gitkeep b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs
deleted file mode 100644
index 633d363..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-attempt-table.hbs
+++ /dev/null
@@ -1,28 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs
deleted file mode 100644
index 92e9d05..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/app-table.hbs
+++ /dev/null
@@ -1,62 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs
deleted file mode 100644
index 70d3fc4..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/container-table.hbs
+++ /dev/null
@@ -1,36 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs
deleted file mode 100644
index fb9f1a0..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-configuration-table.hbs
+++ /dev/null
@@ -1,40 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs
deleted file mode 100644
index 4ef22902..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/queue-navigator.hbs
+++ /dev/null
@@ -1,18 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs
deleted file mode 100644
index 657f6e8..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/components/timeline-view.hbs
+++ /dev/null
@@ -1,35 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs
deleted file mode 100644
index c546bf7..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/error.hbs
+++ /dev/null
@@ -1,19 +0,0 @@
-{{!--
-  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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs
deleted file mode 100644
index 588ea44..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/notfound.hbs
+++ /dev/null
@@ -1,20 +0,0 @@
-{{!--
-  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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs
deleted file mode 100644
index afcfa4f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app-attempt.hbs
+++ /dev/null
@@ -1,12 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs
deleted file mode 100644
index 0ba6749..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-app.hbs
+++ /dev/null
@@ -1,145 +0,0 @@
-<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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
deleted file mode 100644
index 3a79080..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-apps.hbs
+++ /dev/null
@@ -1,3 +0,0 @@
-{{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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs
deleted file mode 100644
index 9cc3b0f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-container-log.hbs
+++ /dev/null
@@ -1,36 +0,0 @@
-{{!--
-  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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs
deleted file mode 100644
index 4da64b8..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-app.hbs
+++ /dev/null
@@ -1,60 +0,0 @@
-{{!--
-  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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs
deleted file mode 100644
index c195397..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-apps.hbs
+++ /dev/null
@@ -1,51 +0,0 @@
-{{!--
-  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/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs
deleted file mode 100644
index fbbb2fc..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-container.hbs
+++ /dev/null
@@ -1,70 +0,0 @@
-{{!--
-  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}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs
deleted file mode 100644
index ca80ccd..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node-containers.hbs
+++ /dev/null
@@ -1,58 +0,0 @@
-{{!--
-  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="yarnNodeContainers" nodeAddr=model.nodeInfo.addr nodeId=model.nodeInfo.id}}
-    <div class="col-md-10 container-fluid">
-      <table id="node-containers-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
-        <thead>
-          <tr>
-            <th>Container ID</th>
-            <th>Container State</th>
-            <th>User</th>
-            <th>Logs</th>
-          </tr>
-        </thead>
-        <tbody>
-          {{#if model.containers}}
-            {{#each model.containers as |container|}}
-              {{#if container.isDummyContainer}}
-                <tr><td colspan="4" align="center">No containers found on this node</td></tr>
-              {{else}}
-                <tr>
-                  <td><a href="yarnNodeContainer/{{model.nodeInfo.id}}/{{model.nodeInfo.addr}}/{{container.containerId}}">{{container.containerId}}</a></td>
-                  <td><span class={{container.containerStateStyle}}>{{container.state}}</span></td>
-                  <td>{{container.user}}</td>
-                  <td>
-                    {{log-files-comma nodeId=model.nodeInfo.id
-                        nodeAddr=model.nodeInfo.addr
-                        containerId=container.containerId
-                        logFiles=container.containerLogFiles}}
-                  </td>
-                </tr>
-              {{/if}}
-            {{/each}}
-          {{/if}}
-        </tbody>
-      </table>
-      {{simple-table table-id="node-containers-table" bFilter=true colsOrder="0,desc" colTypes="natural" colTargets="0"}}
-    </div>
-  </div>
-</div>
-{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs
deleted file mode 100644
index a036076..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-node.hbs
+++ /dev/null
@@ -1,94 +0,0 @@
-{{!--
-  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="yarnNode" nodeId=model.rmNode.id nodeAddr=model.node.id}}
-    <div class="col-md-10 container-fluid">
-      <div class="panel panel-default">
-        <div class="panel-heading">Node Information</div>
-          <table class="table">
-            <tbody>
-              <tr>
-                <td>Total Vmem allocated for Containers</td>
-                <td>{{divide num=model.node.totalVmemAllocatedContainersMB den=1024}} GB</td>
-              </tr>
-              <tr>
-                <td>Vmem enforcement enabled</td>
-                <td>{{model.node.vmemCheckEnabled}}</td>
-              </tr>
-              <tr>
-                <td>Total Pmem allocated for Containers</td>
-                <td>{{divide num=model.node.totalPmemAllocatedContainersMB den=1024}} GB</td>
-              </tr>
-              <tr>
-                <td>Pmem enforcement enabled</td>
-                <td>{{model.node.pmemCheckEnabled}}</td>
-              </tr>
-              <tr>
-                <td>Total VCores allocated for Containers</td>
-                <td>{{model.node.totalVCoresAllocatedContainers}}</td>
-              </tr>
-              <tr>
-                <td>Node Healthy Status</td>
-                <td>{{model.node.nodeHealthy}}</td>
-              </tr>
-              <tr>
-                <td>Last Node Health Report Time</td>
-                <td>{{model.node.lastNodeUpdateTime}}</td>
-              </tr>
-              <tr>
-                <td>Node Health Report</td>
-                <td>{{model.node.healthReport}}</td>
-              </tr>
-              <tr>
-                <td>Node Manager Start Time</td>
-                <td>{{model.node.nmStartupTime}}</td>
-              </tr>
-              <tr>
-                <td>Node Manager Version</td>
-                <td>{{model.node.nodeManagerBuildVersion}}</td>
-              </tr>
-              <tr>
-                <td>Hadoop Version</td>
-                <td>{{model.node.hadoopBuildVersion}}</td>
-              </tr>
-            </tbody>
-          </table>
-        </div>
-      <div class="col-lg-4 container-fluid" id="mem-donut-chart">
-        {{donut-chart data=model.rmNode.getMemoryDataForDonutChart
-          title="Resource - Memory (in MB)"
-          showLabels=true
-          parentId="mem-donut-chart"
-          ratio=0.55
-          maxHeight=350}}
-      </div>
-
-      <div class="col-lg-4 container-fluid" id="vcore-donut-chart">
-        {{donut-chart data=model.rmNode.getVCoreDataForDonutChart
-          title="Resource - VCores"
-          showLabels=true
-          parentId="vcore-donut-chart"
-          ratio=0.55
-          maxHeight=350}}
-      </div>
-      </div>
-    </div>
-</div>
-{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs
deleted file mode 100644
index bf2a098..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-nodes.hbs
+++ /dev/null
@@ -1,65 +0,0 @@
-{{!--
-  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="nodes-table" class="display table table-striped table-bordered" cellspacing="0" width="100%">
-  <thead>
-    <tr>
-          <th>Node Labels</th>
-          <th>Rack</th>
-          <th>Node State</th>
-          <th>Node Address</th>
-          <th>Node HTTP Address</th>
-          <th>Last Health Update</th>
-          <th>Health-Report</th>
-          <th>Containers</th>
-          <th>Mem Used</th>
-          <th>Mem Avail</th>
-          <th>VCores Used</th>
-          <th>VCores Avail</th>
-          <th>Version</th>
-    </tr>
-  </thead>
-  <tbody>
-    {{#if model}}
-      {{#each model as |node|}}
-        {{#if node.isDummyNode}}
-          <tr><td colspan="13" align="center">No nodes found on this cluster</td></tr>
-        {{else}}
-          <tr>
-            <td>{{node.nodeLabelsAsString}}</td>
-            <td>{{node.rack}}</td>
-            <td><span class={{node.nodeStateStyle}}>{{node.state}}</span></td>
-            <td>{{node.id}}</td>
-            {{node-link nodeId=node.id nodeHTTPAddress=node.nodeHTTPAddress nodeState=node.state}}
-            <td>{{node.lastHealthUpdate}}</td>
-            <td>{{node.healthReport}}</td>
-            <td>{{node.numContainers}}</td>
-            <td>{{divide num=node.usedMemoryMB den=1024}} GB</td>
-            <td>{{divide num=node.availMemoryMB den=1024}} GB</td>
-            <td>{{node.usedVirtualCores}}</td>
-            <td>{{node.availableVirtualCores}}</td>
-            <td>{{node.version}}</td>
-          </tr>
-        {{/if}}
-      {{/each}}
-    {{/if}}
-  </tbody>
-</table>
-
-{{simple-table table-id="nodes-table" bFilter=true}}
-{{outlet}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs
deleted file mode 100644
index 11bb6f4..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/templates/yarn-queue.hbs
+++ /dev/null
@@ -1,48 +0,0 @@
-<div class="container-fluid">
-  {{queue-navigator model=model.queues selected=model.selected}}
-</div>
-
-<div class="row">
-  <div class="col-lg-3 container-fluid">
-    {{queue-configuration-table queue=model.selectedQueue}}
-  </div>
-
-  <div class="col-lg-3 container-fluid" id="capacity-bar-chart">
-    {{bar-chart data=model.selectedQueue.capacitiesBarChartData 
-        title="Queue Capacities" 
-        parentId="capacity-bar-chart"
-        textWidth=150
-        ratio=0.5
-        maxHeight=350}}
-  </div>
-
-{{#if model.selectedQueue.hasUserUsages}}
-  <div class="col-lg-3 container-fluid" id="userusage-donut-chart">
-    {{donut-chart data=model.selectedQueue.userUsagesDonutChartData 
-        title="User Usages" 
-        showLabels=true
-        parentId="userusage-donut-chart"
-        maxHeight=350}}
-  </div>
-{{/if}}
-
-  <div class="col-lg-3 container-fluid" id="numapplications-donut-chart">
-    {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData 
-        title="Running Apps" 
-        showLabels=true
-        parentId="numapplications-donut-chart"
-        ratio=0.5
-        maxHeight=350}}
-  </div>
-</div>
-
-<hr>
-
-<div class="row">
-  <div class="col-md-12 container-fluid">
-    {{app-table table-id="apps-table" arr=model.apps}}
-    {{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}}
-  </div>
-</div>
-
-{{outlet}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
deleted file mode 100644
index 0f49a58..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/converter.js
+++ /dev/null
@@ -1,91 +0,0 @@
-import Constants from 'yarn-ui/constants';
-
-export default {
-  containerIdToAttemptId: function(containerId) {
-    if (containerId) {
-      var arr = containerId.split('_');
-      var attemptId = ["appattempt", arr[1], 
-        arr[2], this.padding(arr[3], 6)];
-      return attemptId.join('_');
-    }
-  },
-  attemptIdToAppId: function(attemptId) {
-    if (attemptId) {
-      var arr = attemptId.split('_');
-      var appId = ["application", arr[1], 
-        arr[2]].join('_');
-      return appId;
-    }
-  },
-  padding: function(str, toLen=2) {
-    str = str.toString();
-    if (str.length >= toLen) {
-      return str;
-    }
-    return '0'.repeat(toLen - str.length) + str;
-  },
-  resourceToString: function(mem, cpu) {
-    mem = Math.max(0, mem);
-    cpu = Math.max(0, cpu);
-    return mem + " MBs, " + cpu + " VCores";
-  },
-  msToElapsedTime: function(timeInMs) {
-    var sec_num = timeInMs / 1000; // don't forget the second param
-    var hours = Math.floor(sec_num / 3600);
-    var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
-    var seconds = sec_num - (hours * 3600) - (minutes * 60);
-
-    var timeStrArr = [];
-
-    if (hours > 0) {
-      timeStrArr.push(hours + ' Hrs');
-    }
-    if (minutes > 0) {
-      timeStrArr.push(minutes + ' Mins');
-    }
-    if (seconds > 0) {
-      timeStrArr.push(Math.round(seconds) + " Secs");
-    }
-    return timeStrArr.join(' : ');
-  },
-  elapsedTimeToMs: function(elapsedTime) {
-    elapsedTime = elapsedTime.toLowerCase();
-    var arr = elapsedTime.split(' : ');
-    var total = 0;
-    for (var i = 0; i < arr.length; i++) {
-      if (arr[i].indexOf('hr') > 0) {
-        total += parseInt(arr[i].substring(0, arr[i].indexOf(' '))) * 3600;
-      } else if (arr[i].indexOf('min') > 0) {
-        total += parseInt(arr[i].substring(0, arr[i].indexOf(' '))) * 60;
-      } else if (arr[i].indexOf('sec') > 0) {
-        total += parseInt(arr[i].substring(0, arr[i].indexOf(' ')));
-      }
-    }
-    return total * 1000;
-  },
-  timeStampToDate: function(timeStamp) {
-    var dateTimeString = moment(parseInt(timeStamp)).format("YYYY/MM/DD HH:mm:ss");
-    return dateTimeString;
-  },
-  dateToTimeStamp: function(date) {
-    if (date) {
-      var ts = moment(date, "YYYY/MM/DD HH:mm:ss").valueOf();
-      return ts;
-    }
-  },
-  splitForContainerLogs: function(id) {
-    if (id) {
-      var splits = id.split(Constants.PARAM_SEPARATOR);
-      var splitLen = splits.length;
-      if (splitLen < 3) {
-        return null;
-      }
-      var fileName = splits[2];
-      var index;
-      for (index = 3; index < splitLen; index++) {
-        fileName = fileName + Constants.PARAM_SEPARATOR + splits[index];
-      }
-      return [splits[0], splits[1], fileName];
-    }
-  },
-};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
deleted file mode 100644
index a9a5f7f..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/app/utils/sorter.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import Converter from 'yarn-ui/utils/converter';
-import Ember from 'ember';
-
-export default {
-  _initElapsedTimeSorter: function() {
-    Ember.$.extend(Ember.$.fn.dataTableExt.oSort, {
-      "elapsed-time-pre": function (a) {
-         return Converter.padding(Converter.elapsedTimeToMs(a), 20);
-      },
-    });
-  },
-
-  _initNaturalSorter: function() {
-    Ember.$.extend(Ember.$.fn.dataTableExt.oSort, {
-      "natural-asc": function (a, b) {
-        return naturalSort(a,b);
-      },
-      "natural-desc": function (a, b) {
-        return naturalSort(a,b) * -1;
-      },
-    });
-  },
-
-  initDataTableSorter: function() {
-    this._initElapsedTimeSorter();
-    this._initNaturalSorter();
-  },
-};
-
-/**
- * Natural sort implementation.
- * Typically used to sort application Ids'.
- */
-function naturalSort(a, b) {
-  var diff = a.length - b.length;
-  if (diff != 0) {
-    var splitA = a.split("_");
-    var splitB = b.split("_");
-    if (splitA.length != splitB.length) {
-      return a.localeCompare(b);
-    }
-    for (var i = 1; i < splitA.length; i++) {
-      var splitdiff = splitA[i].length - splitB[i].length;
-      if (splitdiff != 0) {
-        return splitdiff;
-      }
-      var splitCompare = splitA[i].localeCompare(splitB[i]);
-      if (splitCompare != 0) {
-        return splitCompare;
-      }
-    }
-    return diff;
-  }
-  return a.localeCompare(b);
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
deleted file mode 100644
index de66650..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/bower.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  "name": "yarn-ui",
-  "dependencies": {
-    "ember": "2.0.1",
-    "ember-cli-shims": "ember-cli/ember-cli-shims#0.0.4",
-    "ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
-    "ember-data": "2.0.0",
-    "ember-load-initializers": "ember-cli/ember-load-initializers#0.1.6",
-    "ember-qunit": "0.4.9",
-    "ember-qunit-notifications": "0.0.7",
-    "ember-resolver": "~0.1.18",
-    "jquery": "1.11.3",
-    "loader.js": "ember-cli/loader.js#3.2.1",
-    "qunit": "~1.18.0",
-    "bootstrap": "~3.3.2",
-    "d3": "~3.5.6",
-    "datatables": "~1.10.8",
-    "spin.js": "~2.3.2",
-    "momentjs": "~2.10.6",
-    "select2": "4.0.0"
-  }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
deleted file mode 100644
index bb4f8d2..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/config/environment.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* jshint node: true */
-
-module.exports = function(environment) {
-  var ENV = {
-    modulePrefix: 'yarn-ui',
-    environment: environment,
-    baseURL: '/',
-    locationType: 'auto',
-    EmberENV: {
-      FEATURES: {
-        // Here you can enable experimental features on an ember canary build
-        // e.g. 'with-controller': true
-      }
-    },
-    APP: {
-      // Here you can pass flags/options to your application instance
-      // when it is created
-    }
-  };
-
-  if (environment === 'development') {
-    // ENV.APP.LOG_RESOLVER = true;
-    // ENV.APP.LOG_ACTIVE_GENERATION = true;
-    // ENV.APP.LOG_TRANSITIONS = true;
-    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
-    // ENV.APP.LOG_VIEW_LOOKUPS = true;
-  }
-
-  if (environment === 'test') {
-    // Testem prefers this...
-    ENV.baseURL = '/';
-    ENV.locationType = 'none';
-
-    // keep test console output quieter
-    ENV.APP.LOG_ACTIVE_GENERATION = false;
-    ENV.APP.LOG_VIEW_LOOKUPS = false;
-
-    ENV.APP.rootElement = '#ember-testing';
-  }
-
-  if (environment === 'production') {
-
-  }
-
-  return ENV;
-};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js
deleted file mode 100644
index 2fa2032..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/ember-cli-build.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* global require, module */
-var EmberApp = require('ember-cli/lib/broccoli/ember-app');
-
-module.exports = function(defaults) {
-  var app = new EmberApp(defaults, {
-    // Add options here
-  });
-
-  app.import("bower_components/datatables/media/css/jquery.dataTables.min.css");
-  app.import("bower_components/datatables/media/js/jquery.dataTables.min.js");
-  app.import("bower_components/momentjs/min/moment.min.js");
-  app.import("bower_components/select2/dist/css/select2.min.css");
-  app.import("bower_components/select2/dist/js/select2.min.js");
-
-  // Use `app.import` to add additional libraries to the generated
-  // output files.
-  //
-  // If you need to use different assets in different
-  // environments, specify an object as the first parameter. That
-  // object's keys should be the environment name and the values
-  // should be the asset to use in that environment.
-  //
-  // If the library that you are including contains AMD or ES6
-  // modules that you would like to import into your application
-  // please specify an object with the list of modules as keys
-  // along with the exports of each module as its value.
-
-  return app.toTree();
-};

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json
deleted file mode 100644
index 875bb90..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/jsconfig.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-    "compilerOptions": {
-        "target": "ES6",
-        "module": "commonjs"
-    }
-}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e35bf0f2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json
deleted file mode 100644
index 5500dcf..0000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "name": "yarn-ui",
-  "version": "0.0.0",
-  "description": "Small description for yarn-ui goes here",
-  "private": true,
-  "directories": {
-    "doc": "doc",
-    "test": "tests"
-  },
-  "scripts": {
-    "build": "ember build",
-    "start": "ember server",
-    "test": "ember test"
-  },
-  "repository": "",
-  "engines": {
-    "node": ">= 0.10.0"
-  },
-  "author": "",
-  "license": "MIT",
-  "devDependencies": {
-    "broccoli-asset-rev": "^2.1.2",
-    "ember-bootstrap": "0.2.0",
-    "ember-cli": "1.13.8",
-    "ember-cli-app-version": "0.5.0",
-    "ember-cli-babel": "^5.1.3",
-    "ember-cli-content-security-policy": "0.4.0",
-    "ember-cli-dependency-checker": "^1.0.1",
-    "ember-cli-htmlbars": "0.7.9",
-    "ember-cli-htmlbars-inline-precompile": "^0.2.0",
-    "ember-cli-ic-ajax": "0.2.1",
-    "ember-cli-inject-live-reload": "^1.3.1",
-    "ember-cli-qunit": "^1.0.0",
-    "ember-cli-release": "0.2.3",
-    "ember-cli-sri": "^1.0.3",
-    "ember-cli-uglify": "^1.2.0",
-    "ember-d3": "0.1.0",
-    "ember-data": "1.13.8",
-    "ember-disable-proxy-controllers": "^1.0.0",
-    "ember-export-application-global": "^1.0.3",
-    "ember-spin-spinner": "0.2.3",
-    "select2": "4.0.0"
-  }
-}


[02/20] hadoop git commit: HDFS-10266. Remove unused properties dfs.client.file-block-storage-locations.num-threads and dfs.client.file-block-storage-locations.timeout.millis. Contributed by Ray Chiang.

Posted by wa...@apache.org.
HDFS-10266. Remove unused properties dfs.client.file-block-storage-locations.num-threads and dfs.client.file-block-storage-locations.timeout.millis. Contributed by Ray Chiang.


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

Branch: refs/heads/YARN-3368
Commit: 9c32f8785e8d7957e3f8a3946cfd15a4d5c82fec
Parents: e82f961
Author: Akira Ajisaka <aa...@apache.org>
Authored: Fri Apr 8 15:32:13 2016 +0900
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Fri Apr 8 15:32:13 2016 +0900

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/HdfsConfiguration.java |  3 ---
 .../hadoop/hdfs/client/HdfsClientConfigKeys.java  |  6 ------
 .../org/apache/hadoop/hdfs/DFSConfigKeys.java     | 18 ------------------
 .../src/main/data/2jobs2min-rumen-jh.json         |  6 ------
 4 files changed, 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9c32f878/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HdfsConfiguration.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HdfsConfiguration.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HdfsConfiguration.java
index e93e6f1..b11aa4e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HdfsConfiguration.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HdfsConfiguration.java
@@ -139,9 +139,6 @@ public class HdfsConfiguration extends Configuration {
             HdfsClientConfigKeys.DFS_NAMESERVICES),
         new DeprecationDelta("dfs.federation.nameservice.id",
             DeprecatedKeys.DFS_NAMESERVICE_ID),
-        new DeprecationDelta("dfs.client.file-block-storage-locations.timeout",
-            HdfsClientConfigKeys.
-                DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS),
     });
   }
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9c32f878/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
index d50c89e..9edffca 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsClientConfigKeys.java
@@ -97,12 +97,6 @@ public interface HdfsClientConfigKeys {
   int     DFS_CLIENT_CACHED_CONN_RETRY_DEFAULT = 3;
   String  DFS_CLIENT_CONTEXT = "dfs.client.context";
   String  DFS_CLIENT_CONTEXT_DEFAULT = "default";
-  String  DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_NUM_THREADS =
-      "dfs.client.file-block-storage-locations.num-threads";
-  int     DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_NUM_THREADS_DEFAULT = 10;
-  String  DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS =
-      "dfs.client.file-block-storage-locations.timeout.millis";
-  int     DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS_DEFAULT = 1000;
   String  DFS_CLIENT_USE_LEGACY_BLOCKREADER =
       "dfs.client.use.legacy.blockreader";
   boolean DFS_CLIENT_USE_LEGACY_BLOCKREADER_DEFAULT = false;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9c32f878/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java
index 9424662..ad74aa1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java
@@ -1197,24 +1197,6 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
   @Deprecated
   public static final String  DFS_CLIENT_CONTEXT_DEFAULT =
       HdfsClientConfigKeys.DFS_CLIENT_CONTEXT_DEFAULT;
-  @Deprecated
-  public static final String
-      DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_NUM_THREADS =
-      HdfsClientConfigKeys.DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_NUM_THREADS;
-  @Deprecated
-  public static final int
-      DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_NUM_THREADS_DEFAULT =
-      HdfsClientConfigKeys
-          .DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_NUM_THREADS_DEFAULT;
-  @Deprecated
-  public static final String
-      DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS =
-      HdfsClientConfigKeys.DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS;
-  @Deprecated
-  public static final int
-      DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS_DEFAULT =
-      HdfsClientConfigKeys
-          .DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS_DEFAULT;
 
   @Deprecated
   public static final String  DFS_CLIENT_DATANODE_RESTART_TIMEOUT_KEY =

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9c32f878/hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json b/hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json
index 9d90deb..839f767 100644
--- a/hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json
+++ b/hadoop-tools/hadoop-sls/src/main/data/2jobs2min-rumen-jh.json
@@ -4701,7 +4701,6 @@
     "dfs.namenode.avoid.read.stale.datanode" : "false",
     "mapreduce.job.reduces" : "0",
     "mapreduce.map.sort.spill.percent" : "0.8",
-    "dfs.client.file-block-storage-locations.timeout" : "60",
     "dfs.datanode.drop.cache.behind.writes" : "false",
     "mapreduce.job.end-notification.retry.interval" : "1",
     "mapreduce.job.maps" : "96",
@@ -4800,7 +4799,6 @@
     "dfs.datanode.directoryscan.interval" : "21600",
     "yarn.resourcemanager.address" : "a2115.smile.com:8032",
     "yarn.nodemanager.health-checker.interval-ms" : "600000",
-    "dfs.client.file-block-storage-locations.num-threads" : "10",
     "yarn.resourcemanager.container-tokens.master-key-rolling-interval-secs" : "86400",
     "mapreduce.reduce.markreset.buffer.percent" : "0.0",
     "hadoop.security.group.mapping.ldap.directory.search.timeout" : "10000",
@@ -9806,7 +9804,6 @@
     "dfs.namenode.avoid.read.stale.datanode" : "false",
     "mapreduce.job.reduces" : "0",
     "mapreduce.map.sort.spill.percent" : "0.8",
-    "dfs.client.file-block-storage-locations.timeout" : "60",
     "dfs.datanode.drop.cache.behind.writes" : "false",
     "mapreduce.job.end-notification.retry.interval" : "1",
     "mapreduce.job.maps" : "96",
@@ -9905,7 +9902,6 @@
     "dfs.datanode.directoryscan.interval" : "21600",
     "yarn.resourcemanager.address" : "a2115.smile.com:8032",
     "yarn.nodemanager.health-checker.interval-ms" : "600000",
-    "dfs.client.file-block-storage-locations.num-threads" : "10",
     "yarn.resourcemanager.container-tokens.master-key-rolling-interval-secs" : "86400",
     "mapreduce.reduce.markreset.buffer.percent" : "0.0",
     "hadoop.security.group.mapping.ldap.directory.search.timeout" : "10000",
@@ -10412,7 +10408,6 @@
 "dfs.namenode.avoid.read.stale.datanode" : "false",
 "mapreduce.job.reduces" : "0",
 "mapreduce.map.sort.spill.percent" : "0.8",
-"dfs.client.file-block-storage-locations.timeout" : "60",
 "dfs.datanode.drop.cache.behind.writes" : "false",
 "mapreduce.job.end-notification.retry.interval" : "1",
 "mapreduce.job.maps" : "96",
@@ -10511,7 +10506,6 @@
 "dfs.datanode.directoryscan.interval" : "21600",
 "yarn.resourcemanager.address" : "a2115.smile.com:8032",
 "yarn.nodemanager.health-checker.interval-ms" : "600000",
-"dfs.client.file-block-storage-locations.num-threads" : "10",
 "yarn.resourcemanager.container-tokens.master-key-rolling-interval-secs" : "86400",
 "mapreduce.reduce.markreset.buffer.percent" : "0.0",
 "hadoop.security.group.mapping.ldap.directory.search.timeout" : "10000",


[03/20] hadoop git commit: HADOOP-12951. Improve documentation on KMS ACLs and delegation tokens. Contributed by Xiao Chen.

Posted by wa...@apache.org.
HADOOP-12951. Improve documentation on KMS ACLs and delegation tokens. Contributed by Xiao Chen.


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

Branch: refs/heads/YARN-3368
Commit: 594c70f779b277bd0b9d0a5dc98c3e9cc49b7e91
Parents: 9c32f87
Author: Andrew Wang <wa...@apache.org>
Authored: Thu Apr 7 23:50:27 2016 -0700
Committer: Andrew Wang <wa...@apache.org>
Committed: Thu Apr 7 23:50:27 2016 -0700

----------------------------------------------------------------------
 .../server/AuthenticationFilter.java            | 63 +-------------------
 .../util/ZKSignerSecretProvider.java            | 29 +--------
 .../src/site/markdown/Configuration.md          | 50 +++++++++-------
 .../hadoop-kms/src/site/markdown/index.md.vm    | 39 ++++++++----
 4 files changed, 60 insertions(+), 121 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/594c70f7/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
index 5c93fd3..0a9b8b5 100644
--- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
+++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java
@@ -40,85 +40,26 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
- * <p>The {@link AuthenticationFilter} enables protecting web application
+ * The {@link AuthenticationFilter} enables protecting web application
  * resources with different (pluggable)
  * authentication mechanisms and signer secret providers.
- * </p>
  * <p>
- * Out of the box it provides 2 authentication mechanisms: Pseudo and Kerberos SPNEGO.
- * </p>
  * Additional authentication mechanisms are supported via the {@link AuthenticationHandler} interface.
  * <p>
  * This filter delegates to the configured authentication handler for authentication and once it obtains an
  * {@link AuthenticationToken} from it, sets a signed HTTP cookie with the token. For client requests
  * that provide the signed HTTP cookie, it verifies the validity of the cookie, extracts the user information
  * and lets the request proceed to the target resource.
- * </p>
- * The supported configuration properties are:
- * <ul>
- * <li>config.prefix: indicates the prefix to be used by all other configuration properties, the default value
- * is no prefix. See below for details on how/why this prefix is used.</li>
- * <li>[#PREFIX#.]type: simple|kerberos|#CLASS#, 'simple' is short for the
- * {@link PseudoAuthenticationHandler}, 'kerberos' is short for {@link KerberosAuthenticationHandler}, otherwise
- * the full class name of the {@link AuthenticationHandler} must be specified.</li>
- * <li>[#PREFIX#.]signature.secret.file: when signer.secret.provider is set to
- * "file" or not specified, this is the location of file including the secret
- *  used to sign the HTTP cookie.</li>
- * <li>[#PREFIX#.]token.validity: time -in seconds- that the generated token is
- * valid before a new authentication is triggered, default value is
- * <code>3600</code> seconds. This is also used for the rollover interval for
- * the "random" and "zookeeper" SignerSecretProviders.</li>
- * <li>[#PREFIX#.]cookie.domain: domain to use for the HTTP cookie that stores the authentication token.</li>
- * <li>[#PREFIX#.]cookie.path: path to use for the HTTP cookie that stores the authentication token.</li>
- * </ul>
  * <p>
  * The rest of the configuration properties are specific to the {@link AuthenticationHandler} implementation and the
  * {@link AuthenticationFilter} will take all the properties that start with the prefix #PREFIX#, it will remove
  * the prefix from it and it will pass them to the the authentication handler for initialization. Properties that do
  * not start with the prefix will not be passed to the authentication handler initialization.
- * </p>
  * <p>
- * Out of the box it provides 3 signer secret provider implementations:
- * "file", "random" and "zookeeper"
- * </p>
- * Additional signer secret providers are supported via the
- * {@link SignerSecretProvider} class.
- * <p>
- * For the HTTP cookies mentioned above, the SignerSecretProvider is used to
- * determine the secret to use for signing the cookies. Different
- * implementations can have different behaviors. The "file" implementation
- * loads the secret from a specified file. The "random" implementation uses a
- * randomly generated secret that rolls over at the interval specified by the
- * [#PREFIX#.]token.validity mentioned above.  The "zookeeper" implementation
- * is like the "random" one, except that it synchronizes the random secret
- * and rollovers between multiple servers; it's meant for HA services.
- * </p>
- * The relevant configuration properties are:
- * <ul>
- * <li>signer.secret.provider: indicates the name of the SignerSecretProvider
- * class to use. Possible values are: "file", "random", "zookeeper", or a
- * classname. If not specified, the "file" implementation will be used with
- * [#PREFIX#.]signature.secret.file; and if that's not specified, the "random"
- * implementation will be used.</li>
- * <li>[#PREFIX#.]signature.secret.file: When the "file" implementation is
- * specified, this content of this file is used as the secret.</li>
- * <li>[#PREFIX#.]token.validity: When the "random" or "zookeeper"
- * implementations are specified, this value is used as the rollover
- * interval.</li>
- * </ul>
+ * Details of the configurations are listed on <a href="../../../../../../../Configuration.html">Configuration Page</a>
  * <p>
  * The "zookeeper" implementation has additional configuration properties that
  * must be specified; see {@link ZKSignerSecretProvider} for details.
- * </p>
- * For subclasses of AuthenticationFilter that want additional control over the
- * SignerSecretProvider, they can use the following attribute set in the
- * ServletContext:
- * <ul>
- * <li>signer.secret.provider.object: A SignerSecretProvider implementation can
- * be passed here that will be used instead of the signer.secret.provider
- * configuration property. Note that the class should already be
- * initialized.</li>
- * </ul>
  */
 
 @InterfaceAudience.Private

http://git-wip-us.apache.org/repos/asf/hadoop/blob/594c70f7/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
index 5e5f087..0e75cbd 100644
--- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
+++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.java
@@ -57,34 +57,7 @@ import org.slf4j.LoggerFactory;
  * {@link org.apache.hadoop.security.authentication.server.AuthenticationFilter}
  * for more details.
  * <p>
- * The supported configuration properties are:
- * <ul>
- * <li>signer.secret.provider.zookeeper.connection.string: indicates the
- * ZooKeeper connection string to connect with.</li>
- * <li>signer.secret.provider.zookeeper.path: indicates the ZooKeeper path
- * to use for storing and retrieving the secrets.  All ZKSignerSecretProviders
- * that need to coordinate should point to the same path.</li>
- * <li>signer.secret.provider.zookeeper.auth.type: indicates the auth type to
- * use.  Supported values are "none" and "sasl".  The default value is "none"
- * </li>
- * <li>signer.secret.provider.zookeeper.kerberos.keytab: set this to the path
- * with the Kerberos keytab file.  This is only required if using Kerberos.</li>
- * <li>signer.secret.provider.zookeeper.kerberos.principal: set this to the
- * Kerberos principal to use.  This only required if using Kerberos.</li>
- * <li>signer.secret.provider.zookeeper.disconnect.on.close: when set to "true",
- * ZKSignerSecretProvider will close the ZooKeeper connection on shutdown.  The
- * default is "true". Only set this to "false" if a custom Curator client is
- * being provided and the disconnection is being handled elsewhere.</li>
- * </ul>
- *
- * The following attribute in the ServletContext can also be set if desired:
- * <ul>
- * <li>signer.secret.provider.zookeeper.curator.client: A CuratorFramework
- * client object can be passed here. If given, the "zookeeper" implementation
- * will use this Curator client instead of creating its own, which is useful if
- * you already have a Curator client or want more control over its
- * configuration.</li>
- * </ul>
+ * Details of the configurations are listed on <a href="../../../../../../../Configuration.html">Configuration Page</a>
  */
 @InterfaceStability.Unstable
 @InterfaceAudience.Private

http://git-wip-us.apache.org/repos/asf/hadoop/blob/594c70f7/hadoop-common-project/hadoop-auth/src/site/markdown/Configuration.md
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-auth/src/site/markdown/Configuration.md b/hadoop-common-project/hadoop-auth/src/site/markdown/Configuration.md
index 2f9b860..2a1f73b 100644
--- a/hadoop-common-project/hadoop-auth/src/site/markdown/Configuration.md
+++ b/hadoop-common-project/hadoop-auth/src/site/markdown/Configuration.md
@@ -34,12 +34,11 @@ Hadoop Auth uses SLF4J-API for logging. Auth Maven POM dependencies define the S
 *   `[PREFIX.]type`: the authentication type keyword (`simple` or \
     `kerberos`) or a Authentication handler implementation.
 
-*   `[PREFIX.]signature.secret`: When `signer.secret.provider` is set to
-    `string` or not specified, this is the value for the secret used to sign
-    the HTTP cookie.
+*   `[PREFIX.]signature.secret.file`: When `signer.secret.provider` is set to
+    `file`, this is the location of file including the secret used to sign the HTTP cookie.
 
 *   `[PREFIX.]token.validity`: The validity -in seconds- of the generated
-    authentication token. The default value is `3600` seconds. This is also
+    authentication token. The default value is `36000` seconds. This is also
     used for the rollover interval when `signer.secret.provider` is set to
     `random` or `zookeeper`.
 
@@ -50,10 +49,11 @@ Hadoop Auth uses SLF4J-API for logging. Auth Maven POM dependencies define the S
     authentication token.
 
 *   `signer.secret.provider`: indicates the name of the SignerSecretProvider
-    class to use. Possible values are: `string`, `random`,
-    `zookeeper`, or a classname. If not specified, the `string`
+    class to use. Possible values are: `file`, `random`,
+    `zookeeper`, or a classname. If not specified, the `file`
     implementation will be used; and failing that, the `random`
-    implementation will be used.
+    implementation will be used. If "file" is to be used, one need to specify
+    `signature.secret.file` and point to the secret file.
 
 ### Kerberos Configuration
 
@@ -232,24 +232,25 @@ The SignerSecretProvider is used to provide more advanced behaviors for the secr
 These are the relevant configuration properties:
 
 *   `signer.secret.provider`: indicates the name of the
-    SignerSecretProvider class to use. Possible values are: "string",
-    "random", "zookeeper", or a classname. If not specified, the "string"
+    SignerSecretProvider class to use. Possible values are: "file",
+    "random", "zookeeper", or a classname. If not specified, the "file"
     implementation will be used; and failing that, the "random" implementation
-    will be used.
+    will be used. If "file" is to be used, one need to specify `signature.secret.file`
+    and point to the secret file.
 
-*   `[PREFIX.]signature.secret`: When `signer.secret.provider` is set
-    to `string` or not specified, this is the value for the secret used to
+*   `[PREFIX.]signature.secret.file`: When `signer.secret.provider` is set
+    to `file` or not specified, this is the value for the secret used to
     sign the HTTP cookie.
 
 *   `[PREFIX.]token.validity`: The validity -in seconds- of the generated
-    authentication token. The default value is `3600` seconds. This is
+    authentication token. The default value is `36000` seconds. This is
     also used for the rollover interval when `signer.secret.provider` is
     set to `random` or `zookeeper`.
 
 The following configuration properties are specific to the `zookeeper` implementation:
 
 *   `signer.secret.provider.zookeeper.connection.string`: Indicates the
-    ZooKeeper connection string to connect with.
+    ZooKeeper connection string to connect with. The default value is `localhost:2181`
 
 *   `signer.secret.provider.zookeeper.path`: Indicates the ZooKeeper path
     to use for storing and retrieving the secrets. All servers
@@ -266,6 +267,17 @@ The following configuration properties are specific to the `zookeeper` implement
 *   `signer.secret.provider.zookeeper.kerberos.principal`: Set this to the
     Kerberos principal to use. This only required if using Kerberos.
 
+*   `signer.secret.provider.zookeeper.disconnect.on.shutdown`: Whether to close the
+    ZooKeeper connection when the provider is shutdown. The default value is `true`.
+    Only set this to `false` if a custom Curator client is being provided and
+    the disconnection is being handled elsewhere.
+
+The following attribute in the ServletContext can also be set if desired:
+*   `signer.secret.provider.zookeeper.curator.client`: A CuratorFramework client
+    object can be passed here. If given, the "zookeeper" implementation will use
+    this Curator client instead of creating its own, which is useful if you already
+    have a Curator client or want more control over its configuration.
+
 **Example**:
 
 ```xml
@@ -276,11 +288,11 @@ The following configuration properties are specific to the `zookeeper` implement
             <!-- AuthenticationHandler configs not shown -->
             <init-param>
                 <param-name>signer.secret.provider</param-name>
-                <param-value>string</param-value>
+                <param-value>file</param-value>
             </init-param>
             <init-param>
-                <param-name>signature.secret</param-name>
-                <param-value>my_secret</param-value>
+                <param-name>signature.secret.file</param-name>
+                <param-value>/myapp/secret_file</param-value>
             </init-param>
         </filter>
 
@@ -335,10 +347,6 @@ The following configuration properties are specific to the `zookeeper` implement
                 <param-value>/myapp/secrets</param-value>
             </init-param>
             <init-param>
-                <param-name>signer.secret.provider.zookeeper.use.kerberos.acls</param-name>
-                <param-value>true</param-value>
-            </init-param>
-            <init-param>
                 <param-name>signer.secret.provider.zookeeper.kerberos.keytab</param-name>
                 <param-value>/tmp/auth.keytab</param-value>
             </init-param>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/594c70f7/hadoop-common-project/hadoop-kms/src/site/markdown/index.md.vm
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-kms/src/site/markdown/index.md.vm b/hadoop-common-project/hadoop-kms/src/site/markdown/index.md.vm
index 1472ba2..65854cf 100644
--- a/hadoop-common-project/hadoop-kms/src/site/markdown/index.md.vm
+++ b/hadoop-common-project/hadoop-kms/src/site/markdown/index.md.vm
@@ -284,7 +284,15 @@ The answer to "What is your first and last name?" (i.e. "CN") must be the hostna
 
 NOTE: You need to restart the KMS for the configuration changes to take effect.
 
-$H4 KMS Access Control
+$H4 ACLs (Access Control Lists)
+
+KMS supports ACLs (Access Control Lists) for fine-grained permission control.
+
+Two levels of ACLs exist in KMS: KMS ACLs and Key ACLs. KMS ACLs control access at KMS operation level, and precede Key ACLs. In particular, only if permission is granted at KMS ACLs level, shall the permission check against Key ACLs be performed.
+
+The configuration and usage of KMS ACLs and Key ACLs are described in the sections below.
+
+$H5 KMS ACLs
 
 KMS ACLs configuration are defined in the KMS `etc/hadoop/kms-acls.xml` configuration file. This file is hot-reloaded when it changes.
 
@@ -452,7 +460,7 @@ A user accessing KMS is first checked for inclusion in the Access Control List f
 </configuration>
 ```
 
-$H4 Key Access Control
+$H5 Key ACLs
 
 KMS supports access control for all non-read operations at the Key level. All Key Access operations are classified as :
 
@@ -466,9 +474,9 @@ These can be defined in the KMS `etc/hadoop/kms-acls.xml` as follows
 
 For all keys for which a key access has not been explicitly configured, It is possible to configure a default key access control for a subset of the operation types.
 
-It is also possible to configure a "whitelist" key ACL for a subset of the operation types. The whitelist key ACL is a whitelist in addition to the explicit or default per-key ACL. That is, if no per-key ACL is explicitly set, a user will be granted access if they are present in the default per-key ACL or the whitelist key ACL. If a per-key ACL is explicitly set, a user will be granted access if they are present in the per-key ACL or the whitelist key ACL.
+It is also possible to configure a "whitelist" key ACL for a subset of the operation types. The whitelist key ACL grants access to the key, in addition to the explicit or default per-key ACL. That is, if no per-key ACL is explicitly set, a user will be granted access if they are present in the default per-key ACL or the whitelist key ACL. If a per-key ACL is explicitly set, a user will be granted access if they are present in the per-key ACL or the whitelist key ACL.
 
-If no ACL is configured for a specific key AND no default ACL is configured AND no root key ACL is configured for the requested operation, then access will be DENIED.
+If no ACL is configured for a specific key AND no default ACL is configured AND no whitelist key ACL is configured for the requested operation, then access will be DENIED.
 
 **NOTE:** The default and whitelist key ACL does not support `ALL` operation qualifier.
 
@@ -575,7 +583,11 @@ If no ACL is configured for a specific key AND no default ACL is configured AND
 
 $H3 KMS Delegation Token Configuration
 
-KMS delegation token secret manager can be configured with the following properties:
+KMS supports delegation tokens to authenticate to the key providers from processes without Kerberos credentials.
+
+KMS delegation token authentication extends the default Hadoop authentication. See [Hadoop Auth](../hadoop-auth/index.html) page for more details.
+
+Additionally, KMS delegation token secret manager can be configured with the following properties:
 
 ```xml
   <property>
@@ -590,7 +602,7 @@ KMS delegation token secret manager can be configured with the following propert
     <name>hadoop.kms.authentication.delegation-token.max-lifetime.sec</name>
     <value>604800</value>
     <description>
-      Maximum lifetime of a delagation token, in seconds. Default value 7 days.
+      Maximum lifetime of a delegation token, in seconds. Default value 7 days.
     </description>
   </property>
 
@@ -598,7 +610,7 @@ KMS delegation token secret manager can be configured with the following propert
     <name>hadoop.kms.authentication.delegation-token.renew-interval.sec</name>
     <value>86400</value>
     <description>
-      Renewal interval of a delagation token, in seconds. Default value 1 day.
+      Renewal interval of a delegation token, in seconds. Default value 1 day.
     </description>
   </property>
 
@@ -640,7 +652,7 @@ $H4 HTTP Authentication Signature
 
 KMS uses Hadoop Authentication for HTTP authentication. Hadoop Authentication issues a signed HTTP Cookie once the client has authenticated successfully. This HTTP Cookie has an expiration time, after which it will trigger a new authentication sequence. This is done to avoid triggering the authentication on every HTTP request of a client.
 
-A KMS instance must verify the HTTP Cookie signatures signed by other KMS instances. To do this all KMS instances must share the signing secret.
+A KMS instance must verify the HTTP Cookie signatures signed by other KMS instances. To do this, all KMS instances must share the signing secret. Please see [SignerSecretProvider Configuration](../hadoop-auth/Configuration.html#SignerSecretProvider_Configuration) for detailed description and configuration examples. Note that KMS configurations need to be prefixed with `hadoop.kms.authentication`, as shown in the example below.
 
 This secret sharing can be done using a Zookeeper service which is configured in KMS with the following properties in the `kms-site.xml`:
 
@@ -650,8 +662,9 @@ This secret sharing can be done using a Zookeeper service which is configured in
     <value>zookeeper</value>
     <description>
       Indicates how the secret to sign the authentication cookies will be
-      stored. Options are 'random' (default), 'string' and 'zookeeper'.
+      stored. Options are 'random' (default), 'file' and 'zookeeper'.
       If using a setup with multiple KMS instances, 'zookeeper' should be used.
+      If using file, signature.secret.file should be configured and point to the secret file.
     </description>
   </property>
   <property>
@@ -659,7 +672,7 @@ This secret sharing can be done using a Zookeeper service which is configured in
     <value>/hadoop-kms/hadoop-auth-signature-secret</value>
     <description>
       The Zookeeper ZNode path where the KMS instances will store and retrieve
-      the secret from.
+      the secret from. All KMS instances that need to coordinate should point to the same path.
     </description>
   </property>
   <property>
@@ -696,7 +709,11 @@ This secret sharing can be done using a Zookeeper service which is configured in
 
 $H4 Delegation Tokens
 
-TBD
+Similar to HTTP authentication, KMS uses Hadoop Authentication for delegation tokens too.
+
+Under HA, A KMS instance must verify the delegation token given by another KMS instance, by checking the shared secret used to sign the delegation token. To do this, all KMS instances must be able to retrieve the shared secret from ZooKeeper.
+
+Please see the examples given in HTTP Authentication section to configure ZooKeeper for secret sharing.
 
 $H3 KMS HTTP REST API