支持用户自定义的CanalAlarmHandler (#1736)

* 支持用户自定义的CanalAlarmHandler

* RowsLogEvent增加对TableMapLogEvent判空检查,防止NPE异常
This commit is contained in:
dataccs
2019-04-24 09:56:32 +08:00
committed by agapple
parent 2b738f4e04
commit 3165cb9640
6 changed files with 61 additions and 4 deletions

View File

@@ -1,29 +0,0 @@
package com.alibaba.otter.canal.parse.exception;
import com.alibaba.otter.canal.common.CanalException;
public class TableIdNotFoundException extends CanalException {
private static final long serialVersionUID = -7288830284122672209L;
public TableIdNotFoundException(String errorCode){
super(errorCode);
}
public TableIdNotFoundException(String errorCode, Throwable cause){
super(errorCode, cause);
}
public TableIdNotFoundException(String errorCode, String errorDesc){
super(errorCode + ":" + errorDesc);
}
public TableIdNotFoundException(String errorCode, String errorDesc, Throwable cause){
super(errorCode + ":" + errorDesc, cause);
}
public TableIdNotFoundException(Throwable cause){
super(cause);
}
}

View File

@@ -23,7 +23,7 @@ import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet;
import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet;
import com.alibaba.otter.canal.parse.exception.CanalParseException;
import com.alibaba.otter.canal.parse.exception.PositionNotFoundException;
import com.alibaba.otter.canal.parse.exception.TableIdNotFoundException;
import com.taobao.tddl.dbsync.binlog.exception.TableIdNotFoundException;
import com.alibaba.otter.canal.parse.inbound.EventTransactionBuffer.TransactionFlushCallback;
import com.alibaba.otter.canal.parse.inbound.mysql.MysqlMultiStageCoprocessor;
import com.alibaba.otter.canal.parse.index.CanalLogPositionManager;

View File

@@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;
import com.alibaba.otter.canal.common.AbstractCanalLifeCycle;
import com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter;
import com.alibaba.otter.canal.parse.exception.CanalParseException;
import com.alibaba.otter.canal.parse.exception.TableIdNotFoundException;
import com.taobao.tddl.dbsync.binlog.exception.TableIdNotFoundException;
import com.alibaba.otter.canal.parse.inbound.BinlogParser;
import com.alibaba.otter.canal.parse.inbound.TableMeta;
import com.alibaba.otter.canal.parse.inbound.TableMeta.FieldMeta;