task

package com.hgx.test.process;

import com.hgx.test.common.GetProperties;

/**
* config file read
* 报名
* @author sasou <admin@php-gene.com> web:http://www.php-gene.com/
* @version 1.0.0
*/
public final class task {

public static void main(String[] args) {
// init
new GetProperties();
if (GetProperties.canal.destination == null) {
System.out.println("error:canal destination is null!");
return;
}
int num = GetProperties.canal.destination.length;

if (num > 0) {
for (int i = 0; i < num; i++) {
System.out.println(GetProperties.canal.destination[i]);
System.out.println(GetProperties.canal.ip);
if (!"".equals(GetProperties.canal.destination[i])) {
String type = GetProperties.target.get(GetProperties.canal.destination[i]).type;
switch (type) {
case "kafka":
new Thread(new Kafkatest(GetProperties.canal.destination[i])).start();
break;
/* case "redis":
new Thread(new Redis(GetProperties.canal.destination[i])).start();
break;
case "elasticsearch":
new Thread(new ElasticSearch(GetProperties.canal.destination[i])).start();
break;*/
default:
System.out.println("error:not support type!");
break;
}

}
}
}
}

}
posted @ 2018-12-18 09:55  何国秀_xue  阅读(175)  评论(0编辑  收藏  举报