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 pig.import.search.path property is not even called (cf. stack trace below).

Any idea ?

This is for pig 0.10.0

Thanks

----------

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
================================================================================


Reply via email to