Anil, I agree with you that the check you refer to is problematic. In fact, it seems to be a cover for faulty behavior from the binarySearch() method which baffled me for about 6 hours last night. In short, when testing my mapper in MrUnit, the binarySearch() method does not return the proper index in most cases. The same mapper works fine on the actual cluster. It almost seems like someone put that secondary check in there because they didn't trust the output of the binarySearch() method. I would suppose they saw it operating in a faulty manner and decided it would be better to return null than to return the wrong KV.
It is bad code. I have kludged up my code to overcome it by re-implementing getValue(), getColumnLatest(), and binarySearch() (as a simple linear search, not caring about performance in my unit test). _________________ Dev9 Eric Minor On-site at Classmates.com Software Consultant CLASSMATES 333 Elliott Ave. West, Suite 500 Seattle, WA 98119 253.970.3724 mobile
