Java Code Examples for com.alibaba.otter.canal.instance.manager.model.Canal#getCanalParameter()

The following examples show how to use com.alibaba.otter.canal.instance.manager.model.Canal#getCanalParameter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CanalInstanceWithManager.java    From canal-1.1.3 with Apache License 2.0 5 votes vote down vote up
public CanalInstanceWithManager(Canal canal, String filter){
    this.parameters = canal.getCanalParameter();
    this.canalId = canal.getId();
    this.destination = canal.getName();
    this.filter = filter;

    logger.info("init CanalInstance for {}-{} with parameters:{}", canalId, destination, parameters);
    // 初始化报警机制
    initAlarmHandler();
    // 初始化metaManager
    initMetaManager();
    // 初始化eventStore
    initEventStore();
    // 初始化eventSink
    initEventSink();
    // 初始化eventParser;
    initEventParser();

    // 基础工具,需要提前start,会有先订阅再根据filter条件启动parse的需求
    if (!alarmHandler.isStart()) {
        alarmHandler.start();
    }

    if (!metaManager.isStart()) {
        metaManager.start();
    }
    logger.info("init successful....");
}
 
Example 2
Source File: CanalInstanceWithManager.java    From canal with Apache License 2.0 5 votes vote down vote up
public CanalInstanceWithManager(Canal canal, String filter){
    this.parameters = canal.getCanalParameter();
    this.canalId = canal.getId();
    this.destination = canal.getName();
    this.filter = filter;

    logger.info("init CanalInstance for {}-{} with parameters:{}", canalId, destination, parameters);
    // 初始化报警机制
    initAlarmHandler();
    // 初始化metaManager
    initMetaManager();
    // 初始化eventStore
    initEventStore();
    // 初始化eventSink
    initEventSink();
    // 初始化eventParser;
    initEventParser();

    // 基础工具,需要提前start,会有先订阅再根据filter条件启动parse的需求
    if (!alarmHandler.isStart()) {
        alarmHandler.start();
    }

    if (!metaManager.isStart()) {
        metaManager.start();
    }
    logger.info("init successful....");
}