Bhavesh Shah
Bhavesh Shah

Reputation: 3389

How to execute multiple PIG scripts parallely‏?

I have multiple PIG Script with and currently I am executing it in sequential manner using command pig -x mapreduce /path/to/Script/Script1.pig && /path/to/Script/Script2.pig && /path/to/Script/Script3.pig

Now I am looking for executing those scripts in parallel to improve the performance as all are independent of each other. I tried to search for it but not getting exactly.

So is there any way through which I can execute all PIG scripts parallely?

Upvotes: 0

Views: 940

Answers (2)

reo katoa
reo katoa

Reputation: 5801

#!/bin/bash

pig -x mapreduce /path/to/Script/Script1.pig &
pig -x mapreduce /path/to/Script/Script2.pig &
pig -x mapreduce /path/to/Script/Script3.pig &

wait
echo "Done!"

Upvotes: 3

Sudhir N
Sudhir N

Reputation: 4096

You should be able to use Apache Oozie http://oozie.apache.org/

Upvotes: 0

Related Questions