Netflix/Lipstick — pull request #29 by MarkRoddy (2013-09-24 21:31:57+00:00)
Title: Walk inheritance tree when dynamically grabbing attributes

This modifies the reflection approach used to grab mapStores and reduceStores when sampling job output.

Background: We're working on getting pig trunk/0.12 up and running on our systems. There has been a change to the JobStats class hierarchy for Tez, and it looks like there's going to need to be a wrapper classes. We're experimenting with one currently, but this broke output sampling since getDeclaredField() only returns the field if the instances is of the class that declared the field (ie it doesn't work with subclasses).

This pull request makes output sampling work with JobStats subclasses by traversing the inheritance hierarchy to find the desired field.