Description
We serialize POStore too early in the JobControlCompiler. At that time, storeFunc have unconstraint link to other operator; in the worst case, it will chain the whole physical plan. Also, in multi-store case, POStore has link to its data source, which is not needed and will increase the footprint of serialized POStore.
Worse, it may cause problem if we do not optimize POStore. If we have two map-reduce job, the first job need a LoadFunc from an external jar. The first job will ship the jar to backend but the second job will not. However, since POStore of second job has a link chain to the LoadFunc of the first job, to deserialize it, we need that external jar. Since we do not ship the external jar for the second map-reduce job, we die in this case. So it is more than an optimization, it is also a bug fix.