Bug 6288 - Consider a beforeStep/afterStep-equivalent that runs on a partition thread.
Consider a beforeStep/afterStep-equivalent that runs on a partition thread.
Status: NEW
Product: jbatch
Classification: Unclassified
Component: SPEC
1
PC Windows
: P5 enhancement
: ---
Assigned To: ScottKurz
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-30 14:03 UTC by ScottKurz
Modified: 2014-09-19 02:23 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ScottKurz 2014-07-30 14:03:27 UTC
It is a noticeable asymmetry between partitioned and non-partition steps that there is no equivalent to beforeStep/afterStep on the partition thread.

True, the ChunkListener runs on the partition thread, but you don't have a clear way without inventing one to know it's the last chunk.   True, the PartitionAnalyzer runs at the end of the partition, but that's back on the main thread. 

Would be curious to hear other opinions on whether this would be desirable for a future release.
Comment 1 m_edgar 2014-09-19 02:23:58 UTC
I agree with your comments. The closest fit, as you say, is the ChunkListener. It requires some extra coding to know that it is the final chunk and overall doesn't feel as clean as a PartitionListener (or extended StepListener) interface would.

That leaves partitioned batchlet steps without any before/after listener options at all. Of course it could be coded/called directly from each batchlet, but I think the listener approach is cleaner.