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 A48E9200B82 for ; Fri, 2 Sep 2016 07:48:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A3615160ACA; Fri, 2 Sep 2016 05:48:22 +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 F3589160AB5 for ; Fri, 2 Sep 2016 07:48:21 +0200 (CEST) Received: (qmail 35945 invoked by uid 500); 2 Sep 2016 05:48:20 -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 35921 invoked by uid 500); 2 Sep 2016 05:48:20 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 35911 invoked by uid 99); 2 Sep 2016 05:48:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2016 05:48:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A682A2C1B79 for ; Fri, 2 Sep 2016 05:48:20 +0000 (UTC) Date: Fri, 2 Sep 2016 05:48:20 +0000 (UTC) From: "liyunzhang_intel (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PIG-4920) Fail to use Javascript UDF in spark yarn client mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Sep 2016 05:48:22 -0000 [ https://issues.apache.org/jira/browse/PIG-4920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] liyunzhang_intel updated PIG-4920: ---------------------------------- Attachment: (was: PIG-4920_4.patch) > Fail to use Javascript UDF in spark yarn client mode > ---------------------------------------------------- > > Key: PIG-4920 > URL: https://issues.apache.org/jira/browse/PIG-4920 > Project: Pig > Issue Type: Sub-task > Components: spark > Reporter: liyunzhang_intel > Fix For: spark-branch > > Attachments: PIG-4920.patch, PIG-4920_2.patch, PIG-4920_3.patch, PIG-4920_4.patch > > > udf.pig > {code} > register '/home/zly/prj/oss/merge.pig/pig/bin/udf.js' using javascript as myfuncs; > A = load './passwd' as (a0:chararray, a1:chararray); > B = foreach A generate myfuncs.helloworld(); > store B into './udf.out'; > {code} > udf.js > {code} > helloworld.outputSchema = "word:chararray"; > function helloworld() { > return 'Hello, World'; > } > > complex.outputSchema = "word:chararray"; > function complex(word){ > return {word:word}; > } > {code} > run udf.pig in spark local mode(export SPARK_MASTER="local"), it successfully. > run udf.pig in spark yarn client mode(export SPARK_MASTER="yarn-client"), it fails and error message like following: > {noformat} > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:408) > at org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:744) > ... 84 more > Caused by: java.lang.ExceptionInInitializerError > at org.apache.pig.scripting.js.JsScriptEngine.getInstance(JsScriptEngine.java:87) > at org.apache.pig.scripting.js.JsFunction.(JsFunction.java:173) > ... 89 more > Caused by: java.lang.IllegalStateException: could not get script path from UDFContext > at org.apache.pig.scripting.js.JsScriptEngine$Holder.(JsScriptEngine.java:69) > ... 91 more > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)