[Hawkular-dev] HWKMETRICS-67 Influx endpoint: support pretty print query parameter #211

Thomas Segismont tsegismo at redhat.com
Wed May 13 12:52:16 EDT 2015



Le 13/05/2015 14:33, Michael Burman a écrit :
> Hi,
>
> Like I said in the IRC, it's true that this helps browser-based querying (although many do use some addon on their browsers for debugging anyway), but this is so easy feature to do on the client side that is it really useful? But then to the actual implementation.

The usefulness question is important. It isn't if your IT department 
lets you install a browser with such plugins, or if the terminal access 
they give you lets you execute python or ruby. If you only have curl, 
then it is useful.

>
> If we want to support streaming large resultsets for analytic purposes, this solution will not cut it (not that it needs to - there's no point when dealing with large amount of data). You have to keep the whole result in the memory, format it and then print it. When we're migrating to RxJava, for example following process would be doable and very neat:
>
> http://christopher-batey.blogspot.fi/2014/12/streaming-large-payloads-over-http-from.html
>
> (this is Cassandra + RxJava + JAX-RS streaming blog article)
>
> That would allow customers to fetch large amount of data from the Metrics interface and do their own calculations on the raw data. Perhaps even the idea that Thomas H threw earlier that we could calculate the "new requirements, such as percentiles" on the Kettle without modifying the Metrics component each time. Now, should we protect ourselves somehow from people using pretty on that case ? Otherwise there's a possibility for killing the server to OOM with silly request.

Right, the problem narrows down to large (> hundreds of megabytes) 
content sent with StreamingOutput, because whenever we use the built-in 
Jackson provider to convert entities, the payload has to fit in memory 
(we create the response with an entity and then RestEasy calls the 
ObjectMapper)

For such endpoints, we could simply remove the PRETTY_PRINT hint from 
the request context.

>
>    -  Micke
>
> ----- Original Message -----
> From: "Thomas Segismont" <tsegismo at redhat.com>
> To: hawkular-dev at lists.jboss.org
> Sent: Wednesday, May 13, 2015 2:33:58 PM
> Subject: [Hawkular-dev] HWKMETRICS-67 Influx endpoint: support pretty print query parameter #211
>
> Hi,
>
> I've just sent a PR request for Metrics which enables pretty printing on
> the Influx endpoint (something supported by Influx in the first place)
>
> I believe that's a capability which would be beneficial to the rest of
> the Metrics endpoints.
>
> In practice, any request with the /pretty=true/ query parameter would
> have a JSON formatted output.
>
> Please shout if you disagree.
>
> Regards,
> Thomas.
>
>
> https://issues.jboss.org/browse/HWKMETRICS-84
> https://github.com/hawkular/hawkular-metrics/pull/211
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>



More information about the hawkular-dev mailing list