Added partitioning encoder and custom mapper.