public class MysqlEventParser extends AbstractMysqlEventParser implements CanalEventParser, CanalHASwitchable
1. 自身不控制mysql主备切换,由ha机制来控制. 比如接入tddl/cobar/自身心跳包成功率 2. 切换机制
| 限定符和类型 | 字段和说明 |
|---|---|
protected AuthenticationInfo |
masterInfo |
protected EntryPosition |
masterPosition |
protected AuthenticationInfo |
standbyInfo |
protected EntryPosition |
standbyPosition |
BINLOG_START_OFFEST, connectionCharset, connectionCharsetNumber, enableTsdb, filterQueryDcl, filterQueryDdl, filterQueryDml, filterRows, filterTableError, receivedBinlogBytes, tableMetaTSDB, tableMetaTSDBFactory, tsdbSnapshotExpire, tsdbSnapshotInterval, tsdbSpringXml, useDruidDdlFilterbinlogParser, consumedEventCount, destination, detectingEnable, detectingIntervalInSeconds, eventBlackFilter, eventFilter, eventSink, exception, fieldBlackFilter, fieldBlackFilterMap, fieldFilter, fieldFilterMap, handler, heartBeatTimerTask, isGTIDMode, lastEntryTime, logger, logPositionManager, multiStageCoprocessor, needTransactionPosition, parallel, parallelBufferSize, parallelThreadSize, parsedEventCount, parserExceptionHandler, parseThread, parsingInterval, processingInterval, profilingEnabled, receivedEventCount, runningInfo, serverId, timer, transactionBuffer, transactionSizerunning| 构造器和说明 |
|---|
MysqlEventParser() |
buildMultiStageCoprocessor, buildParser, getEventsPublishBlockingTime, getReceivedBinlogBytes, getTsdbSnapshotExpire, getTsdbSnapshotInterval, isUseDruidDdlFilter, processTableMeta, setConnectionCharset, setConnectionCharset, setConnectionCharsetNumber, setEnableTsdb, setEventBlackFilter, setEventFilter, setFieldBlackFilter, setFieldFilter, setFilterQueryDcl, setFilterQueryDdl, setFilterQueryDml, setFilterRows, setFilterTableError, setTableMetaTSDBFactory, setTsdbSnapshotExpire, setTsdbSnapshotInterval, setTsdbSpringXml, setUseDruidDdlFilterbuildLastPosition, buildLastTransactionPosition, consumeTheEventAndProfilingIfNecessary, getAlarmHandler, getBinlogParser, getConsumedEventCount, getException, getFieldBlackFilter, getFieldBlackFilterMap, getFieldFilter, getFieldFilterMap, getLogPositionManager, getParallelBufferSize, getParallelThreadSize, getParsedEventCount, getParserExceptionHandler, getParsingInterval, getProcessingInterval, getProfilingEnabled, getServerId, isGTIDMode, isParallel, parseAndProfilingIfNecessary, processSinkError, sendAlarm, setAlarmHandler, setBinlogParser, setDestination, setEventSink, setIsGTIDMode, setLogPositionManager, setParallel, setParallelBufferSize, setParallelThreadSize, setParserExceptionHandler, setProfilingEnabled, setServerId, setTransactionSize, startHeartBeatisStartclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisStartprotected AuthenticationInfo masterInfo
protected AuthenticationInfo standbyInfo
protected EntryPosition masterPosition
protected EntryPosition standbyPosition
protected ErosaConnection buildErosaConnection()
buildErosaConnection 在类中 AbstractEventParserprotected void preDump(ErosaConnection connection)
preDump 在类中 AbstractEventParserprotected void afterDump(ErosaConnection connection)
afterDump 在类中 AbstractEventParserpublic void start()
throws CanalParseException
start 在接口中 CanalLifeCyclestart 在类中 AbstractMysqlEventParserCanalParseExceptionpublic void stop()
throws CanalParseException
stop 在接口中 CanalLifeCyclestop 在类中 AbstractMysqlEventParserCanalParseExceptionprotected java.util.TimerTask buildHeartBeatTimeTask(ErosaConnection connection)
protected void stopHeartBeat()
stopHeartBeat 在类中 AbstractEventParserpublic void doSwitch()
doSwitch 在接口中 CanalHASwitchablepublic void doSwitch(AuthenticationInfo newRunningInfo)
doSwitch 在接口中 CanalHASwitchableprotected EntryPosition findStartPosition(ErosaConnection connection) throws java.io.IOException
findStartPosition 在类中 AbstractEventParserjava.io.IOExceptionprotected EntryPosition findEndPosition(ErosaConnection connection) throws java.io.IOException
java.io.IOExceptionprotected EntryPosition findEndPositionWithMasterIdAndTimestamp(MysqlConnection connection)
protected EntryPosition findPositionWithMasterIdAndTimestamp(MysqlConnection connection, EntryPosition fixedPosition)
protected EntryPosition findStartPositionInternal(ErosaConnection connection)
protected void processDumpError(java.lang.Throwable e)
processDumpError 在类中 AbstractEventParserpublic void setSupportBinlogFormats(java.lang.String formatStrs)
public void setSupportBinlogImages(java.lang.String imageStrs)
public void setDefaultConnectionTimeoutInSeconds(int defaultConnectionTimeoutInSeconds)
public void setReceiveBufferSize(int receiveBufferSize)
public void setSendBufferSize(int sendBufferSize)
public void setMasterInfo(AuthenticationInfo masterInfo)
public void setStandbyInfo(AuthenticationInfo standbyInfo)
public void setMasterPosition(EntryPosition masterPosition)
public void setStandbyPosition(EntryPosition standbyPosition)
public void setSlaveId(long slaveId)
public void setDetectingSQL(java.lang.String detectingSQL)
public void setDetectingIntervalInSeconds(java.lang.Integer detectingIntervalInSeconds)
public void setDetectingEnable(boolean detectingEnable)
public void setFallbackIntervalInSeconds(int fallbackIntervalInSeconds)
public CanalHAController getHaController()
public void setHaController(CanalHAController haController)
public void setDumpErrorCountThreshold(int dumpErrorCountThreshold)
public boolean isRdsOssMode()
public void setRdsOssMode(boolean rdsOssMode)
Copyright © 2019. All rights reserved.