You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by clay teahouse <cl...@gmail.com> on 2014/11/11 12:09:48 UTC

join and in-bolt caching

Hello All,
I need to
1) Look up some values from a source and cache them in a bolt
2) Filter a second stream based on the looked up values in (1).

Example:
1) Area Codes = 712, 915 -- these area codes might change from time to time
2) People living in different addresses

Emit: People leaving in area codes 712 and 915

I want to use bolts (not trident). I've been reading about in-bolt caching
to hold the looked up values but I am not sure how to utilize it in this
context and I am also not sure how a database join would work in this
context. Does someone have an example dealing with a similar use case?

thanks,
Clay

Re: join and in-bolt caching

Posted by Nathan Leung <nc...@gmail.com>.
I don't really see the join in your example but just put a Set in your bolt
object, and initialize it from your source.  Re-initialize it periodically
if you need to.  Then when your tuple comes in, check the area code and
only emit if the area code is in the set.

On Wed, Nov 12, 2014 at 12:20 PM, clay teahouse <cl...@gmail.com>
wrote:

> Hello All,
> I'd appreciate your input/pointers regarding my post on join and in-blot
> caching.
>
> thanks,
> Clay
>
> On Tue, Nov 11, 2014 at 5:09 AM, clay teahouse <cl...@gmail.com>
> wrote:
>
>> Hello All,
>> I need to
>> 1) Look up some values from a source and cache them in a bolt
>> 2) Filter a second stream based on the looked up values in (1).
>>
>> Example:
>> 1) Area Codes = 712, 915 -- these area codes might change from time to
>> time
>> 2) People living in different addresses
>>
>> Emit: People leaving in area codes 712 and 915
>>
>> I want to use bolts (not trident). I've been reading about in-bolt
>> caching to hold the looked up values but I am not sure how to utilize it in
>> this context and I am also not sure how a database join would work in this
>> context. Does someone have an example dealing with a similar use case?
>>
>> thanks,
>> Clay
>>
>>
>

Re: join and in-bolt caching

Posted by clay teahouse <cl...@gmail.com>.
Hello All,
I'd appreciate your input/pointers regarding my post on join and in-blot
caching.

thanks,
Clay

On Tue, Nov 11, 2014 at 5:09 AM, clay teahouse <cl...@gmail.com>
wrote:

> Hello All,
> I need to
> 1) Look up some values from a source and cache them in a bolt
> 2) Filter a second stream based on the looked up values in (1).
>
> Example:
> 1) Area Codes = 712, 915 -- these area codes might change from time to time
> 2) People living in different addresses
>
> Emit: People leaving in area codes 712 and 915
>
> I want to use bolts (not trident). I've been reading about in-bolt caching
> to hold the looked up values but I am not sure how to utilize it in this
> context and I am also not sure how a database join would work in this
> context. Does someone have an example dealing with a similar use case?
>
> thanks,
> Clay
>
>

Re: join and in-bolt caching

Posted by clay teahouse <cl...@gmail.com>.
Hello All,
I'd appreciate your input/pointers regarding my post on join and in-blot
caching.

thanks,
Clay

On Tue, Nov 11, 2014 at 5:09 AM, clay teahouse <cl...@gmail.com>
wrote:

> Hello All,
> I need to
> 1) Look up some values from a source and cache them in a bolt
> 2) Filter a second stream based on the looked up values in (1).
>
> Example:
> 1) Area Codes = 712, 915 -- these area codes might change from time to time
> 2) People living in different addresses
>
> Emit: People leaving in area codes 712 and 915
>
> I want to use bolts (not trident). I've been reading about in-bolt caching
> to hold the looked up values but I am not sure how to utilize it in this
> context and I am also not sure how a database join would work in this
> context. Does someone have an example dealing with a similar use case?
>
> thanks,
> Clay
>
>