You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oozie.apache.org by Liyifan <li...@huawei.com> on 2011/12/23 09:36:35 UTC
A question about java action
I modified the example "java-main", tried to run a WordCount application on oozie. But the question is why there is 0 reduce task?
I want to modify the map and reduce task by using the workflow.xml below, but it didn't work.
I'm a newbie in oozie, can anyone help? Thanks!
<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
<start to="java-node"/>
<action name="java-node">
<java>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>mapred.map.tasks</name>
<value>2</value>
</property>
<property>
<name>mapred.reduce.tasks</name>
<value>1</value>
</property>
</configuration>
<main-class>WordCount</main-class>
<arg>/user/${wf:user()}/${examplesRoot}/input-data/text</arg>
<arg>/user/${wf:user()}/output-data/outputDir001</arg>
</java>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Java failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
Re: A question about java action
Posted by tousif <to...@moonraft.com>.
you should create a map reduce node instead of java node.
2011/12/23 Liyifan <li...@huawei.com>
> I modified the example "java-main", tried to run a WordCount application
> on oozie. But the question is why there is 0 reduce task?
>
> I want to modify the map and reduce task by using the workflow.xml below,
> but it didn't work.
>
> I'm a newbie in oozie, can anyone help? Thanks!
>
>
>
> <workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf">
> <start to="java-node"/>
> <action name="java-node">
> <java>
> <job-tracker>${jobTracker}</job-tracker>
> <name-node>${nameNode}</name-node>
> <configuration>
> <property>
> <name>mapred.job.queue.name</name>
> <value>${queueName}</value>
> </property>
> <property>
> <name>mapred.map.tasks</name>
> <value>2</value>
> </property>
> <property>
> <name>mapred.reduce.tasks</name>
> <value>1</value>
> </property>
> </configuration>
> <main-class>WordCount</main-class>
> <arg>/user/${wf:user()}/${examplesRoot}/input-data/text</arg>
> <arg>/user/${wf:user()}/output-data/outputDir001</arg>
> </java>
> <ok to="end"/>
> <error to="fail"/>
> </action>
>
> <kill name="fail">
> <message>Java failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]</message>
> </kill>
> <end name="end"/>
> </workflow-app>
>
--
Regards
Tousif