Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 46AE8200CAC for ; Mon, 5 Jun 2017 04:00:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 45842160BE3; Mon, 5 Jun 2017 02:00:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 65383160BE0 for ; Mon, 5 Jun 2017 04:00:15 +0200 (CEST) Received: (qmail 74046 invoked by uid 500); 5 Jun 2017 02:00:14 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 74035 invoked by uid 500); 5 Jun 2017 02:00:14 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 74032 invoked by uid 99); 5 Jun 2017 02:00:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2017 02:00:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1B86D180314 for ; Mon, 5 Jun 2017 02:00:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.702 X-Spam-Level: X-Spam-Status: No, score=-98.702 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id jml22MG_7eXg for ; Mon, 5 Jun 2017 02:00:12 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E23DB60CD9 for ; Mon, 5 Jun 2017 02:00:11 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DC8F7E00D4 for ; Mon, 5 Jun 2017 02:00:10 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B2B412193C for ; Mon, 5 Jun 2017 02:00:09 +0000 (UTC) Date: Mon, 5 Jun 2017 02:00:09 +0000 (UTC) From: "liyunzhang_intel (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (PIG-5246) Modify bin/pig about SPARK_HOME, SPARK_ASSEMBLY_JAR after upgrading spark to 2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 05 Jun 2017 02:00:16 -0000 [ https://issues.apache.org/jira/browse/PIG-5246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16036459#comment-16036459 ] liyunzhang_intel edited comment on PIG-5246 at 6/5/17 1:59 AM: --------------------------------------------------------------- [~rohini]: thanks for suggestion, for spark1 and spark2, it will be done by checking for spark-assembly.jar or other things in the script and user need not specify the version of spark. bq. For eg: In Spark JobMetricsListener will redirect to JobMetricsListenerSpark1 or JobMetricsListenerSpark2. But for users it makes it very simple as they can use same pig installation to run against any version. It will be convenient for users in that way but not sure whether there is conflicts if both jars of spark1 and spark2 in the pig classpath. [~zjffdu]: bq. Actually SPARK_ASSEMBLY_JAR is not a must-have thing for spark. If SPARK_ASSEMBLY_JAR is not a must-have thing for spark1, how to judge spark1 or spark2? bq.IMO, pig don't need to specify that, it is supposed to be set in spark-defaults.conf which would apply to all spark apps. Pig on Spark use spark installation and will copy $SPARK_HOME/lib/spark-assembly*jar(spark1) and $SPARK_HOME/jars/*jar to the classpath of pig. But we don't read spark-defaults.conf. We parse pig.properties and save the configuration about spark to [SparkContext|https://github.com/apache/pig/blob/trunk/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java#L584]. was (Author: kellyzly): [~rohini]: thanks for suggestion, for spark1 and spark2, it will be done by checking for spark-assembly.jar or other things in the script and user need not specify the version of spark. bq. For eg: In Spark JobMetricsListener will redirect to JobMetricsListenerSpark1 or JobMetricsListenerSpark2. But for users it makes it very simple as they can use same pig installation to run against any version. It will be convenient for users in that way but not sure whether there is conflicts if both jars of spark1 and spark2 in the pig classpath. [~zjffdu]: bq. Actually SPARK_ASSEMBLY_JAR is not a must-have thing for spark. If SPARK_ASSEMBLY_JAR is not a must-have thing for spark1, how to judge spark1 or spark2? bq.IMO, pig don't need to specify that, it is supposed to be set in spark-defaults.conf which would apply to all spark apps. Pig on Spark use spark installation and will copy $SPARK_HOME/lib/spark-assembly*jar(spark1) and $SPARK_HOME/jars/*jar to the classpath of pig. But we don't read spark-defaults.conf. We parse pig.properties and save the configuration about spark to [SparkContext|https://github.com/apache/pig/blob/trunk/src/org/apache/pig/backend/hadoop/executionengine/spark/SparkLauncher.java#L584]. > 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.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.3.15#6346)