serialize HashPartitioner and RoundRobinPartitioner