Details
Description
It seems that pig launcher script needs to replicate a lot of hadoop launcher script functionality if it wants to set things like java library path and classpath just right. Currently users are burdened with the need to do it manually even when all the appropriate setting are available for Hadoop. For instance, in order for the following to succeed, Pig has to be explicitly told about lzo libs (PIG_OPTS="$PIG_OPTS -Djava.library.path=..path..to.hadoop..native..libs"
E = LOAD 'foo.txt.lzo' USING PigStorage() as (a:int); DUMP E;
The suggestion is to follow the trend set by Hive and use hadoop launcher script instead of Java. If the Hadoop launcher script is not available we can alway fall back on the default behavior.