[
https://issues.apache.org/jira/browse/STORM-1719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15245185#comment-15245185
]
ASF GitHub Bot commented on STORM-1719:
---------------------------------------
GitHub user HeartSaVioR opened a pull request:
https://github.com/apache/storm/pull/1347
STORM-1719 Introduce REST API: Topology metric stats for stream
* Path: /api/v1/topology/:id/metrics
* This API provides detailed metrics for topology
** shows metrics per component, which are aggregated by stream
* add documentation about new REST API
I don't address this for master yet since ui/core.clj is not converted to
Java but stats.clj is converted to Java.
If we want to move some methods in this patch to stats.clj, I'll follow up
reviews, and start working on crafting patch against master when patch is ready
to merge.
Sample output is here.
```json
{
"window":":all-time",
"window-hint":"All time",
"spouts":[
{
"id":"spout",
"emitted":[
{
"stream_id":"__metrics",
"value":20
},
{
"stream_id":"default",
"value":17350280
},
{
"stream_id":"__ack_init",
"value":17328160
},
{
"stream_id":"__system",
"value":20
}
],
"transferred":[
{
"stream_id":"__metrics",
"value":20
},
{
"stream_id":"default",
"value":17350280
},
{
"stream_id":"__ack_init",
"value":17328160
},
{
"stream_id":"__system",
"value":0
}
],
"acked":[
{
"stream_id":"default",
"value":17339180
}
],
"failed":[
],
"complete_ms_avg":[
{
"stream_id":"default",
"value":"920.497"
}
]
}
],
"bolts":[
{
"id":"count",
"emitted":[
{
"stream_id":"__metrics",
"value":120
},
{
"stream_id":"default",
"value":190748180
},
{
"stream_id":"__ack_ack",
"value":190718100
},
{
"stream_id":"__system",
"value":20
}
],
"transferred":[
{
"stream_id":"__metrics",
"value":120
},
{
"stream_id":"default",
"value":0
},
{
"stream_id":"__ack_ack",
"value":190718100
},
{
"stream_id":"__system",
"value":0
}
],
"acked":[
{
"component_id":"split",
"stream_id":"default",
"value":190733160
}
],
"failed":[
],
"process_ms_avg":[
{
"component_id":"split",
"stream_id":"default",
"value":"0.004"
}
],
"executed":[
{
"component_id":"split",
"stream_id":"default",
"value":190733140
}
],
"executed_ms_avg":[
{
"component_id":"split",
"stream_id":"default",
"value":"0.005"
}
]
},
{
"id":"split",
"emitted":[
{
"stream_id":"__metrics",
"value":60
},
{
"stream_id":"default",
"value":190754740
},
{
"stream_id":"__ack_ack",
"value":17317580
},
{
"stream_id":"__system",
"value":20
}
],
"transferred":[
{
"stream_id":"__metrics",
"value":60
},
{
"stream_id":"default",
"value":190754740
},
{
"stream_id":"__ack_ack",
"value":17317580
},
{
"stream_id":"__system",
"value":0
}
],
"acked":[
{
"component_id":"spout",
"stream_id":"default",
"value":17339180
}
],
"failed":[
],
"process_ms_avg":[
{
"component_id":"spout",
"stream_id":"default",
"value":"0.051"
}
],
"executed":[
{
"component_id":"spout",
"stream_id":"default",
"value":17339240
}
],
"executed_ms_avg":[
{
"component_id":"spout",
"stream_id":"default",
"value":"0.052"
}
]
}
]
}
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HeartSaVioR/storm STORM-1719-1.x
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/1347.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1347
----
commit a1c647142816ffb92bbaa6acbf234fdd83c3441e
Author: Jungtaek Lim <[email protected]>
Date: 2016-04-16T11:04:01Z
STORM-1719 Introduce REST API: Topology metric stats for stream
* Path: /api/v1/topology/:id/metrics
* This API provides detailed metrics for topology
** shows metrics per component, which are aggregated by stream
* add documentation about new REST API
** please refer docs/STORM-UI-REST-API.md for details
----
> Introduce REST API: Topology metric stats for stream
> ----------------------------------------------------
>
> Key: STORM-1719
> URL: https://issues.apache.org/jira/browse/STORM-1719
> Project: Apache Storm
> Issue Type: Improvement
> Components: storm-core
> Reporter: Jungtaek Lim
> Assignee: Jungtaek Lim
>
> Apache Storm has two REST APIs for showing topology stats,
> /api/v1/topology/:id and showing component stats,
> /api/v1/topology/:id/component/:component.
> Both of APIs shows metrics aggregated by topology or each component.
> It helps determining traffics between component to component, which is good
> for many topologies. But if users use their own topology which utilizes lots
> of streams, they may want to see topology stats in detail - in point of
> stream's view.
> We already have visualization API to show the traffics between stream to
> stream, but it's internal API, and contains only transferred, and it shows
> non-aggregated result so users need to aggregate theirselves.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)