public void testMapperWithProperties() throws Exception {
handler.setPartitionMapper(new PartitionMapper() {
@Override
public PartitionPlan mapPartitions() throws Exception {
PartitionPlan plan = new PartitionPlanImpl();
Properties [] props = new Properties[2];
props[0] = new Properties();
props[0].put("key1", "value1");
props[1] = new Properties();
props[1].put("key1", "value2");
plan.setPartitionProperties(props);
plan.setPartitions(3);
plan.setThreads(1);
return plan;
}
});
handler.afterPropertiesSet();