storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Rose <>
Subject Re: Fetching data from a REST api into storm.
Date Thu, 24 Jul 2014 17:36:06 GMT
Anything you can do in normal Java code, you can do inside a Storm bolt.
Check out any Java HTTP client (OkHttp, Apache HTTP Client, JerseyClient,
URLConnection etc.) and use it to fetch the data you need.

If your REST call takes a long time, it might be worth doing so
asynchronously and emitting the results downstream when the thread returns.
Just make sure that you're synchronizing your OutputCollector when emitting
from a multithreaded context.

Hope that helps.

Michael Rose (@Xorlev <>)
Senior Platform Engineer, FullContact <>

On Thu, Jul 24, 2014 at 10:47 AM, Yogini Gulkotwar <> wrote:

> Hello friends,
> I am trying to fetch data from one of my tools which has a REST api
> feature. So basically, I need to know if it is possible to make calls to
> the web api of my tool and fetch data.
> It would be great if someone could share some example code where something
> similar has been achieved.
> Thanks & Regards,
> Yogini Gulkotwar│Data Scientist

View raw message