You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Bill Graham (JIRA)" <ji...@apache.org> on 2012/08/10 00:35:19 UTC

[jira] [Commented] (PIG-2866) PigServer fails with macros without a script file

    [ https://issues.apache.org/jira/browse/PIG-2866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432241#comment-13432241 ] 

Bill Graham commented on PIG-2866:
----------------------------------

The job fails with an exception like this:
{noformat}
Caused by: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Can not create a Path from a null string
	at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1595)
	at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1534)
	at org.apache.pig.PigServer.registerQuery(PigServer.java:516)
	at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:990)
	at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:412)
	at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:193)
	at org.apache.pig.PigServer.registerScript(PigServer.java:590)
	at org.apache.pig.PigServer.registerScript(PigServer.java:555)
Caused by: java.lang.IllegalArgumentException: Can not create a Path from a null string
	at org.apache.hadoop.fs.Path.checkPathArg(Path.java:78)
	at org.apache.hadoop.fs.Path.<init>(Path.java:90)
	at org.apache.pig.impl.io.FileLocalizer.fetchFilesInternal(FileLocalizer.java:766)
	at org.apache.pig.impl.io.FileLocalizer.fetchFile(FileLocalizer.java:733)
	at org.apache.pig.parser.QueryParserDriver.getMacroFile(QueryParserDriver.java:350)
	at org.apache.pig.parser.QueryParserDriver.makeMacroDef(QueryParserDriver.java:406)
	at org.apache.pig.parser.QueryParserDriver.expandMacro(QueryParserDriver.java:268)
	at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:169)
	at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1587)
{noformat}
                
> PigServer fails with macros without a script file
> -------------------------------------------------
>
>                 Key: PIG-2866
>                 URL: https://issues.apache.org/jira/browse/PIG-2866
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Bill Graham
>            Assignee: Bill Graham
>
> Making a call to {{PigServer.registerQuery}} with an {{InputStream}} will fail if the script contains a macro. This is because {{QueryParserDriver.makeMacroDef}} requires a filename. {{QueryParserDriver.makeMacroDef}} should be changed to not assume that the script input is from a file.

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