Search in sources :

Example 6 with AviaterRegexFilter

use of com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter in project canal by alibaba.

the class MutliAviaterFilterTest method doRegexTest.

private void doRegexTest() {
    AviaterRegexFilter filter3 = new AviaterRegexFilter("otter2.otter_stability1|otter1.otter_stability1|" + RandomStringUtils.randomAlphabetic(200));
    boolean result = filter3.filter("otter1.otter_stability1");
    Assert.assertEquals(true, result);
    result = filter3.filter("otter2.otter_stability1");
    Assert.assertEquals(true, result);
}
Also used : AviaterRegexFilter(com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter)

Aggregations

AviaterRegexFilter (com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter)6 CanalEventParser (com.alibaba.otter.canal.parse.CanalEventParser)2 AbstractEventParser (com.alibaba.otter.canal.parse.inbound.AbstractEventParser)2 Test (org.junit.Test)2 CanalException (com.alibaba.otter.canal.common.CanalException)1 CanalHAController (com.alibaba.otter.canal.parse.ha.CanalHAController)1 GroupEventParser (com.alibaba.otter.canal.parse.inbound.group.GroupEventParser)1 LocalBinlogEventParser (com.alibaba.otter.canal.parse.inbound.mysql.LocalBinlogEventParser)1 MysqlEventParser (com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser)1 LogEventConvert (com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert)1 AuthenticationInfo (com.alibaba.otter.canal.parse.support.AuthenticationInfo)1 EntryPosition (com.alibaba.otter.canal.protocol.position.EntryPosition)1