简体   繁体   English

如何从Java执行Pig脚本

[英]How to execute pig script from java

How to execute pig script from java class. 如何从Java类执行Pig脚本。 I have installed pig on linux system and my java application on windows system. 我已经在Linux系统上安装了Pig,在Windows系统上安装了Java应用程序。 Thanks 谢谢

You have two options basically. 您基本上有两个选择。

1) Execute spawn shell subprocess via Java API and handover Script to it. 1)通过Java API执行spawn shell子进程并向其移交脚本。

2) Use Embedded pig Script. 2)使用嵌入式Pig脚本。 (I would prefer this one. as it gives good control over variables needed for operations.) (我更喜欢这一点。因为它可以很好地控制操作所需的变量。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM