use of com.alibaba.otter.canal.client.adapter.phoenix.PhoenixAdapter in project canal by alibaba.
the class Common method init.
public static PhoenixAdapter init() {
DatasourceConfig.DATA_SOURCES.put("defaultDS", TestConstant.dataSource);
OuterAdapterConfig outerAdapterConfig = new OuterAdapterConfig();
outerAdapterConfig.setName("phoenix");
outerAdapterConfig.setKey("phoenix");
Map<String, String> properties = new HashMap<>();
properties.put("jdbc.driverClassName", "org.apache.phoenix.jdbc.PhoenixDriver");
properties.put("jdbc.url", "jdbc:phoenix:zookeeper01,zookeeper02,zookeeper03:2181:/hbase/db");
outerAdapterConfig.setProperties(properties);
PhoenixAdapter adapter = new PhoenixAdapter();
adapter.init(outerAdapterConfig, null);
return adapter;
}
Aggregations