Search code examples
shellenvironment-variablesapache-pig

How to set PIG_HEAPSIZE value in a shell script triggering a pig job


Also what can be the maximum value set for this. Please let me know any preconditions that I need to consider while setting this flag.

Thanks!


Solution

  • I configured the the value "PIG_HEAPSIZE=6144" just before the pig script as in the below:

    PIG_HEAPSIZE=6144 pig \
        -logfile ${pig_log_file} \
        -p ENV=${etl_env} \
        -p OUTPUT_PATH=${pad_output_dir}  \
        ${pig_script} >> $log_file 2>&1;
    

    And it worked!