heap
heap

Reputation: 53

pig UDF using external java libraries

I wrote UDF that uses some external libraries as jackson-databird etc...how can I specify where should pig looks for these external libraries?

Thanks

Upvotes: 0

Views: 175

Answers (2)

rahulbmv
rahulbmv

Reputation: 724

You can specify the additional Jars using the syntax -

pig -Dpig.additional.jars="xxx.jar:yyy.jar" -f script.pig

having a jar with dependencies might cause problems incase the packaged dependencies and the cluster installed dependencies are not compatible. This will also make your program future proof, i would assume.

Upvotes: 1

kecso
kecso

Reputation: 2485

What if you compile all your dependencies to a single fat jar?

Upvotes: 1

Related Questions