"compile only"
PigServer/PigUnit requires params substitution. To be more specific,
to compile a java app "javac" don't need to know the internals of the
app.

"registering dependencies"
Same case with dependencies as well. By copy-pasting & hard-coding
libraries into the script introduces new set of problems during
version upgrade of any library. In java world, no one wants to
hardcode jar names inside a java file.

Hope, this clarifies my requirement.

On Sun, Apr 27, 2014 at 4:29 AM, Jay Vyas <jayunit...@gmail.com> wrote:
> Ah, I guess from the "pig maven integration" subject heading i assumed you
> wanted tight maven integration of your pig scripts.  In any case, here is
> what i was suggesting.
>
> 1) How can we just *compile (compile only)* pig scripts?
>
> See
> https://github.com/apache/bigtop/blob/master/bigtop-bigpetstore/src/main/java/org/apache/bigtop/bigpetstore/etl/PigCSVCleaner.java.
>  That class will run a pig script for by creating an instance of the
> "PigServer" object.  This allows you to craft your own pig tests in java
> that can validate your data flow and pig script in a java app.
> Alternatively, use PigUnit to test your pig script.  Again, although these
> do more than compilation, the effect is essentially the same:  They
> validate your script without running in a real cluster.
>
> 2) Also, what is the clean way to handle library dependencies of a Pig
> script?
>
> Sorry, about this, I thought by the subject "pig maven integration" you
> were referring to the various dependencies you need in a maven project to
> run pig code with real API calls.  For that, you can paste the pom
> dependencies .
>
> If you mean external libraries, just use the pig "register" command in your
> pig script.

Reply via email to