hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [47/50] [abbrv] hadoop git commit: YARN-5785. [YARN-3368] Accessing applications and containers list from Node page is throwing few exceptions in console. (Akhil P B and Sreenath Somarajapuram via Sunil G)
Date Fri, 28 Oct 2016 14:34:43 GMT
YARN-5785. [YARN-3368] Accessing applications and containers list from Node page is throwing
few exceptions in console. (Akhil P B and Sreenath Somarajapuram via Sunil G)


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

Branch: refs/heads/YARN-3368
Commit: 97143e966eb87e946d51723d13601e32d9d632ff
Parents: 871c013
Author: sunilg <sunilg@apache.org>
Authored: Fri Oct 28 19:56:18 2016 +0530
Committer: sunilg <sunilg@apache.org>
Committed: Fri Oct 28 20:02:27 2016 +0530

----------------------------------------------------------------------
 .../src/main/webapp/app/adapters/yarn-node-app.js       | 12 ++----------
 .../src/main/webapp/app/adapters/yarn-node-container.js | 12 ++----------
 .../src/main/webapp/app/adapters/yarn-node.js           |  5 +----
 .../src/main/webapp/app/serializers/yarn-node-app.js    |  2 +-
 .../main/webapp/app/serializers/yarn-node-container.js  |  2 +-
 .../src/main/webapp/config/default-config.js            |  2 +-
 6 files changed, 8 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/97143e96/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 eaddfcb..6d69828 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
@@ -25,22 +25,14 @@ export default AbstractAdapter.extend({
   serverName: "NM",
 
   urlForQuery(query) {
-    var extension = this.get("host").split('/').pop();
-    if (extension != query.nodeAddr) {
-      this.host = this.get("host") + query.nodeAddr;
-    }
     var url = this._buildURL();
-    url = url + "/apps";
+    url = url.replace("{nodeAddress}", query.nodeAddr) + "/apps";
     return url;
   },
 
   urlForQueryRecord: function (query) {
-    var extension = this.get("host").split('/').pop();
-    if (extension != query.nodeAddr) {
-      this.host = this.get("host") + query.nodeAddr;
-    }
     var url = this._buildURL();
-    url = url + "/apps/" + query.appId;
+    url = url.replace("{nodeAddress}", query.nodeAddr) + "/apps/" + query.appId;
     return url;
   },
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/97143e96/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 56c4bcd..0fff047 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
@@ -25,22 +25,14 @@ export default AbstractAdapter.extend({
   serverName: "NM",
 
   urlForQuery(query) {
-    var extension = this.get("host").split('/').pop();
-    if (extension != query.nodeHttpAddr) {
-      this.host = this.get("host") + query.nodeHttpAddr;
-    }
     var url = this._buildURL();
-    url = url + "/containers";
+    url = url.replace("{nodeAddress}", query.nodeHttpAddr) + "/containers";
     return url;
   },
 
   urlForQueryRecord(query) {
-    var extension = this.get("host").split('/').pop();
-    if (extension != query.nodeHttpAddr) {
-      this.host = this.get("host") + query.nodeHttpAddr;
-    }
     var url = this._buildURL();
-    url = url + "/containers/" + query.containerId;
+    url = url.replace("{nodeAddress}", query.nodeHttpAddr) + "/containers/" + query.containerId;
     return url;
   },
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/97143e96/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 7a0fc4a..5bcfc9a 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
@@ -25,11 +25,8 @@ export default AbstractAdapter.extend({
   serverName: "NM",
 
   urlForFindRecord(id, modelName, snapshot) {
-    var extension = this.get("host").split('/').pop();
-    if (extension != id) {
-      this.host = this.get("host") + id;
-    }
     var url = this._buildURL();
+    url = url.replace("{nodeAddress}", id);
     return url;
   },
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/97143e96/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
index 5945813..3dfd776 100644
--- 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
@@ -68,7 +68,7 @@ export default DS.JSONAPISerializer.extend({
     // expected return response is of the form { data: [ {}, {} ] }
     var normalizedArrayResponse = {};
     // payload is of the form { "apps" : { "app": [ {},{},{} ]  } }
-    if (payload.apps) {
+    if (payload.apps && payload.apps.app) {
       normalizedArrayResponse.data = payload.apps.app.map(singleApp => {
           return this.internalNormalizeSingleResponse(store, primaryModelClass,
               singleApp);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/97143e96/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
index a104f1e..bf19ad7 100644
--- 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
@@ -54,7 +54,7 @@ export default DS.JSONAPISerializer.extend({
       requestType) {
     // expected return response is of the form { data: [ {}, {} ] }
     var normalizedArrayResponse = {};
-    if (payload.containers) {
+    if (payload.containers && payload.containers.container) {
       // payload is of the form { "containers" : { "container": [ {},{},{} ]  } }
       normalizedArrayResponse.data =
           payload.containers.container.map(singleContainer => {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/97143e96/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
index c5dbbea..70d4ebc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/config/default-config.js
@@ -27,6 +27,6 @@ module.exports = { // Yarn UI App configurations
       timeline: 'ws/v1/applicationhistory',
       cluster: 'ws/v1/cluster',
       metrics: 'ws/v1/cluster/metrics',
-      node: 'ws/v1/node'
+      node: '{nodeAddress}/ws/v1/node'
     },
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message