You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2016/05/10 13:42:05 UTC

tez git commit: TEZ-3086. Tez UI: Backward compatibility changes (sree)

Repository: tez
Updated Branches:
  refs/heads/master eceb7acf5 -> 50ea2ded9


TEZ-3086. Tez UI: Backward compatibility changes (sree)


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

Branch: refs/heads/master
Commit: 50ea2ded921315fb6bc0ac6aef3df95987bc1b30
Parents: eceb7ac
Author: Sreenath Somarajapuram <sr...@apache.org>
Authored: Tue May 10 19:09:42 2016 +0530
Committer: Sreenath Somarajapuram <sr...@apache.org>
Committed: Tue May 10 19:09:42 2016 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 tez-ui/src/main/webapp/app/adapters/dag-am.js   | 12 +++++
 .../src/main/webapp/app/adapters/hive-query.js  | 22 ++++++++
 .../src/main/webapp/app/adapters/vertex-am.js   | 12 +++++
 tez-ui/src/main/webapp/app/entities/dag.js      | 39 ++++++++++++++
 tez-ui/src/main/webapp/app/models/dag.js        |  4 +-
 tez-ui/src/main/webapp/app/models/hive-query.js | 25 +++++++++
 tez-ui/src/main/webapp/app/models/vertex.js     |  3 +-
 .../src/main/webapp/app/serializers/dag-am.js   |  2 +-
 tez-ui/src/main/webapp/app/serializers/dag.js   |  9 +++-
 .../main/webapp/app/serializers/hive-query.js   | 44 ++++++++++++++++
 .../main/webapp/app/serializers/vertex-am.js    | 13 +++--
 .../src/main/webapp/app/templates/dag/index.hbs |  4 +-
 tez-ui/src/main/webapp/bower.json               |  2 +-
 .../src/main/webapp/config/default-app-conf.js  |  4 +-
 tez-ui/src/main/webapp/package.json             |  2 +-
 .../webapp/tests/unit/adapters/dag-am-test.js   |  2 +
 .../tests/unit/adapters/hive-query-test.js      | 29 +++++++++++
 .../tests/unit/adapters/vertex-am-test.js       |  2 +
 .../main/webapp/tests/unit/entities/am-test.js  | 10 ++--
 .../tests/unit/entities/attempt-am-test.js      |  6 +--
 .../main/webapp/tests/unit/entities/dag-test.js | 29 +++++++++++
 .../webapp/tests/unit/entities/entity-test.js   | 54 ++++++++++----------
 .../webapp/tests/unit/entities/task-am-test.js  |  6 +--
 .../tests/unit/entities/vertex-am-test.js       |  6 +--
 .../webapp/tests/unit/models/hive-query-test.js | 29 +++++++++++
 .../tests/unit/serializers/hive-query-test.js   | 29 +++++++++++
 .../tests/unit/serializers/vertex-am-test.js    |  2 +-
 28 files changed, 347 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 39e53d9..cd7f4ce 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -23,6 +23,7 @@ ALL CHANGES:
   TEZ-3146. Tez UI 2: CSS & JS assets in the UI must be minified
   TEZ-3227. Tez UI: Replace UI1 with UI2
   TEZ-3233. Tez UI: Have LLAP information reflect in Tez UI
+  TEZ-3086. Tez UI: Backward compatibility changes
 
 Release 0.8.4: Unreleased
 

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/adapters/dag-am.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/adapters/dag-am.js b/tez-ui/src/main/webapp/app/adapters/dag-am.js
index 39cd2a4..f6010a9 100644
--- a/tez-ui/src/main/webapp/app/adapters/dag-am.js
+++ b/tez-ui/src/main/webapp/app/adapters/dag-am.js
@@ -1,3 +1,4 @@
+/*global more*/
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,7 +17,18 @@
  * limitations under the License.
  */
 
+var MoreString = more.String;
+
 import AMAdapter from './am';
 
 export default AMAdapter.extend({
+
+  buildURL: function(modelName, id, snapshot, requestType, query, params) {
+    var url = this._super(modelName, id, snapshot, requestType, query);
+    if(params.version === "1") {
+      url = url.replace("dagInfo", "dagProgress");
+    }
+    return params ? MoreString.fmt(url, params) : url;
+  },
+
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/adapters/hive-query.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/adapters/hive-query.js b/tez-ui/src/main/webapp/app/adapters/hive-query.js
new file mode 100644
index 0000000..b47e05f
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/adapters/hive-query.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 TimelineAdapter from './timeline';
+
+export default TimelineAdapter.extend({
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/adapters/vertex-am.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/adapters/vertex-am.js b/tez-ui/src/main/webapp/app/adapters/vertex-am.js
index 39cd2a4..334acd7 100644
--- a/tez-ui/src/main/webapp/app/adapters/vertex-am.js
+++ b/tez-ui/src/main/webapp/app/adapters/vertex-am.js
@@ -1,3 +1,4 @@
+/*global more*/
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,7 +17,18 @@
  * limitations under the License.
  */
 
+var MoreString = more.String;
+
 import AMAdapter from './am';
 
 export default AMAdapter.extend({
+
+  buildURL: function(modelName, id, snapshot, requestType, query, params) {
+    var url = this._super(modelName, id, snapshot, requestType, query);
+    if(params.version === "1") {
+      url = url.replace("verticesInfo", "vertexProgresses");
+    }
+    return params ? MoreString.fmt(url, params) : url;
+  },
+
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/entities/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/entities/dag.js b/tez-ui/src/main/webapp/app/entities/dag.js
new file mode 100644
index 0000000..80862b7
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/entities/dag.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 Entity from './entity';
+
+export default Entity.extend({
+  queryRecord: function (loader, id, options, query, urlParams) {
+    return this._super(loader, id, options, query, urlParams).then(function (dag) {
+      if(!dag.get("callerInfo")) {
+        var dagName = dag.get("name") || "",
+            hiveQueryID = dagName.substr(0, dagName.indexOf(":"));
+        if(hiveQueryID && dagName !== hiveQueryID) {
+          loader.queryRecord("hive-query", hiveQueryID, options, query, urlParams).then(function (hive) {
+            dag.setProperties({
+              callerType: "Hive",
+              callerInfo: hive.get("queryText")
+            });
+          });
+        }
+      }
+      return dag;
+    });
+  }
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/models/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/models/dag.js b/tez-ui/src/main/webapp/app/models/dag.js
index 8e7b523..fc7cacd 100644
--- a/tez-ui/src/main/webapp/app/models/dag.js
+++ b/tez-ui/src/main/webapp/app/models/dag.js
@@ -35,7 +35,8 @@ export default AMTimelineModel.extend({
       },
       urlParams: function (model) {
         return {
-          app_id: model.get("appID")
+          app_id: model.get("appID"),
+          version: model.get("amWsVersion") || "1"
         };
       }
     },
@@ -67,4 +68,5 @@ export default AMTimelineModel.extend({
   callerType: DS.attr("string"),
   callerInfo: DS.attr("string"),
 
+  amWsVersion: DS.attr("string"),
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/models/hive-query.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/models/hive-query.js b/tez-ui/src/main/webapp/app/models/hive-query.js
new file mode 100644
index 0000000..d4e6719
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/models/hive-query.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';
+
+import AbstractModel from './abstract';
+
+export default AbstractModel.extend({
+  queryText: DS.attr("string"),
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/models/vertex.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/models/vertex.js b/tez-ui/src/main/webapp/app/models/vertex.js
index a195892..f0d9cca 100644
--- a/tez-ui/src/main/webapp/app/models/vertex.js
+++ b/tez-ui/src/main/webapp/app/models/vertex.js
@@ -51,7 +51,8 @@ export default AMTimelineModel.extend({
       },
       urlParams: function (model) {
         return {
-          app_id: model.get("appID")
+          app_id: model.get("appID"),
+          version: model.get("dag.amWsVersion") || "1"
         };
       }
     }

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/serializers/dag-am.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/serializers/dag-am.js b/tez-ui/src/main/webapp/app/serializers/dag-am.js
index 510d6f1..8f1e51d 100644
--- a/tez-ui/src/main/webapp/app/serializers/dag-am.js
+++ b/tez-ui/src/main/webapp/app/serializers/dag-am.js
@@ -20,7 +20,7 @@ import AMSerializer from './am';
 
 export default AMSerializer.extend({
   extractSinglePayload: function (rawPayload) {
-    return rawPayload.dag;
+    return rawPayload.dag || rawPayload.dagProgress;
   },
   extractArrayPayload: function(rawPayload) {
     return rawPayload.dag;

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/serializers/dag.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/serializers/dag.js b/tez-ui/src/main/webapp/app/serializers/dag.js
index b5cc42c..39832b2 100644
--- a/tez-ui/src/main/webapp/app/serializers/dag.js
+++ b/tez-ui/src/main/webapp/app/serializers/dag.js
@@ -129,11 +129,14 @@ export default TimelineSerializer.extend({
     callerID: 'primaryfilters.callerId.0',
     callerType: 'callerType',
     callerInfo: 'callerInfo',
+
+    amWsVersion: 'otherinfo.amWebServiceVersion',
   },
 
   extractAttributes: function (modelClass, resourceHash) {
     var data = resourceHash.data,
-        dagInfo = Ember.get(resourceHash, "data.otherinfo.dagPlan.dagInfo");
+        dagInfo = Ember.get(resourceHash, "data.otherinfo.dagPlan.dagInfo"), // New style, from TEZ-2851
+        dagContext = Ember.get(resourceHash, "data.otherinfo.dagPlan.dagContext"); // Old style
 
     if(dagInfo) {
       let infoObj = {};
@@ -144,6 +147,10 @@ export default TimelineSerializer.extend({
       data.callerType = Ember.get(infoObj, "context");
       data.callerInfo = Ember.get(infoObj, "description") || Ember.get(dagInfo, "blob") || dagInfo;
     }
+    else if(dagContext) {
+      data.callerType = Ember.String.classify((Ember.get(dagContext, "context")||"").toLowerCase());
+      data.callerInfo = Ember.get(dagContext, "description");
+    }
 
     return this._super(modelClass, resourceHash);
   },

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/serializers/hive-query.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/serializers/hive-query.js b/tez-ui/src/main/webapp/app/serializers/hive-query.js
new file mode 100644
index 0000000..b40bab8
--- /dev/null
+++ b/tez-ui/src/main/webapp/app/serializers/hive-query.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 Ember from 'ember';
+
+import TimelineSerializer from './timeline';
+
+export default TimelineSerializer.extend({
+  maps: {
+    queryText: 'queryText',
+  },
+
+  extractAttributes: function (modelClass, resourceHash) {
+    var data = resourceHash.data,
+        query = Ember.get(resourceHash, "data.otherinfo.QUERY");
+
+    if(query) {
+      let queryObj = {};
+      try{
+        queryObj = JSON.parse(query);
+      }catch(e){}
+
+      data.queryText = Ember.get(queryObj, "queryText");
+    }
+
+    return this._super(modelClass, resourceHash);
+  },
+
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/serializers/vertex-am.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/serializers/vertex-am.js b/tez-ui/src/main/webapp/app/serializers/vertex-am.js
index 3cf7a7e..b43451a 100644
--- a/tez-ui/src/main/webapp/app/serializers/vertex-am.js
+++ b/tez-ui/src/main/webapp/app/serializers/vertex-am.js
@@ -19,8 +19,6 @@
 import AMSerializer from './am';
 
 export default AMSerializer.extend({
-  payloadNamespace: "vertices",
-
   maps: {
     succeededTasks: "succeededTasks",
     runningTasks: "runningTasks",
@@ -32,5 +30,14 @@ export default AMSerializer.extend({
     endTime: "finishTime",
     firstTaskStartTime: "firstTaskStartTime",
     lastTaskFinishTime: "lastTaskFinishTime",
-  }
+  },
+
+  extractSinglePayload: function(rawPayload) {
+    return (rawPayload.vertices || rawPayload.vertexProgresses)[0];
+  },
+
+  extractArrayPayload: function(rawPayload) {
+    return rawPayload.vertices || rawPayload.vertexProgresses;
+  },
+
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/app/templates/dag/index.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dag/index.hbs b/tez-ui/src/main/webapp/app/templates/dag/index.hbs
index 9bc6a80..baba162 100644
--- a/tez-ui/src/main/webapp/app/templates/dag/index.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dag/index.hbs
@@ -78,6 +78,8 @@
     </tbody>
   </table>
 
+  {{outlet}}
+
   {{#if model.callerInfo}}
     {{caller-info type=model.callerType info=model.callerInfo}}
   {{/if}}
@@ -93,8 +95,6 @@
     </div>
   {{/if}}
 
-  {{outlet}}
-
 {{else}}
   {{partial "loading"}}
 {{/if}}

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/bower.json
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/bower.json b/tez-ui/src/main/webapp/bower.json
index 4b0d01b..da1fc5c 100644
--- a/tez-ui/src/main/webapp/bower.json
+++ b/tez-ui/src/main/webapp/bower.json
@@ -10,7 +10,7 @@
     "ember-qunit-notifications": "0.1.0",
     "loader.js": "3.3.0",
     "qunit": "1.19.0",
-    "more-js": "0.8.2",
+    "more-js": "0.8.6",
     "bootstrap": "3.3.6",
     "font-awesome": "4.5.0",
     "jquery": "2.1.4",

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/config/default-app-conf.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/config/default-app-conf.js b/tez-ui/src/main/webapp/config/default-app-conf.js
index c53e4d7..1e38024 100644
--- a/tez-ui/src/main/webapp/config/default-app-conf.js
+++ b/tez-ui/src/main/webapp/config/default-app-conf.js
@@ -33,7 +33,7 @@ module.exports = { // Tez App configurations
       timeline: 'ws/v1/timeline',
       appHistory: 'ws/v1/applicationhistory',
       rm: 'ws/v1/cluster',
-      am: 'proxy/{app_id}/ws/v2/tez',
+      am: 'proxy/{app_id}/ws/v{version:2}/tez',
     },
     web: {
       rm: 'cluster'
@@ -46,7 +46,7 @@ module.exports = { // Tez App configurations
       task: 'TEZ_TASK_ID',
       attempt: 'TEZ_TASK_ATTEMPT_ID',
 
-      hiveQuery: 'HIVE_QUERY_ID',
+      "hive-query": 'HIVE_QUERY_ID',
 
       app: 'TEZ_APPLICATION'
     },

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/package.json b/tez-ui/src/main/webapp/package.json
index 018c088..accddec 100644
--- a/tez-ui/src/main/webapp/package.json
+++ b/tez-ui/src/main/webapp/package.json
@@ -58,6 +58,6 @@
   "dependencies": {
     "em-helpers": "0.5.8",
     "em-table": "0.3.12",
-    "em-tgraph": "0.0.4"
+    "em-tgraph": "0.0.5"
   }
 }

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/adapters/dag-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/adapters/dag-am-test.js b/tez-ui/src/main/webapp/tests/unit/adapters/dag-am-test.js
index b0d3fa9..01b561e 100644
--- a/tez-ui/src/main/webapp/tests/unit/adapters/dag-am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/adapters/dag-am-test.js
@@ -25,5 +25,7 @@ moduleFor('adapter:dag-am', 'Unit | Adapter | dag am', {
 
 test('Basic creation test', function(assert) {
   let adapter = this.subject();
+
   assert.ok(adapter);
+  assert.ok(adapter.buildURL);
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/adapters/hive-query-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/adapters/hive-query-test.js b/tez-ui/src/main/webapp/tests/unit/adapters/hive-query-test.js
new file mode 100644
index 0000000..100adff
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/adapters/hive-query-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('adapter:hive-query', 'Unit | Adapter | hive query', {
+  // Specify the other units that are required for this test.
+  // needs: ['serializer:foo']
+});
+
+test('Basic creation test', function(assert) {
+  let adapter = this.subject();
+  assert.ok(adapter);
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/adapters/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/adapters/vertex-am-test.js b/tez-ui/src/main/webapp/tests/unit/adapters/vertex-am-test.js
index 6e29aef..c956330 100644
--- a/tez-ui/src/main/webapp/tests/unit/adapters/vertex-am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/adapters/vertex-am-test.js
@@ -25,5 +25,7 @@ moduleFor('adapter:vertex-am', 'Unit | Adapter | vertex am', {
 
 test('Basic creation test', function(assert) {
   let adapter = this.subject();
+
   assert.ok(adapter);
+  assert.ok(adapter.buildURL);
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/entities/am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/entities/am-test.js b/tez-ui/src/main/webapp/tests/unit/entities/am-test.js
index b48eea5..7dd2fb5 100644
--- a/tez-ui/src/main/webapp/tests/unit/entities/am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/entities/am-test.js
@@ -24,10 +24,10 @@ moduleFor('entitie:am', 'Unit | Entity | am', {
 });
 
 test('Basic creation test', function(assert) {
-  let adapter = this.subject();
+  let entity = this.subject();
 
-  assert.ok(adapter);
-  assert.ok(adapter.resetJoiner);
-  assert.ok(adapter.queryRecord);
-  assert.ok(adapter.queryJoinedRecords);
+  assert.ok(entity);
+  assert.ok(entity.resetJoiner);
+  assert.ok(entity.queryRecord);
+  assert.ok(entity.queryJoinedRecords);
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/entities/attempt-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/entities/attempt-am-test.js b/tez-ui/src/main/webapp/tests/unit/entities/attempt-am-test.js
index 2856ec5..9fd750d 100644
--- a/tez-ui/src/main/webapp/tests/unit/entities/attempt-am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/entities/attempt-am-test.js
@@ -24,8 +24,8 @@ moduleFor('entitie:attempt-am', 'Unit | Entity | attempt am', {
 });
 
 test('Basic creation test', function(assert) {
-  let adapter = this.subject();
+  let entity = this.subject();
 
-  assert.ok(adapter);
-  assert.ok(adapter.queryPropertyToJoin);
+  assert.ok(entity);
+  assert.ok(entity.queryPropertyToJoin);
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/entities/dag-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/entities/dag-test.js b/tez-ui/src/main/webapp/tests/unit/entities/dag-test.js
new file mode 100644
index 0000000..5410ae2
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/entities/dag-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('entitie:dag', 'Unit | Entity | dag', {
+  // Specify the other units that are required for this test.
+  // needs: ['entitie:foo']
+});
+
+test('Basic creation test', function(assert) {
+  let entity = this.subject();
+  assert.ok(entity);
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/entities/entity-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/entities/entity-test.js b/tez-ui/src/main/webapp/tests/unit/entities/entity-test.js
index 3e1da55..5bc0116 100644
--- a/tez-ui/src/main/webapp/tests/unit/entities/entity-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/entities/entity-test.js
@@ -26,47 +26,47 @@ moduleFor('entitie:entity', 'Unit | Entity | entity', {
 });
 
 test('Basic creation test', function(assert) {
-  let adapter = this.subject();
+  let entity = this.subject();
 
-  assert.ok(adapter);
+  assert.ok(entity);
 
-  assert.ok(adapter.queryRecord);
-  assert.ok(adapter.query);
+  assert.ok(entity.queryRecord);
+  assert.ok(entity.query);
 
-  assert.ok(adapter.normalizeNeed);
-  assert.ok(adapter._loadNeed);
-  assert.ok(adapter.loadNeed);
+  assert.ok(entity.normalizeNeed);
+  assert.ok(entity._loadNeed);
+  assert.ok(entity.loadNeed);
 
-  assert.ok(adapter._loadAllNeeds);
-  assert.ok(adapter.loadAllNeeds);
+  assert.ok(entity._loadAllNeeds);
+  assert.ok(entity.loadAllNeeds);
 });
 
 test('normalizeNeed test', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       expectedProperties = ["name", "type", "idKey", "silent"];
 
-  assert.deepEqual(adapter.normalizeNeed("app", "appKey").getProperties(expectedProperties), {
+  assert.deepEqual(entity.normalizeNeed("app", "appKey").getProperties(expectedProperties), {
     name: "app",
     type: "app",
     idKey: "appKey",
     silent: false
   }, "Test 1");
 
-  assert.deepEqual(adapter.normalizeNeed( "app", { idKey: "appKey" }).getProperties(expectedProperties), {
+  assert.deepEqual(entity.normalizeNeed( "app", { idKey: "appKey" }).getProperties(expectedProperties), {
     name: "app",
     type: "app",
     idKey: "appKey",
     silent: false
   }, "Test 2");
 
-  assert.deepEqual(adapter.normalizeNeed( "app", { type: "application", idKey: "appKey" }).getProperties(expectedProperties), {
+  assert.deepEqual(entity.normalizeNeed( "app", { type: "application", idKey: "appKey" }).getProperties(expectedProperties), {
     name: "app",
     type: "application",
     idKey: "appKey",
     silent: false
   }, "Test 3");
 
-  assert.deepEqual(adapter.normalizeNeed( "app", { silent: true, idKey: "appKey" }).getProperties(expectedProperties), {
+  assert.deepEqual(entity.normalizeNeed( "app", { silent: true, idKey: "appKey" }).getProperties(expectedProperties), {
     name: "app",
     type: "app",
     idKey: "appKey",
@@ -75,7 +75,7 @@ test('normalizeNeed test', function(assert) {
 });
 
 test('loadAllNeeds basic test', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       loader,
       testModel = Ember.Object.create({
         refreshLoadTime: Ember.K,
@@ -89,7 +89,7 @@ test('loadAllNeeds basic test', function(assert) {
 
   assert.expect(1 + 2 + 1);
 
-  assert.equal(adapter.loadAllNeeds(loader, Ember.Object.create()), undefined, "Model without needs");
+  assert.equal(entity.loadAllNeeds(loader, Ember.Object.create()), undefined, "Model without needs");
 
   loader = {
     queryRecord: function (type, id) {
@@ -107,13 +107,13 @@ test('loadAllNeeds basic test', function(assert) {
       return Ember.RSVP.resolve();
     }
   };
-  adapter.loadAllNeeds(loader, testModel).then(function () {
+  entity.loadAllNeeds(loader, testModel).then(function () {
     assert.ok(true);
   });
 });
 
 test('loadAllNeeds silent=false test', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       loader,
       testModel = Ember.Object.create({
         refreshLoadTime: Ember.K,
@@ -135,13 +135,13 @@ test('loadAllNeeds silent=false test', function(assert) {
       return Ember.RSVP.reject(testErr);
     }
   };
-  adapter.loadAllNeeds(loader, testModel).catch(function (err) {
+  entity.loadAllNeeds(loader, testModel).catch(function (err) {
     assert.equal(err, testErr);
   });
 });
 
 test('loadAllNeeds silent=true test', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       loader,
       testModel = Ember.Object.create({
         refreshLoadTime: Ember.K,
@@ -162,13 +162,13 @@ test('loadAllNeeds silent=true test', function(assert) {
       return Ember.RSVP.resolve();
     }
   };
-  adapter.loadAllNeeds(loader, testModel).then(function (val) {
+  entity.loadAllNeeds(loader, testModel).then(function (val) {
     assert.ok(val);
   });
 });
 
 test('_loadNeed single string type test', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       loader,
       testModel = Ember.Object.create({
         refreshLoadTime: Ember.K,
@@ -191,13 +191,13 @@ test('_loadNeed single string type test', function(assert) {
       return Ember.RSVP.resolve();
     }
   };
-  adapter.loadAllNeeds(loader, testModel).then(function (val) {
+  entity.loadAllNeeds(loader, testModel).then(function (val) {
     assert.ok(val);
   });
 });
 
 test('_loadNeed multiple type test', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       loader,
       testModel = Ember.Object.create({
         refreshLoadTime: Ember.K,
@@ -227,13 +227,13 @@ test('_loadNeed multiple type test', function(assert) {
       }
     }
   };
-  adapter.loadAllNeeds(loader, testModel).then(function (val) {
+  entity.loadAllNeeds(loader, testModel).then(function (val) {
     assert.ok(val);
   });
 });
 
 test('_loadNeed test with silent false', function(assert) {
-  let adapter = this.subject(),
+  let entity = this.subject(),
       loader,
       testModel = Ember.Object.create({
         refreshLoadTime: Ember.K,
@@ -257,7 +257,7 @@ test('_loadNeed test with silent false', function(assert) {
       return Ember.RSVP.reject(testErr);
     }
   };
-  adapter.loadAllNeeds(loader, testModel).catch(function (err) {
+  entity.loadAllNeeds(loader, testModel).catch(function (err) {
     assert.equal(err, testErr);
   });
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/entities/task-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/entities/task-am-test.js b/tez-ui/src/main/webapp/tests/unit/entities/task-am-test.js
index 7caca54..1ded104 100644
--- a/tez-ui/src/main/webapp/tests/unit/entities/task-am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/entities/task-am-test.js
@@ -24,8 +24,8 @@ moduleFor('entitie:task-am', 'Unit | Entity | task am', {
 });
 
 test('Basic creation test', function(assert) {
-  let adapter = this.subject();
+  let entity = this.subject();
 
-  assert.ok(adapter);
-  assert.ok(adapter.queryPropertyToJoin);
+  assert.ok(entity);
+  assert.ok(entity.queryPropertyToJoin);
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/entities/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/entities/vertex-am-test.js b/tez-ui/src/main/webapp/tests/unit/entities/vertex-am-test.js
index 19937f3..b38e8d2 100644
--- a/tez-ui/src/main/webapp/tests/unit/entities/vertex-am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/entities/vertex-am-test.js
@@ -24,8 +24,8 @@ moduleFor('entitie:vertex-am', 'Unit | Entity | vertex am', {
 });
 
 test('Basic creation test', function(assert) {
-  let adapter = this.subject();
+  let entity = this.subject();
 
-  assert.ok(adapter);
-  assert.ok(adapter.queryPropertyToJoin);
+  assert.ok(entity);
+  assert.ok(entity.queryPropertyToJoin);
 });

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/models/hive-query-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/models/hive-query-test.js b/tez-ui/src/main/webapp/tests/unit/models/hive-query-test.js
new file mode 100644
index 0000000..70a87ec
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/models/hive-query-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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('hive-query', 'Unit | Model | hive query', {
+  // Specify the other units that are required for this test.
+  needs: []
+});
+
+test('Basic creation test', function(assert) {
+  let model = this.subject();
+  assert.ok(model);
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/serializers/hive-query-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/serializers/hive-query-test.js b/tez-ui/src/main/webapp/tests/unit/serializers/hive-query-test.js
new file mode 100644
index 0000000..d4272d3
--- /dev/null
+++ b/tez-ui/src/main/webapp/tests/unit/serializers/hive-query-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 { moduleForModel, test } from 'ember-qunit';
+
+moduleForModel('hive-query', 'Unit | Serializer | hive query', {
+  // Specify the other units that are required for this test.
+  needs: ['serializer:hive-query']
+});
+
+test('Basic creation test', function(assert) {
+  let serializer = this.subject();
+  assert.ok(serializer);
+});

http://git-wip-us.apache.org/repos/asf/tez/blob/50ea2ded/tez-ui/src/main/webapp/tests/unit/serializers/vertex-am-test.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/tests/unit/serializers/vertex-am-test.js b/tez-ui/src/main/webapp/tests/unit/serializers/vertex-am-test.js
index 254ca9f..eb50554 100644
--- a/tez-ui/src/main/webapp/tests/unit/serializers/vertex-am-test.js
+++ b/tez-ui/src/main/webapp/tests/unit/serializers/vertex-am-test.js
@@ -27,5 +27,5 @@ test('Basic creation test', function(assert) {
   let serializer = this.subject();
 
   assert.ok(serializer);
-  assert.ok(serializer.payloadNamespace);
+  assert.ok(serializer.extractArrayPayload);
 });