storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Merritt <merritt.a...@gmail.com>
Subject Re: ShellSpout Cannot Execute Arbitrary Command
Date Fri, 04 Jul 2014 23:53:46 GMT
In ShellProcess.java, method launch, this line seems to cause the
IOException:

builder.directory(new File(context.getCodeDir()));

The path it is attempting to use is
"/tmp/c86c165a-762b-42aa-8238-ea291f14c577/supervisor/stormdist/stitcher-1-1404517781/resources"
(my topology name is 'stitcher') and does NOT exist. It is not true that
ShellProcess is unable to find the command as I originally suspected.

Investigating further, it seems that when I package my class files into a
jar for submission to storm, I must include a 'resources' directory; this
seems to remove the IOException thrown.

I have not found any documentation stating this must be done. I am not
using maven in my workflow; I am manually compiling the class files and
packaging them into a jar file. Perhaps that is the reason?

-Alex


On Thu, Jul 3, 2014 at 2:02 PM, Alex Merritt <merritt.alex@gmail.com> wrote:

> Hello,
>
> I'm creating a simple topology and invoke the superclass constructor for
> ShellSpout in its constructor by passing in an array of String, such as
> {"/bin/ls"}. When executing the topology locally, the code returns an
> IOException stating it cannot find the command. I've tried relative,
> absolute paths, other commands, etc. I wrote a stand-alone code which uses
> ProcessBuilder outside of Storm and it works as expected. Any ideas what is
> going on here?
>
> Using Ubuntu Linux 64-bit, Storm 0.9.2 and java version 7 from Oracle.
>
> Thanks,
> Alex
>

Mime
View raw message