Sumit Mohanty
added a comment - 13/Oct/14 01:36 - edited Currently, exports are published using the same mechanism that is used to published configuration. While it gets the job done, it has some drawbacks:
exports may have multiple line items - e.g. a set of peer services all exposing an end point with the same "name"
exports may need to be associated with identifier/tag per container, update time per entry, even valid until time per entry
exports do not fit well into all formatting options for configs
Proposal:
Introduce a separate path (REST) for exports in parallel to the configurations.
Example: org.apache.slider.publisher.exports http://c6401.ambari.apache.org:60815/ws/v1/slider/publisher/exports
The child elements to the above are export groups. An export group is a logical grouping of exports that the app author can define.
Example:
"quicklinks": {
"description": "quick links for app",
"updated": 1413160329232,
"updatedTime": "Mon Oct 13 00:32:09 UTC 2014",
"entries": { },
"empty": false
}
Each sub-entry will refer to an exported item which may have one or more entries.
Example: http://c6401.ambari.apache.org:60815/ws/v1/slider/publisher/exports/quicklinks
value - exported value
containerId - id of the container that exported it
tag - (optional) tag associated with the container ( SLIDER-463 )
level - applicable to a component or the whole application
updateTime - when was it last updated
validUntil - (optional) till when the entry is valid
"entries" : {
"quorum_host_port": [
{
"value": "http://c6401.ambari.apache.org:8342/api",
"containerId": "container_1412837132444_0012_01_000002",
"tag": "1",
"level": "component",
"updateTime": "Mon Oct 13 00:32:09 UTC 2014",
"validUntil": ""
},
{
"value": "http://c6402.ambari.apache.org:28551/api",
"containerId": "container_1412837132444_0012_01_000004",
"tag": "2",
"level": "component",
"updateTime": "Mon Oct 13 00:36:23 UTC 2014",
"validUntil": ""
}
],
"ganglia_ui":[
{
"value": "http://c6403.ambari.apache.org/ganglia/?c=App1",
"containerId": "",
"tag": "",
"level": "application",
"updateTime": "Mon Oct 13 00:32:09 UTC 2014",
"validUntil": ""
}
]
}