[
https://issues.apache.org/jira/browse/SLIDER-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14168887#comment-14168887
]
Sumit Mohanty edited comment on SLIDER-481 at 10/13/14 1:42 AM:
----------------------------------------------------------------
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:
{noformat}
"quicklinks": {
"description": "quick links for app",
"updated": 1413160329232,
"updatedTime": "Mon Oct 13 00:32:09 UTC 2014",
"entries": { },
"empty": false
}
{noformat}
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
{noformat}
"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": ""
}
]
}
{noformat}
was (Author: sumitmohanty):
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:
{noformat}
"quicklinks": {
"description": "quick links for app",
"updated": 1413160329232,
"updatedTime": "Mon Oct 13 00:32:09 UTC 2014",
"entries": { },
"empty": false
}
{noformat}
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
{noformat}
{
"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": ""
}
]
}
{noformat}
> Exports should allow a multiple line items per export and a more hierarchical
> structure
> ---------------------------------------------------------------------------------------
>
> Key: SLIDER-481
> URL: https://issues.apache.org/jira/browse/SLIDER-481
> Project: Slider
> Issue Type: Bug
> Components: agent-provider, app-package
> Affects Versions: Slider 0.50
> Reporter: Sumit Mohanty
> Assignee: Sumit Mohanty
> Fix For: Slider 0.60
>
>
> The application exports are currently piggy-backing on configuration support
> in the registry. While this pushes the information out the layout of
> name-value pairs are not ideal for exports.
> For example:
> * Some exports can have array of values each related to a component instance
> * Some exports need additional tags such as which roles they belong to or
> which host they are on
> * Only JSON export should be sufficient
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)