Using hashCode for partitioning