如何在 Cloudera 的 Hadoop+Pig 发行版中编译 UDF
我正在运行 Cloudera 的 VM (CH3)。我在文本编辑器中复制了一个简单的 UDF,但我不知道如何编译它以便能够在脚本中调用它。 Pig UDF 手册 http://pig.apache.org/docs/r0.7.0 /udf.html 表示构建 Pig.jar,但是 SVN 的链接已损坏: svn co <a href="http://svn.apache.org/repos/asf/hadoop/pig/trunk" rel="nofollow">http://svn.apache.org/repos/asf/hadoop/pig/trunk。有人可以告诉我他们如何编译 UDF 吗?谢谢
I am running Cloudera's VM (CH3). I've copied a simple UDF in my text editor, but I don't know how to compile it in order to be able to call it in a script. The Pig UDF manual http://pig.apache.org/docs/r0.7.0/udf.html says to build pig.jar, however the link to SVN is broken: svn co http://svn.apache.org/repos/asf/hadoop/pig/trunk. Can somebody please walk me through how to they were able to compile a UDF? thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法是使用 Cloudera 的 Maven 存储库 ,您只需将 Pig 指定为项目中的依赖项即可。
当您构建项目时,最好使用选项 jar-with-dependencies 那么在你的脚本中使用这个 UDF 就容易多了(不再有类路径的问题)
The easiest way is to use Maven repository from Cloudera, you just specify Pig as a dependency in your project.
When you build your project it is good idea to use option jar-with-dependencies then it is much easier to use this UDF in your scripts (no more problems with classpath)