You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by steven zhuang <zh...@gmail.com> on 2010/01/09 10:54:19 UTC
How can I run a executable file from streaming.
hi, list,
Now I have a perl streaming script, in the perl streaming script
I need to call a tool compiled from C++ code, the tool will read input from
a file and output something into another file.
I have uploaded the tool(one single ELF binary file) using the
"-file" option, in the code I wrote something like:
system("./tool"); #this turned out not work.
But it didn't work, and there is no error message.
After that I modified the code into:
"system("cd ~ && mkdir test123");"
And no directory was created under the hadoop user's home
directory.
Any suggestions? Thanks!
--
best wishes.
steven
Re: How can I run a executable file from streaming.
Posted by Amogh Vasekar <am...@yahoo-inc.com>.
Hi,
You said there is no error message, so I would assume your script was shipped and launched successfully by your perl file. Can you confirm if the error is not encountered in your c++ code / anything else is logged on the web UI?
Also, you might want to check stream.non.zero.exit.status.is.failure is set to true ( default value ).
For the mkdir, I think hadoop wont allow you to tinker with that directory for security reasons. You may try the same for mapred.working.dir .
Thanks,
Amogh
On 1/9/10 3:24 PM, "steven zhuang" <zh...@gmail.com> wrote:
hi, list,
Now I have a perl streaming script, in the perl streaming script
I need to call a tool compiled from C++ code, the tool will read input from
a file and output something into another file.
I have uploaded the tool(one single ELF binary file) using the
"-file" option, in the code I wrote something like:
system("./tool"); #this turned out not work.
But it didn't work, and there is no error message.
After that I modified the code into:
"system("cd ~ && mkdir test123");"
And no directory was created under the hadoop user's home
directory.
Any suggestions? Thanks!
--
best wishes.
steven