Reputation: 470
When I run a mapreduce job using hadoop command, I use -libjars to setup my jar to the cache and the classpath. How to do something like this in PIG?
Upvotes: 11
Views: 17586
Reputation: 2971
An extension to zsxwing's answer.
You can also specify multiple jar paths as
pig -Dpig.additional.jars="/local/path/1/*:/local/path/2/*"
Upvotes: 3
Reputation: 20826
There are two ways to add external jars to Pig environment.
Use "-Dpig.additional.jars" to start Pig
pig -Dpig.additional.jars=/local/path/to/your.jar
Use "register" command in Pig scripts or grunt
register /local/path/to/your.jar;
You can use any one according to your requirement.
Upvotes: 19