Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
We reinitialize UDFContext ThreadLocal itself in PigProcessor.initialize(). PigProcessor.initialize() is run in parallel with threads that do MRInput.initialize() and MROutput.initialize(). It can overwrite the initialized values in the input and output half way through. This can lead to exceptions if the property stored in UDFContext is mandatory and task will be retried which is ok. If it is not mandatory and it ends up getting null when it actually had a value, wrong data can be produced silently.