Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> ParseException when using PigServer.registerScript against a file that has a %declare directive


Copy link to this message
-
RE: ParseException when using PigServer.registerScript against a file that has a %declare directive
Yes, parameter substitution is implemented as a preprocessor that
rewrites the script before passing it to PigServer.

Olga

-----Original Message-----
From: Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 06, 2010 8:56 AM
To: [EMAIL PROTECTED]
Subject: ParseException when using PigServer.registerScript against a
file that has a %declare directive

Hi,

We are trying to test a pig script using JUnit and the PigServer. This
pig
script uses parameters. It works great running it through the pig
command
line, but the registerScript function blows with a ParseException on
both
the %declare and %default directives.

org.apache.pig.tools.pigscript.parser.ParseException: Encountered "
<PATH>
"%declare "" at line 2, column 1.
Was expecting one of:
    <EOF>
    "cat" ...
    "cd" ...
    "cp" ...
...
Am I doing something wrong?

Thanks,
Christian