com.alibaba.otter.canal.filter.exception.CanalFilterException Java Examples
The following examples show how to use
com.alibaba.otter.canal.filter.exception.CanalFilterException.
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: AviaterRegexFilter.java From canal-1.1.3 with Apache License 2.0 | 5 votes |
public boolean filter(String filtered) throws CanalFilterException { if (StringUtils.isEmpty(pattern)) { return defaultEmptyValue; } if (StringUtils.isEmpty(filtered)) { return defaultEmptyValue; } Map<String, Object> env = new HashMap<String, Object>(); env.put("pattern", pattern); env.put("target", filtered.toLowerCase()); return (Boolean) exp.execute(env); }
Example #2
Source File: AviaterSimpleFilter.java From canal-1.1.3 with Apache License 2.0 | 5 votes |
public boolean filter(String filtered) throws CanalFilterException { if (list.isEmpty()) { return true; } if (StringUtils.isEmpty(filtered)) { return true; } Map<String, Object> env = new HashMap<String, Object>(); env.put("list", list); env.put("target", filtered.toLowerCase()); return (Boolean) exp.execute(env); }
Example #3
Source File: AviaterELFilter.java From canal-1.1.3 with Apache License 2.0 | 5 votes |
public boolean filter(CanalEntry.Entry entry) throws CanalFilterException { if (StringUtils.isEmpty(expression)) { return true; } Map<String, Object> env = new HashMap<String, Object>(); env.put(ROOT_KEY, entry); return (Boolean) AviatorEvaluator.execute(expression, env); }
Example #4
Source File: PatternUtils.java From jlogstash-input-plugin with Apache License 2.0 | 5 votes |
@Override public Pattern apply(String pattern) { try { PatternCompiler pc = new Perl5Compiler(); return pc.compile(pattern, Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.SINGLELINE_MASK); } catch (MalformedPatternException e) { throw new CanalFilterException(e); } }
Example #5
Source File: AviaterRegexFilter.java From canal with Apache License 2.0 | 5 votes |
public boolean filter(String filtered) throws CanalFilterException { if (StringUtils.isEmpty(pattern)) { return defaultEmptyValue; } if (StringUtils.isEmpty(filtered)) { return defaultEmptyValue; } Map<String, Object> env = new HashMap<String, Object>(); env.put("pattern", pattern); env.put("target", filtered.toLowerCase()); return (Boolean) exp.execute(env); }
Example #6
Source File: AviaterSimpleFilter.java From canal with Apache License 2.0 | 5 votes |
public boolean filter(String filtered) throws CanalFilterException { if (list.isEmpty()) { return true; } if (StringUtils.isEmpty(filtered)) { return true; } Map<String, Object> env = new HashMap<String, Object>(); env.put("list", list); env.put("target", filtered.toLowerCase()); return (Boolean) exp.execute(env); }
Example #7
Source File: AviaterELFilter.java From canal with Apache License 2.0 | 5 votes |
public boolean filter(CanalEntry.Entry entry) throws CanalFilterException { if (StringUtils.isEmpty(expression)) { return true; } Map<String, Object> env = new HashMap<String, Object>(); env.put(ROOT_KEY, entry); return (Boolean) AviatorEvaluator.execute(expression, env); }
Example #8
Source File: CanalEventFilter.java From canal-1.1.3 with Apache License 2.0 | votes |
boolean filter(T event) throws CanalFilterException;
Example #9
Source File: CanalEventFilter.java From canal with Apache License 2.0 | votes |
boolean filter(T event) throws CanalFilterException;