kairosdb / kairosdb-client

Java Client for KairosDB
65 stars 67 forks source link

Issue #64. Added support for filter aggregator. #65

Closed gmuehlenberg closed 6 years ago

gmuehlenberg commented 6 years ago

Added filter aggregator. However, unable to fix the issue https://github.com/kairosdb/kairosdb/issues/424 where the EQUALS filter is not working in Kairosdb 1.1.3.

gmuehlenberg commented 6 years ago

Also fixed the filter-Aggregator following Brian's fix. ('eq' -> 'equal')

jsabin commented 6 years ago

Thanks for your contribution, I implemented this with a custom aggregator rather than with an object. Not sure I see an advantage of using a separate object.

gmuehlenberg commented 6 years ago

Thanks for your answer. How can we use this custom aggregator feature? I could not find any documentation about it.

jsabin commented 6 years ago

Sorry. I was not very clear. Rather than including your pull request, I reimplemented the AggregatorFactor.createFilterAggregator() using CustomAggregator. Users of this call don't really need to know how it was implemented other than I did not create a new Class to implement this. I have not checked it in but will check it in shortly and will be doing a new release of client hopefully within a coupe of days.

gmuehlenberg commented 6 years ago

Hello Jeff, thank you for the clarification, now I see what you did. I am curious about your solution to this, because I first tried it with a CustomAggregator as well but ran into a weird exception where Kairosdb 1.1.3 could not find a class associated with the name 'filter'. Greetings, Georg

jsabin commented 6 years ago

Yes 1.1.3 does not have the filter aggregator so it make sense you would have an error.

gmuehlenberg commented 6 years ago

I don't quite understand. 1.1.3 had the filter aggregator. Please check https://github.com/kairosdb/kairosdb/blob/v1.1.3/src/main/java/org/kairosdb/core/aggregator/FilterAggregator.java