There is a class called JobClient. You can run jobs using these class from java app. Also hadoop jar adds $HADOOP_HOME/conf/hadoop-site.xml and $HADOOP_HOME/conf/hadoop-conf.xml xml to classpath, so JobClient already knows which jobtracker and FS should be used for running map process.

So when you are running hadoop jobs inside other application you should take care of setting valid properties for jobtracker address, FS address and etc. You can set it manually or use Configuratio.addResource for adding $HADOOP_HOME/conf/hadoop-conf.xml and $HADOOP_HOME/conf/hadoop- site.xml .

On Aug 27, 2009, at 1:06 PM, radar.sxl wrote:


When run a hadoop project jar, We'll use
$ bin/hadoop jar ***.jar
but if I hava a java app, i want to run mapreduce job inside it use hadoop
cluster, is three anyway?
--
View this message in context: 
http://www.nabble.com/How-running-hadoop-without-command-line--tp25167322p25167322.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


---
Vladimir Klimontovich,
skype: klimontovich
GoogleTalk/Jabber: klimontov...@gmail.com
Cell phone: +7926 890 2349

Reply via email to