You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Chen Junfeng <k-...@hotmail.com> on 2016/11/14 07:13:21 UTC

How to transfer jar file using distributed cache in Storm 1.0.2

I need to transfer a jar file to all machines in Storm cluster. Distributed cache seems a good feature to complete this job. The document http://storm.apache.org/releases/1.0.2/distcache-blobstore.html doen’t indicate how to read binary file  from stored blob. Can I be provided some examples of it?

Regard,
Junfeng Chen

Re: How to transfer jar file using distributed cache in Storm 1.0.2

Posted by Jungtaek Lim <ka...@gmail.com>.
What's your use case of transferring a jar?

If you just want to load jar to worker's classpath, '--jars' option on
upcoming Storm 1.1.0 would help. It provides transferring jars and load
them to workers' classpath.
If you don't want to load jar to worker's classpath, or need dynamic
loading or classpath isolation, you still need to handle distributed cache.
BlobStore API provides InputStream so you can get it (Please refer 'Reading
a blob') and it's just same as reading binary from InputStream (binary
file, socket data, etc).

Hope this helps.

Thanks,
Jungtaek Lim (HeartSaVioR)

2016년 11월 14일 (월) 오후 4:14, Chen Junfeng <k-...@hotmail.com>님이 작성:

> I need to transfer a jar file to all machines in Storm cluster.
> Distributed cache seems a good feature to complete this job. The document
> http://storm.apache.org/releases/1.0.2/distcache-blobstore.html doen’t
> indicate how to read binary file  from stored blob. Can I be provided some
> examples of it?
>
>
>
> Regard,
>
> Junfeng Chen
>