Support Questions
Find answers, ask questions, and share your expertise

Call MapReduce from Local a web app

New Contributor

Hi,

I have a web app deploy in my localhost. Also I have a hortonworks sandbox in Virtualbox into my pc(same pc which I have deploy my web app).

I have a problem of concept and I'm not able to find the solution. In all tutorials people run mapreduce .jar putting it in the hdfs system an then run it with from command line with "hadoop yarn .... program.jar", etc.

But I want execute it from outside the cluster. It is possible have a external program of the cluster that can run a mapreduce program? I mean, I have a web app locate in my computer and a hortonworks sandbox with the hadoop installation. I want have my mapreduce program out of the sandbox and execute it from the web app. It is possible?

Thanks for help

2 REPLIES 2

Hi @BRivas garriv,

You can run a mapreduce program with:

${hadoop_home}/bin/hadoop jar ${your_program_jar_file} ${main_class_of_jar}

You could trigger this by having the hadoop client on your pc, or via ssh:

ssh foo@example.org '/path/to/bin/hadoop jar etc..'

If that works, next step is to have your server side language execute this ssh command when desired.

New Contributor

Hi, thanks for answer me, but what I want is execute the mapreduce from an external web app from the sandbox. I dont want execute this from a CLI.