I have a pig script like this :
--Load data, process it and store to two outputs
Pig does not guarantee the order of command execution in the above script i.e. the "store" "sh rm...", "fs -getmerge ..." and "fs -rmr ..." will not be executed in the written order.
Pig guarantees that "fs" commands and pig "store" commands will be executed in sequence. But "sh" commands will get executed before anything else (in normal multi-query mode) because "sh" commands are executed when the parser sees them. They go through a different code path within Pig. This behavior needs to be changed.