@Override public List<Map<String,String>> taskConfigs(int maxTasks){
  ArrayList<Map<String,String>> configs=new ArrayList<>();
  List<String> dbs=Arrays.asList(databases.split(","));
  int numGroups=Math.min(dbs.size(),maxTasks);
  List<List<String>> dbsGrouped=ConnectorUtils.groupPartitions(dbs,numGroups);
  for (int i=0; i < numGroups; i++) {
    Map<String,String> config=new HashMap<>();
    config.put(PORT,port);
    config.put(HOST,host);
    config.put(SCHEMA_NAME,schemaName);
    config.put(BATCH_SIZE,batchSize);
    config.put(TOPIC_PREFIX,topicPrefix);
    config.put(DATABASES,StringUtils.join(dbsGrouped.get(i),","));
    configs.add(config);
  }
  return configs;
}

@ Override public List < Map < String , String > > taskConfigs ( int maxTasks ) { ArrayList < Map < String , String > > configs = new ArrayList < > ( ) ; List < String > dbs = Arrays . asList ( databases . split ( "," ) ) ; int numGroups = Math . min ( dbs . size ( ) , maxTasks ) ; List < List < String > > dbsGrouped = ConnectorUtils . groupPartitions ( dbs , numGroups ) ; for ( int i = 0 ; i < numGroups ; i ++ ) { Map < String , String > config = new HashMap < > ( ) ; config . put ( PORT , port ) ; config . put ( HOST , host ) ; config . put ( SCHEMA_NAME , schemaName ) ; config . put ( BATCH_SIZE , batchSize ) ; config . put ( TOPIC_PREFIX , topicPrefix ) ; config . put ( DATABASES , StringUtils . join ( dbsGrouped . get ( i ) , "," ) ) ; configs . add ( config ) ; } return configs ; }
returns a set of configuration for the task based on the current configuration .
