Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83225C81D for ; Tue, 19 Jun 2012 08:14:47 +0000 (UTC) Received: (qmail 49581 invoked by uid 500); 19 Jun 2012 08:14:47 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 49406 invoked by uid 500); 19 Jun 2012 08:14:47 -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 49259 invoked by uid 500); 19 Jun 2012 08:14:45 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 49204 invoked by uid 99); 19 Jun 2012 08:14:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2012 08:14:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 1BA22142864 for ; Tue, 19 Jun 2012 08:14:43 +0000 (UTC) Date: Tue, 19 Jun 2012 08:14:43 +0000 (UTC) From: "Mathias Herberts (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1022409973.28846.1340093683115.JavaMail.jiratomcat@issues-vm> In-Reply-To: <802344801.24809.1340025882868.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (PIG-2760) resources added with a relative path are added to the JobXXXX jar file under their absolute path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-2760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396596#comment-13396596 ] Mathias Herberts commented on PIG-2760: --------------------------------------- Converting a relative path to an absolute one may be an issue when accessing a resource in a UDF using getResourceAsStream Previously, if we used 'REGISTER foo/bar;' in a script, you could access 'bar' by calling this.getClass().getClassLoader().getResourceAsStream('foo/bar'); in your UDF, and this would work whatever directory the pig script is run from. If converting the relative path to an absolute one (with no leading '/'), the argument to getResourceAsStream will need to be dependent on the directory from which the pig script is run, this kinds of defeat usability. > resources added with a relative path are added to the JobXXXX jar file under their absolute path > ------------------------------------------------------------------------------------------------ > > Key: PIG-2760 > URL: https://issues.apache.org/jira/browse/PIG-2760 > Project: Pig > Issue Type: Bug > Affects Versions: 0.10.0 > Reporter: Mathias Herberts > > When registering a local resource using a relative path, the resource is added to the JobXXXX jar under its absolute path. > If a pig script contains the following: > REGISTER etc/foo; > and is executed from a directory /PATH/TO/DIR, the JobXXXX jar file will contain the following: > /PATH/TO/DIR/etc/foo > instead of > etc/foo > which was the previous behavior -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira