New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HWKMETRICS-472] Implement aggregated availability #597
Conversation
- Collector / aggregator - Endpoints for availability type - Unit tests
Can one of the admins verify this patch? |
if (limit > 0) { | ||
// Limit already applied on C* query, but might be exceeded after aggregation | ||
// So it's applied again | ||
result = result.limit(limit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.take(limit) is the default in RxJava, limit is an alias (but in ReactiveX world, the normal term is take, so lets use that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ok to test |
List<DataPoint<RatioMap>> result = service.buildRatioMapSeries(allSeries, Order.ASC, AvailabilityType::getText) | ||
.toList() | ||
.toBlocking() | ||
.single(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Reminder: must try with TestSubscriber)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
retest this please |
@@ -466,4 +471,126 @@ public void getMetricStats( | |||
.map(ApiUtils::collectionToResponse) | |||
.subscribe(asyncResponse::resume, t -> asyncResponse.resume(serverError(t))); | |||
} | |||
|
|||
@GET | |||
@Path("/aggregated") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path is not good. Aggregated will be used in a different context soon. Can you put this functionality under /stats
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if "stats" fits well. For now "stats" is about time-aggregation, with buckets and so on, whereas here it's about multiple series aggregation, without any time bucket. I fear it would be confusing if we use the same word.
On hawkular-dev ML Jay proposed: "/aggregate, /set, /group or whatever" ... is there anyone of these you find better? Or maybe something like "/merged" ?
} | ||
|
||
@POST | ||
@Path("/aggregated/query") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above about the usage of /aggregated
; stats
is better.
Just to clarify the comments regarding |
JIRA: https://issues.jboss.org/browse/HWKMETRICS-472
This PR follows discussion on hawkular-dev (mail title: "Availability metrics: aggregate stats series")
Remark about assertj:
I added assertj, an assertion framework, to the class path in test scope. I've started a topic on hawkular-dev to discuss about assertj. If necessary I will update this PR to remove assertj.