use of com.alibaba.otter.canal.client.adapter.es6x.ES6xAdapter in project canal by alibaba.
the class Common method init.
public static ES6xAdapter init() {
DatasourceConfig.DATA_SOURCES.put("defaultDS", TestConstant.dataSource);
OuterAdapterConfig outerAdapterConfig = new OuterAdapterConfig();
outerAdapterConfig.setName("es");
outerAdapterConfig.setHosts(TestConstant.esHosts);
Map<String, String> properties = new HashMap<>();
properties.put("cluster.name", TestConstant.clusterName);
outerAdapterConfig.setProperties(properties);
ES6xAdapter esAdapter = new ES6xAdapter();
esAdapter.init(outerAdapterConfig, null);
return esAdapter;
}
Aggregations