开发者社区> 问答> 正文

canal 过滤的表达式 Expression is too large.

Caused by: com.alibaba.otter.canal.filter.exception.CanalFilterException: org.apache.oro.text.regex.MalformedPatternException: Expression is too large. Caused by: org.apache.oro.text.regex.MalformedPatternException: Expression is too large. at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source) at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source) at com.alibaba.otter.canal.filter.PatternUtils$1.apply(PatternUtils.java:30) at com.alibaba.otter.canal.filter.PatternUtils$1.apply(PatternUtils.java:25) at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:356) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:182) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:151) at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:67) at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:885) at com.alibaba.otter.canal.filter.PatternUtils.getPattern(PatternUtils.java:41) at com.alibaba.otter.canal.filter.aviater.RegexFunction.call(RegexFunction.java:24) at Script_1540529734651_0.execute0(Unknown Source) at com.googlecode.aviator.ClassExpression.execute(ClassExpression.java:53) at com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter.filter(AviaterRegexFilter.java:74) at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEventForTableMeta(LogEventConvert.java:456) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$SimpleParserStage.onEvent(MysqlMultiStageCoprocessor.java:247) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor$SimpleParserStage.onEvent(MysqlMultiStageCoprocessor.java:222) at com.lmax.disruptor.BatchEventProcessor.processEvents(BatchEventProcessor.java:168) at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

这个问题很奇怪,我后面再执行的话,没有问题了。

原提问者GitHub用户suhuaguo

展开
收起
Java工程师 2023-05-08 18:04:20 137 0
1 条回答
写回答
取消 提交回答
  • 在使用分库分表的时候,需要注意下:字符串不能太长。

    很有可能你的字符串 ,在里面的正则表达式里面,产生的字符太多了,超过 3w + 。你看看,正则表达式是不是你想要的结果

    原回答者GitHub用户suhuaguo

    2023-05-09 18:52:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载