You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oozie.apache.org by Tim Chan <ti...@chan.net> on 2013/03/03 02:56:52 UTC

java.lang.OutOfMemoryError: Java heap space, during Pig action

How do I increase Java heap memory for my Pig action?

-- 
[image: Monkey]  Tim Chan   //  tim@chan.net   //   213.784.2523

Re: java.lang.OutOfMemoryError: Java heap space, during Pig action

Posted by Eduardo Afonso Ferreira <ea...@yahoo.com>.
Hey, Tim,

You can pass Java opts to the pig action as done in the example below.
The example sets the Max Java Heap Size for the launcher job (200MB) and to Mappers and Reducers launched by the Pig action (both to 500MB). You can experiment with your scripts and decide what's the best values to use.

<workflow-app xmlns="uri:oozie:workflow:0.1" name="your-workflow">
    <start to="pig-node"/>
    <action name="pig-node">
        <pig>
            <job-tracker>${JOB_TRACKER}</job-tracker>
            <name-node>${NAME_NODE}</name-node>
            <configuration>
                <property>

                    <name>oozie.launcher.mapred.map.child.java.opts</name>
                    <value>-Xmx200m</value>
                </property>
                <property>
                    <name>mapred.map.child.java.opts</name>
                    <value>-Xmx500m</value>
                </property>
                <property>
                    <name>mapred.reduce.child.java.opts</name>
                    <value>-Xmx500m</value>
                </property>
            </configuration>

            <script>your_pig_script.pig</script>
        </pig>

        <ok to="end" />

        <error to="fail"/>
    </action>

    <kill name="fail">
        <message>Pig failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>

Eduardo.



________________________________
 From: Tim Chan <ti...@chan.net>
To: oozie-users@incubator.apache.org 
Sent: Saturday, March 2, 2013 8:56 PM
Subject: java.lang.OutOfMemoryError: Java heap space, during Pig action
 
How do I increase Java heap memory for my Pig action?

-- 
[image: Monkey]  Tim Chan   //  tim@chan.net   //   213.784.2523