how to include external jar file using PIG

前端 未结 3 2039
北海茫月
北海茫月 2020-12-17 18:53

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?

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 19:33

    There are two ways to add external jars to Pig environment.

    1. Use "-Dpig.additional.jars" to start Pig

      pig -Dpig.additional.jars=/local/path/to/your.jar

    2. Use "register" command in Pig scripts or grunt

      register /local/path/to/your.jar;

    You can use any one according to your requirement.

提交回复
热议问题