hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject [20/20] hadoop git commit: YARN-4514
Date Fri, 08 Apr 2016 18:31:31 GMT
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 <wangda@apache.org>
Authored: Fri Apr 8 10:48:45 2016 -0700
Committer: Wangda Tan <wangda@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'
+   }
 };


Mime
View raw message