[ https://issues.apache.org/jira/browse/PIG-5246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055961#comment-16055961 ]
Rohini Palaniswamy commented on PIG-5246: ----------------------------------------- bq. My concern is why pig would need $SPARK_HOME/jars to the pig classpath You need to have spark jars in classpath to run pig. This is similar to picking hadoop jars from HADOOP_HOME during runtime. We do not use the bundled hadoop/spark or tez jars to run and always use the user provided installation which may be Spark 1.x or 2.x. The dependencies specified in ivy.xml are only used during compile time as Liyun mentioned. bq. It doesn't bring any benefit including performance. You can cherry pick jars to include in the classpath, but it is not going to make much difference. If a new jar is added in a new version, then it will actually be a problem and pig will have to be updated to include that jar. > Modify bin/pig about SPARK_HOME, SPARK_ASSEMBLY_JAR after upgrading spark to 2 > ------------------------------------------------------------------------------ > > Key: PIG-5246 > URL: https://issues.apache.org/jira/browse/PIG-5246 > Project: Pig > Issue Type: Bug > Reporter: liyunzhang_intel > Assignee: liyunzhang_intel > Attachments: HBase9498.patch, PIG-5246.1.patch, PIG-5246_2.patch, > PIG-5246.patch > > > in bin/pig. > we copy assembly jar to pig's classpath in spark1.6. > {code} > # For spark mode: > # Please specify SPARK_HOME first so that we can locate > $SPARK_HOME/lib/spark-assembly*.jar, > # we will add spark-assembly*.jar to the classpath. > if [ "$isSparkMode" == "true" ]; then > if [ -z "$SPARK_HOME" ]; then > echo "Error: SPARK_HOME is not set!" > exit 1 > fi > # Please specify SPARK_JAR which is the hdfs path of spark-assembly*.jar > to allow YARN to cache spark-assembly*.jar on nodes so that it doesn't need > to be distributed each time an application runs. > if [ -z "$SPARK_JAR" ]; then > echo "Error: SPARK_JAR is not set, SPARK_JAR stands for the hdfs > location of spark-assembly*.jar. This allows YARN to cache > spark-assembly*.jar on nodes so that it doesn't need to be distributed each > time an application runs." > exit 1 > fi > if [ -n "$SPARK_HOME" ]; then > echo "Using Spark Home: " ${SPARK_HOME} > SPARK_ASSEMBLY_JAR=`ls ${SPARK_HOME}/lib/spark-assembly*` > CLASSPATH=${CLASSPATH}:$SPARK_ASSEMBLY_JAR > fi > fi > {code} > after upgrade to spark2.0, we may modify it -- This message was sent by Atlassian JIRA (v6.4.14#64029)