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
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
