This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Hadoop and the fly likes Executing script from Hadoop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Hadoop
Bookmark "Executing script from Hadoop" Watch "Executing script from Hadoop" New topic
Author

Executing script from Hadoop

Madhumitha Baskaran
Ranch Hand

Joined: Feb 27, 2010
Posts: 66
I have a requirement in hadoop and I am not able to get it right. I have to execute a UNIX script inside hadoop program and whatever is being echoed by UNIX scripts should be obtained in the hadoop program as output from Unix script. How will it be possible?

In ordinary JAVA program, I am able to execute JAVA program and get the output of unix script. But same is not working in hadoop. Can you please help?
Alex Holmes
Author
Greenhorn

Joined: Oct 19, 2012
Posts: 21
Take a look at Hadoop Streaming: http://wiki.apache.org/hadoop/HadoopStreaming

It will allow you to use UNIX scripts in combination with MapReduce. Input records are supplied to stdin of your scripts, and output records are collected from stdout.


Author, Hadoop in Practice, http://www.manning.com/holmes/
Blog at http://grepalex.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executing script from Hadoop
 
Similar Threads
issue when calling shell script from java
How to run unix command using Java
chmod command executing fine but sh command not executing the script in remote server.
difference between ./sh and . ./sample.sh
handling Java child process execution