Examining the analytics
Now, the moment we have all been waiting for; we can see average stock prices over time by using the REST API that Druid provides. To use the REST API, it is not necessary to run a full-blown Druid cluster. You will only be able to query the data seen by the singular embedded real-time node, but each node is capable of servicing requests and this makes testing easier. Using curl, you can issue a query of a real-time node using the following command:
curl -sX POST "http://localhost:7070/druid/v2/?pretty=true" -H 'content-type: application/json' -d @storm_query
The final parameter of the curl
statement references a file, the contents of which will be included as the body of the POST
request. The file contains the following ...
Get Storm Blueprints: Patterns for Distributed Real-time Computation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.