Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
In mapreduce, if PARALLEL clause was specified on UNION it was ignored as it was a map operation and split size was used. In Tez, when union optimizer is turned off it is a reduce side operation and we should let user control parallelism instead of relying on just auto-parallelism. This is specifically useful when user needs to control the number of output files.
data = UNION A, B, C, D, E, F, G, H, I, J;
store data;
In the above case instead of manually controlling parallelism of A to J aliases to achieve desired parallelism the UNION clause can specify the desired parallelism using PARALLEL. i.e
data = UNION A, B, C, D, E, F, G, H, I, J PARALLEL 50;
This only works today if we set pig.tez.opt.union=false. We should automatically and selectively turn off union optimization for those unions that have PARALLEL clause.