Bugzilla – Bug 4182
The transient user data in a Job Context needs to be cloneable or serializable.
Last modified: 2013-01-16 23:02:17 UTC
When we invoke parallel steps in a job, the parent job's context is partially copied to the parallel steps; specifically the job properties and the transient user data. Since each thread has it's own copy of the job context the transient data in the context needs to be either cloneable or serializable so we are able to make a proper copy of it.
java.util.Properties is already cloneable/serializable. I do not think transient data should be copied. The transient data is intended to have strictly thread local behavior.
If it's supposed to be thread local behavior then I wonder if we need to say more about the "main" thread. Are step1 and step2 guaranteed to run on the same thread? What if step1 is followed by split2 which is followed by step3, are steps 1 and 3 guaranteed to run on the same threads?
I think it would be valid to leave this undefined if that is your intention, but just trying to get you to commit to it in writing if you are assuming there will be a single thread in these cases.
Nope: there will be no requirement that a job's steps execute on the same thread. The transient area visibility is limited to a single step in a single job execution. If the step is partitioned, the visibility is limited to each partition. No sharing across threads; between partitions; or across job executions.