You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/02/23 18:10:27 UTC

git commit: AMBARI-4797. ATS API url changing along with two config renames. (srimanth)

Repository: ambari
Updated Branches:
  refs/heads/trunk d0ccc47cc -> e5fbaa48e


AMBARI-4797. ATS API url changing along with two config renames. (srimanth)


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

Branch: refs/heads/trunk
Commit: e5fbaa48ef41245263980eb25104a855643d744e
Parents: d0ccc47
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Sat Feb 22 19:30:02 2014 -0800
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Sat Feb 22 20:46:13 2014 -0800

----------------------------------------------------------------------
 .../services/NAGIOS/package/scripts/params.py   |  2 +-
 .../services/YARN/configuration/yarn-site.xml   | 22 ++++++++++++--------
 .../ambari/server/proxy/ProxyServiceTest.java   |  4 ++--
 .../app/controllers/main/jobs_controller.js     |  2 +-
 ambari-web/app/data/HDP2/site_properties.js     | 18 ++++++++--------
 .../app/data/HDP2/site_properties.js.orig       | 10 ++++-----
 ambari-web/app/models/service/yarn.js           |  2 +-
 ambari-web/app/models/service_config.js         |  2 +-
 ambari-web/app/utils/ajax.js                    |  6 +++---
 ambari-web/app/utils/jobs.js                    |  2 +-
 ambari-web/test/app_test.js                     |  2 +-
 11 files changed, 38 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
index 96c60a7..3b21d74 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
@@ -66,7 +66,7 @@ hive_metastore_port = config['configurations']['global']['hive_metastore_port']
 templeton_port = config['configurations']['webhcat-site']['templeton.port'] #"50111"
 hbase_rs_port = "60030"
 falcon_port = config['configurations']['global']['falcon_port']
-ahs_port = get_port_from_url(config['configurations']['yarn-site']['yarn.ahs.webapp.address'])
+ahs_port = get_port_from_url(config['configurations']['yarn-site']['yarn.timeline-service.webapp.address'])
 
 # this is different for HDP1
 nn_metrics_property = "FSNamesystem"

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/yarn-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/yarn-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/yarn-site.xml
index cc46d9e..cf684e7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/yarn-site.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1.1/services/YARN/configuration/yarn-site.xml
@@ -340,30 +340,34 @@
   </property>
 
   <property>
-    <name>yarn.ats.store.class</name>
+    <name>yarn.timeline-service.store-class</name>
     <value>org.apache.hadoop.yarn.server.applicationhistoryservice.apptimeline.LeveldbApplicationTimelineStore</value>
     <description>
-      Store class name for timeline service
+      Store class name for timeline store
     </description>
   </property>
 
   <property>
-    <name>yarn.ahs.store.class</name>
+    <name>yarn.timeline-service.generic-application-history.store-class</name>
     <value>org.apache.hadoop.yarn.server.applicationhistoryservice.NullApplicationHistoryStore</value>
     <description>
-      Store class name for history service
+      Store class name for history store, defaulting to file system store
     </description>
   </property>
 
   <property>
-    <name>yarn.ats.leveldb-timeline-store.path</name>
-    <value>/var/log/hadoop-yarn/ats</value>
-    <description></description>
+    <name>yarn.timeline-service.leveldb-timeline-store.path</name>
+    <value>/var/log/hadoop-yarn/timeline</value>
+    <description>
+      Store file name for leveldb timeline store
+    </description>
   </property>
 
   <property>
-    <name>yarn.ahs.webapp.address</name>
+    <name>yarn.timeline-service.webapp.address</name>
     <value>0.0.0.0:8188</value>
-    <description></description>
+    <description>
+      The http address of the timeline service web application.
+    </description>
   </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
index c1ce289..7cbefef 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/proxy/ProxyServiceTest.java
@@ -273,7 +273,7 @@ class ProxyServiceTest extends BaseServiceTest {
     MultivaluedMap<String, String> headerParams = new MultivaluedMapImpl();
     HttpURLConnection urlConnectionMock = createMock(HttpURLConnection.class);
     URI uri = UriBuilder.fromUri("http://dev01.hortonworks.com:8080/proxy?url=http%3a%2f%2fserver%3a8188%2fws%2fv1%2f" +
-     "apptimeline%2fHIVE_QUERY_ID%3ffields=events%2cprimaryfilters%26limit=10%26primaryFilter=user%3ahiveuser1").build();
+     "timeline%2fHIVE_QUERY_ID%3ffields=events%2cprimaryfilters%26limit=10%26primaryFilter=user%3ahiveuser1").build();
     Map<String, List<String>> headerParamsToForward = new HashMap<String, List<String>>();
     InputStream is = new ByteArrayInputStream("test".getBytes());
     List<String> userRemoteParams = new LinkedList<String>();
@@ -288,7 +288,7 @@ class ProxyServiceTest extends BaseServiceTest {
     expect(urlConnectionMock.getContentType()).andReturn("text/plain");
     expect(urlConnectionMock.getInputStream()).andReturn(is);
     PowerMock.expectNew(URLStreamProvider.class, 3000, 3000, null, null, null).andReturn(streamProviderMock);
-    expect(streamProviderMock.processURL("http://server:8188/ws/v1/apptimeline/HIVE_QUERY_ID?fields=events,primary" +
+    expect(streamProviderMock.processURL("http://server:8188/ws/v1/timeline/HIVE_QUERY_ID?fields=events,primary" +
      "filters&limit=10&primaryFilter=user:hiveuser1", "GET", null, headerParamsToForward)).andReturn(urlConnectionMock);
     PowerMock.replay(streamProviderMock, URLStreamProvider.class);
     replay(getUriInfo(), urlConnectionMock, getHttpHeaders());

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/controllers/main/jobs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/jobs_controller.js b/ambari-web/app/controllers/main/jobs_controller.js
index 7eced37..4fc19de 100644
--- a/ambari-web/app/controllers/main/jobs_controller.js
+++ b/ambari-web/app/controllers/main/jobs_controller.js
@@ -243,7 +243,7 @@ App.MainJobsController = Em.ArrayController.extend({
       var historyServerHostName = yarnService.get('resourceManagerNode.hostName');
       var filtersLink = this.get('filterObject').createJobsFiltersLink();
       var hiveQueriesUrl = App.testMode ? "/data/jobs/hive-queries.json" : "/proxy?url=http://" + historyServerHostName
-          + ":" + yarnService.get('ahsWebPort') + "/ws/v1/apptimeline/HIVE_QUERY_ID" + filtersLink;
+          + ":" + yarnService.get('ahsWebPort') + "/ws/v1/timeline/HIVE_QUERY_ID" + filtersLink;
       App.HttpClient.get(hiveQueriesUrl, App.hiveJobsMapper, {
         complete : function(jqXHR, textStatus) {
           self.set('loading', false);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index e189e8c..baf014a 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -303,10 +303,10 @@ module.exports =
     },
     {
       "id": "site property",
-      "name": "yarn.ats.leveldb-timeline-store.path",
-      "displayName": "yarn.ats.leveldb-timeline-store.path",
+      "name": "yarn.timeline-service.leveldb-timeline-store.path",
+      "displayName": "yarn.timeline-service.leveldb-timeline-store.path",
       "value": "",
-      "defaultValue": "/var/log/hadoop-yarn/ats",
+      "defaultValue": "/var/log/hadoop-yarn/timeline",
       "isVisible": App.supports.appTimelineServer, // @todo remove after Application Timeline Server approving
       "category": "AppTimelineServer",
       "displayType": "directory",
@@ -314,8 +314,8 @@ module.exports =
     },
     {
       "id": "site property",
-      "name": "yarn.ats.store.class",
-      "displayName": "yarn.ats.store.class",
+      "name": "yarn.timeline-service.store-class",
+      "displayName": "yarn.timeline-service.store-class",
       "value": "",
       "defaultValue": "org.apache.hadoop.yarn.server.applicationhistoryservice.apptimeline.LeveldbApplicationTimelineStore",
       "isVisible": App.supports.appTimelineServer, // @todo remove after Application Timeline Server approving
@@ -324,8 +324,8 @@ module.exports =
     },
     {
       "id": "site property",
-      "name": "yarn.ahs.store.class",
-      "displayName": "yarn.ahs.store.class",
+      "name": "yarn.timeline-service.generic-application-history.store-class",
+      "displayName": "yarn.timeline-service.generic-application-history.store-class",
       "value": "",
       "defaultValue": "org.apache.hadoop.yarn.server.applicationhistoryservice.NullApplicationHistoryStore",
       "isVisible": App.supports.appTimelineServer, // @todo remove after Application Timeline Server approving
@@ -334,8 +334,8 @@ module.exports =
     },
     {
       "id": "site property",
-      "name": "yarn.ahs.webapp.address",
-      "displayName": "yarn.ahs.webapp.address",
+      "name": "yarn.timeline-service.webapp.address",
+      "displayName": "yarn.timeline-service.webapp.address",
       "value": "",
       "defaultValue": "0.0.0.0:8188",
       "displayType": "string",

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/data/HDP2/site_properties.js.orig
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js.orig b/ambari-web/app/data/HDP2/site_properties.js.orig
index fac3cce..0f086a8 100644
--- a/ambari-web/app/data/HDP2/site_properties.js.orig
+++ b/ambari-web/app/data/HDP2/site_properties.js.orig
@@ -303,10 +303,10 @@ module.exports =
     },
     {
       "id": "site property",
-      "name": "yarn.ats.leveldb-timeline-store.path",
-      "displayName": "yarn.ats.leveldb-timeline-store.path",
+      "name": "yarn.timeline-service.leveldb-timeline-store.path",
+      "displayName": "yarn.timeline-service.leveldb-timeline-store.path",
       "value": "",
-      "defaultValue": "/var/log/hadoop-yarn/ats",
+      "defaultValue": "/var/log/hadoop-yarn/timeline",
       "isVisible": App.supports.appTimelineServer, // @todo remove after Application Timeline Server approving
       "category": "AppTimelineServer",
       "displayType": "directory",
@@ -314,8 +314,8 @@ module.exports =
     },
     {
       "id": "site property",
-      "name": "yarn.ats.store.class",
-      "displayName": "yarn.ats.store.class",
+      "name": "yarn.timeline-service.store-class",
+      "displayName": "yarn.timeline-service.store-class",
       "value": "",
       "defaultValue": "org.apache.hadoop.yarn.server.applicationhistoryservice.timeline.LeveldbApplicationTimelineStore",
       "isVisible": App.supports.appTimelineServer, // @todo remove after Application Timeline Server approving

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/models/service/yarn.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service/yarn.js b/ambari-web/app/models/service/yarn.js
index 9da1c09..5b66834 100644
--- a/ambari-web/app/models/service/yarn.js
+++ b/ambari-web/app/models/service/yarn.js
@@ -40,7 +40,7 @@ App.YARNService = App.Service.extend({
   ahsWebPort: function() {
     var yarnConf = App.db.getConfigs().findProperty('type', 'yarn-site')
     if(yarnConf){
-      return yarnConf.properties['yarn.ahs.webapp.address'].match(/:(\d+)/)[1];;
+      return yarnConf.properties['yarn.timeline-service.webapp.address'].match(/:(\d+)/)[1];;
     }
     return "8188";
   }.property(),

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index c5ea65b..46bebe8 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -342,7 +342,7 @@ App.ServiceConfigProperty = Ember.Object.extend({
         var rmHost = masterComponentHostsInDB.findProperty('component', 'RESOURCEMANAGER').hostName;
         this.setDefaultValue("(\\w*)(?=:)",rmHost);
         break;
-      case 'yarn.ahs.webapp.address':
+      case 'yarn.timeline-service.webapp.address':
         var hsHost = masterComponentHostsInDB.findProperty('component', 'HISTORYSERVER').hostName;
         this.setDefaultValue("(0.0.0.0)(?=:)", hsHost);
         break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index a4ef34e..f58e82b 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -1686,17 +1686,17 @@ var urls = {
   },
 
   'jobs.tezDag.NametoID': {
-    'real': '/proxy?url=http://{historyServerHostName}:{ahsWebPort}/ws/v1/apptimeline/TEZ_DAG_ID?primaryFilter=dagName:{tezDagName}',
+    'real': '/proxy?url=http://{historyServerHostName}:{ahsWebPort}/ws/v1/timeline/TEZ_DAG_ID?primaryFilter=dagName:{tezDagName}',
     'mock': '/data/jobs/tezDag-name-to-id.json',
     'apiPrefix': ''
   },
   'jobs.tezDag.tezDagId': {
-    'real': '/proxy?url=http://{historyServerHostName}:{ahsWebPort}/ws/v1/apptimeline/TEZ_DAG_ID/{tezDagId}?fields=relatedentities',
+    'real': '/proxy?url=http://{historyServerHostName}:{ahsWebPort}/ws/v1/timeline/TEZ_DAG_ID/{tezDagId}?fields=relatedentities',
     'mock': '/data/jobs/tezDag.json',
     'apiPrefix': ''
   },
   'jobs.tezDag.tezDagVertexId': {
-    'real': '/proxy?url=http://{historyServerHostName}:{ahsWebPort}/ws/v1/apptimeline/TEZ_VERTEX_ID/{tezDagVertexId}?fields=otherinfo',
+    'real': '/proxy?url=http://{historyServerHostName}:{ahsWebPort}/ws/v1/timeline/TEZ_VERTEX_ID/{tezDagVertexId}?fields=otherinfo',
     'mock': '/data/jobs/tezDagVertex.json',
     'apiPrefix': ''
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/app/utils/jobs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/jobs.js b/ambari-web/app/utils/jobs.js
index 67ff9c7..c8e51da 100644
--- a/ambari-web/app/utils/jobs.js
+++ b/ambari-web/app/utils/jobs.js
@@ -47,7 +47,7 @@ module.exports = {
     var hiveJobId = hiveJob.get('id');
     // First refresh query
     var hiveQueriesUrl = App.testMode ? "/data/jobs/hive-query-2.json" : "/proxy?url=http://" + historyServerHostName
-        + ":" + ahsWebPort + "/ws/v1/apptimeline/HIVE_QUERY_ID/" + hiveJob.get('id') + "?fields=otherinfo";
+        + ":" + ahsWebPort + "/ws/v1/timeline/HIVE_QUERY_ID/" + hiveJob.get('id') + "?fields=otherinfo";
     App.HttpClient.get(hiveQueriesUrl, App.hiveJobMapper, {
       complete : function(jqXHR, textStatus) {
         // Now get the Tez DAG ID from the DAG name

http://git-wip-us.apache.org/repos/asf/ambari/blob/e5fbaa48/ambari-web/test/app_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/app_test.js b/ambari-web/test/app_test.js
index 83477e3..b7edd5b 100644
--- a/ambari-web/test/app_test.js
+++ b/ambari-web/test/app_test.js
@@ -48,7 +48,7 @@ describe('#App', function() {
       componentName: 'APP_TIMELINE_SERVER',
       properties: {
         global_properties: ['ats_host', 'apptimelineserver_heapsize'],
-        site_properties: ['yarn.ahs.store.class', 'yarn.ats.store.class', 'yarn.ats.leveldb-timeline-store.path']
+        site_properties: ['yarn.timeline-service.generic-application-history.store-class', 'yarn.timeline-service.store-class', 'yarn.timeline-service.leveldb-timeline-store.path']
       },
       reviewConfigs: {
         component_name: 'APP_TIMELINE_SERVER'