Jelajahi Sumber

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

Srimanth Gunturi 11 tahun lalu
induk
melakukan
e5fbaa48ef

+ 1 - 1
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"

+ 13 - 9
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>

+ 2 - 2
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());

+ 1 - 1
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);

+ 9 - 9
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",

+ 5 - 5
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

+ 1 - 1
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(),

+ 1 - 1
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;

+ 3 - 3
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': ''
   }

+ 1 - 1
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

+ 1 - 1
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'