How to find partition number in reducer