Search in sources :

Example 1 with FindFilterEvent

use of com.alibaba.otter.shared.communication.model.canal.FindFilterEvent in project otter by alibaba.

the class CanalConfigClient method findFilter.

/**
     * 根据对应的destinantion查询filter信息
     */
public String findFilter(String destination) {
    FindFilterEvent event = new FindFilterEvent();
    event.setDestination(destination);
    try {
        Object obj = delegate.callManager(event);
        if (obj != null && obj instanceof String) {
            return (String) obj;
        } else {
            throw new CanalException("No Such Canal by [" + destination + "]");
        }
    } catch (Exception e) {
        throw new CanalException("call_manager_error", e);
    }
}
Also used : FindFilterEvent(com.alibaba.otter.shared.communication.model.canal.FindFilterEvent) CanalException(com.alibaba.otter.canal.common.CanalException) CanalException(com.alibaba.otter.canal.common.CanalException)

Aggregations

CanalException (com.alibaba.otter.canal.common.CanalException)1 FindFilterEvent (com.alibaba.otter.shared.communication.model.canal.FindFilterEvent)1