Using a custom partitioner to reduce shuffle