Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> PigServer vs PigRunner

Copy link to this message
PigServer vs PigRunner

I find myself needing to run a pig script iteratively from within a java
program. Since I'm writing the data to a db (Cassandra) I can't (as far
as I can tell) use PigServer's store method. Instead I'm using
registerScript to launch my script. This works swimmingly but for one
catch; how do I get access to the status of the launched job? When an
iteration fails I need to stop execution. How can I do this if I have no
handle to the running job?
It looks like it's possible to use PigRunner instead since it returns an
ExecJob object. What I'm confused about there though is the ability to
register jars. Is there a simple example of using PigRunner that
demonstrates this?