You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Vincent Barat <vb...@capptain.com> on 2012/09/10 19:15:08 UTC

pig.import.search.path not working in 0.10.0

Hi,

I've a very simple script that try to import a PIG file:

set pig.import.search.path '/tmp'
import 'event.pig';

Even if the file /tmp/event.pig exists, it cannot be found.

It seems that the function getImportScriptAsReader that deals with the
  is not even called

This is all the traces I get from the pig shell and in the log file

2012-09-05 12:32:36,194 [main] INFO  org.apache.pig.Main - Apache 
Pig version 0.10.0-SNAPSHOT (rexported) compiled sept. 05 2012, 12:22:39
2012-09-05 12:32:36,195 [main] INFO  org.apache.pig.Main - Logging 
error messages to: /Users/vbarat/pig_1346841156192.log
2012-09-05 12:32:36.295 java[62538:1903] Unable to load realm info 
from SCDynamicStore
2012-09-05 12:32:36,452 [main] INFO 
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - 
Connecting to hadoop file system at: file:///
2012-09-05 12:32:36,623 [main] ERROR 
org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. 
Unable to fetch macro file 'event.pig'

Here is the log file.

================================================================================
Pig Stack Trace
---------------
ERROR 1000: Error during parsing. Unable to fetch macro file 'event.pig'

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: 
Error during parsing. Unable to fetch macro file 'event.pig'
     at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1597)
     at 
org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1540)
     at org.apache.pig.PigServer.registerQuery(PigServer.java:540)
     at 
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:970)
     at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
     at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
     at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
     at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
     at org.apache.pig.Main.run(Main.java:430)
         at org.apache.pig.Main.main(Main.java:111)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.RuntimeException: Unable to fetch macro file 
'event.pig'
         at 
org.apache.pig.parser.QueryParserDriver.getMacroFile(QueryParserDriver.java:354)
         at 
org.apache.pig.parser.QueryParserDriver.macroImport(QueryParserDriver.java:442)
         at 
org.apache.pig.parser.QueryParserDriver.expandImport(QueryParserDriver.java:313)
         at 
org.apache.pig.parser.QueryParserDriver.expandMacro(QueryParserDriver.java:252)
         at 
org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:169)
         at 
org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1589)
     ... 14 more
Caused by: java.io.FileNotFoundException: File event.pig does not exist.
     at 
org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:397)
     at 
org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251)
     at 
org.apache.pig.impl.io.FileLocalizer.fetchFilesInternal(FileLocalizer.java:793)
     at 
org.apache.pig.impl.io.FileLocalizer.fetchFile(FileLocalizer.java:737)
     at 
org.apache.pig.parser.QueryParserDriver.getMacroFile(QueryParserDriver.java:350)
     ... 19 more
================================================================================



-- 
*Vincent Barat*
*CTO
* logo
*Contact info *
vbarat@capptain.com <mailto:vbarat@capptain.com%20>
www.capptain.com <http://www.capptain.com>
Cell: +33 6 15 41 15 18 	
	*Rennes Office *
Office: +33 2 99 65 69 13
10 rue Jean-Marie Duhamel
35000 Rennes
France 	
	*Paris Office *
Office: +33 1 84 06 13 85
Fax: +33 9 57 72 20 18
18 rue Tronchet
75008 Paris
France

IMPORTANT NOTICE – UBIKOD and CAPPTAIN are registered trademarks of 
UBIKOD S.A.R.L., all copyrights are reserved. The contents of this 
email and attachments are confidential and may be subject to legal 
privilege and/or protected by copyright. Copying or communicating 
any part of it to others is prohibited and may be unlawful. If you 
are not the intended recipient you must not use, copy, distribute or 
rely on this email and should please return it immediately or notify 
us by telephone. At present the integrity of email across the 
Internet cannot be guaranteed. Therefore UBIKOD S.A.R.L. will not 
accept liability for any claims arising as a result of the use of 
this medium for transmissions by or to UBIKOD S.A.R.L.. UBIKOD 
S.A.R.L. may exercise any of its rights under relevant law, to 
monitor the content of all electronic communications. You should 
therefore be aware that this communication and any responses might 
have been monitored, and may be accessed by UBIKOD S.A.R.L. The 
views expressed in this document are that of the individual and may 
not necessarily constitute or imply its endorsement or 
recommendation by UBIKOD S.A.R.L. The content of this electronic 
mail may be subject to the confidentiality terms of a 
"Non-Disclosure Agreement" (NDA).

Re: pig.import.search.path not working in 0.10.0

Posted by Cheolsoo Park <ch...@cloudera.com>.
Hi,

Can you please try the patch for PIG-2729? I believe that that fixes the
issue.

Thanks,
Cheolsoo


On Mon, Sep 10, 2012 at 10:15 AM, Vincent Barat <vb...@capptain.com> wrote:

>  Hi,
>
> I've a very simple script that try to import a PIG file:
>
> set pig.import.search.path '/tmp'
> import 'event.pig';
>
> Even if the file /tmp/event.pig exists, it cannot be found.
>
> It seems that the function getImportScriptAsReader that deals with the
>  is not even called
>
> This is all the traces I get from the pig shell and in the log file
>
> 2012-09-05 12:32:36,194 [main] INFO  org.apache.pig.Main - Apache Pig
> version 0.10.0-SNAPSHOT (rexported) compiled sept. 05 2012, 12:22:39
> 2012-09-05 12:32:36,195 [main] INFO  org.apache.pig.Main - Logging error
> messages to: /Users/vbarat/pig_1346841156192.log
> 2012-09-05 12:32:36.295 java[62538:1903] Unable to load realm info from
> SCDynamicStore
> 2012-09-05 12:32:36,452 [main] INFO
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting
> to hadoop file system at: file:///
> 2012-09-05 12:32:36,623 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1000: Error during parsing. Unable to fetch macro file 'event.pig'
>
> Here is the log file.
>
>
> ================================================================================
> Pig Stack Trace
> ---------------
> ERROR 1000: Error during parsing. Unable to fetch macro file 'event.pig'
>
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error
> during parsing. Unable to fetch macro file 'event.pig'
>     at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1597)
>     at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1540)
>     at org.apache.pig.PigServer.registerQuery(PigServer.java:540)
>     at
> org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:970)
>     at
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
>     at
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:189)
>     at
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:165)
>     at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
>     at org.apache.pig.Main.run(Main.java:430)
>         at org.apache.pig.Main.main(Main.java:111)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.RuntimeException: Unable to fetch macro file
> 'event.pig'
>         at
> org.apache.pig.parser.QueryParserDriver.getMacroFile(QueryParserDriver.java:354)
>         at
> org.apache.pig.parser.QueryParserDriver.macroImport(QueryParserDriver.java:442)
>         at
> org.apache.pig.parser.QueryParserDriver.expandImport(QueryParserDriver.java:313)
>         at
> org.apache.pig.parser.QueryParserDriver.expandMacro(QueryParserDriver.java:252)
>         at
> org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:169)
>         at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1589)
>     ... 14 more
> Caused by: java.io.FileNotFoundException: File event.pig does not exist.
>     at
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:397)
>     at
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:251)
>     at
> org.apache.pig.impl.io.FileLocalizer.fetchFilesInternal(FileLocalizer.java:793)
>     at
> org.apache.pig.impl.io.FileLocalizer.fetchFile(FileLocalizer.java:737)
>     at
> org.apache.pig.parser.QueryParserDriver.getMacroFile(QueryParserDriver.java:350)
>     ... 19 more
>
> ================================================================================
>
>
>
> --
> *Vincent Barat*
>  * CTO
> *  [image: logo]
>    * Contact info *
>  vbarat@capptain.com <vbarat@capptain.com%20>
>  www.capptain.com
>  Cell: +33 6 15 41 15 18
>   * Rennes Office *
>  Office: +33 2 99 65 69 13
> 10 rue Jean-Marie Duhamel
> 35000 Rennes
> France
>   * Paris Office *
>  Office: +33 1 84 06 13 85
>  Fax: +33 9 57 72 20 18
> 18 rue Tronchet
> 75008 Paris
> France
>  IMPORTANT NOTICE – UBIKOD and CAPPTAIN are registered trademarks of
> UBIKOD S.A.R.L., all copyrights are reserved. The contents of this email
> and attachments are confidential and may be subject to legal privilege
> and/or protected by copyright. Copying or communicating any part of it to
> others is prohibited and may be unlawful. If you are not the intended
> recipient you must not use, copy, distribute or rely on this email and
> should please return it immediately or notify us by telephone. At present
> the integrity of email across the Internet cannot be guaranteed. Therefore
> UBIKOD S.A.R.L. will not accept liability for any claims arising as a
> result of the use of this medium for transmissions by or to UBIKOD
> S.A.R.L.. UBIKOD S.A.R.L. may exercise any of its rights under relevant
> law, to monitor the content of all electronic communications. You should
> therefore be aware that this communication and any responses might have
> been monitored, and may be accessed by UBIKOD S.A.R.L. The views expressed
> in this document are that of the individual and may not necessarily
> constitute or imply its endorsement or recommendation by UBIKOD S.A.R.L.
> The content of this electronic mail may be subject to the confidentiality
> terms of a "Non-Disclosure Agreement" (NDA).
>