Modified Endpoints for multiple managers and new compaction summary#6251
Modified Endpoints for multiple managers and new compaction summary#6251dlmarion wants to merge 4 commits intoapache:mainfrom
Conversation
|
@DomGarguilo - this changes two endpoints. Let me know if you want any changes in the response object formats and I can make them. |
I think with these changes the JSON will be something like: {
"type=MANAGER;group=default;address=localhost:9995": [
{ "...": "metric..." },
{ "...": "metric..." }
]
}That will work but is not quite as nice to parse. I'm thinking it might be better to send a list of objects instead of a map. so something like this: [
{
"server": {
"type": "MANAGER",
"resourceGroup": "default",
"address": "localhost:9995"
},
"metrics": [
{ "...": "metric..." },
{ "...": "metric..." }
]
}
]Not exactly sure what the code will look like but could create something like |
|
|
||
| } | ||
|
|
||
| public record CompactionSummary(Map<TableId,Long> tableCompactions, |
There was a problem hiding this comment.
Would probably be easier on the front end code to roll the metrics up. Could do something like the following.
public record CompactionTableSummary(String tableId, long running){}
public record CompactionGroupSummary(String groupId, long running, long queued, long rejected/*, other metrics */){}
public record CompactionSummary(List<CompactionTableSummary> tableSummaries, List<CompactionGroupSummary> groupSummaries){}There was a problem hiding this comment.
Maybe the list above should be maps.
| Map<String,Long> groupCompactions, | ||
| Map<ServerId,Map<String,List<FMetric>>> compactionQueueMetrics) { | ||
|
|
||
| public List<FMetric> getQueueMetrics(String resourceGroup) { |
There was a problem hiding this comment.
When I look at the json output for this I am seeing _ replaced w/ . sometimes. Below are two examples of this. This is code is probably causing that.
"tableCompactions": {
"1": 6
},
"groupCompactions": {
"ci_small": 3,
"ci_lrg": 3
}, {
"name": "accumulo.compaction.queue.jobs.queued",
"type": "GAUGE",
"tags": [
{
"queue.id": "ci.small"
},
{
"statistic": "value"
}
],
"value": 0
}There was a problem hiding this comment.
This is code is probably causing that.
Looks right. I'm surprised we are not using that method in more places. I'll create a ticket for it. For now, suggest not using , _, or - in a queue name as the metric data won't line up.
Closes #6247