Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-5246

Modify bin/pig about SPARK_HOME, SPARK_ASSEMBLY_JAR after upgrading spark to 2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      in bin/pig.
      we copy assembly jar to pig's classpath in spark1.6.

      # 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
      
      

      after upgrade to spark2.0, we may modify it

      Attachments

        1. PIG-5246.patch
          3 kB
          liyunzhang
        2. PIG-5246.3.patch
          2 kB
          liyunzhang
        3. PIG-5246.1.patch
          3 kB
          liyunzhang
        4. PIG-5246_4.patch
          3 kB
          liyunzhang
        5. PIG-5246_2.patch
          3 kB
          liyunzhang
        6. HBase9498.patch
          180 kB
          Rohini Palaniswamy

        Activity

          People

            kellyzly liyunzhang
            kellyzly liyunzhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: