public abstract class AbstractEventParser<EVENT> extends AbstractCanalLifeCycle implements CanalEventParser<EVENT>
| 限定符和类型 | 字段和说明 |
|---|---|
protected BinlogParser |
binlogParser |
protected java.util.concurrent.atomic.AtomicLong |
consumedEventCount |
protected java.lang.String |
destination |
protected boolean |
detectingEnable |
protected java.lang.Integer |
detectingIntervalInSeconds |
protected CanalEventFilter |
eventBlackFilter |
protected CanalEventFilter |
eventFilter |
protected CanalEventSink<java.util.List<CanalEntry.Entry>> |
eventSink |
protected java.lang.Throwable |
exception |
protected java.lang.String |
fieldBlackFilter |
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
fieldBlackFilterMap |
protected java.lang.String |
fieldFilter |
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
fieldFilterMap |
protected java.lang.Thread.UncaughtExceptionHandler |
handler |
protected java.util.TimerTask |
heartBeatTimerTask |
protected boolean |
isGTIDMode |
protected long |
lastEntryTime |
protected org.slf4j.Logger |
logger |
protected CanalLogPositionManager |
logPositionManager |
protected MultiStageCoprocessor |
multiStageCoprocessor |
protected java.util.concurrent.atomic.AtomicBoolean |
needTransactionPosition |
protected boolean |
parallel |
protected int |
parallelBufferSize |
protected java.lang.Integer |
parallelThreadSize |
protected java.util.concurrent.atomic.AtomicLong |
parsedEventCount |
protected ParserExceptionHandler |
parserExceptionHandler |
protected java.lang.Thread |
parseThread |
protected long |
parsingInterval |
protected long |
processingInterval |
protected java.util.concurrent.atomic.AtomicBoolean |
profilingEnabled |
protected java.util.concurrent.atomic.AtomicLong |
receivedEventCount |
protected AuthenticationInfo |
runningInfo |
protected long |
serverId |
protected java.util.Timer |
timer |
protected EventTransactionBuffer |
transactionBuffer |
protected int |
transactionSize |
running| 构造器和说明 |
|---|
AbstractEventParser() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterDump(ErosaConnection connection) |
protected abstract ErosaConnection |
buildErosaConnection() |
protected java.util.TimerTask |
buildHeartBeatTimeTask(ErosaConnection connection) |
protected LogPosition |
buildLastPosition(CanalEntry.Entry entry) |
protected LogPosition |
buildLastTransactionPosition(java.util.List<CanalEntry.Entry> entries) |
protected abstract MultiStageCoprocessor |
buildMultiStageCoprocessor() |
protected abstract BinlogParser |
buildParser() |
protected boolean |
consumeTheEventAndProfilingIfNecessary(java.util.List<CanalEntry.Entry> entrys) |
protected abstract EntryPosition |
findStartPosition(ErosaConnection connection) |
CanalAlarmHandler |
getAlarmHandler() |
BinlogParser |
getBinlogParser() |
java.lang.Long |
getConsumedEventCount() |
java.lang.Throwable |
getException() |
java.lang.String |
getFieldBlackFilter() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getFieldBlackFilterMap()
获取表字段过滤规则黑名单
|
java.lang.String |
getFieldFilter() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getFieldFilterMap()
获取表字段过滤规则
|
CanalLogPositionManager |
getLogPositionManager() |
java.lang.Integer |
getParallelBufferSize() |
int |
getParallelThreadSize() |
java.lang.Long |
getParsedEventCount() |
ParserExceptionHandler |
getParserExceptionHandler() |
long |
getParsingInterval() |
long |
getProcessingInterval() |
java.lang.Boolean |
getProfilingEnabled() |
long |
getServerId() |
boolean |
isGTIDMode() |
boolean |
isParallel() |
protected CanalEntry.Entry |
parseAndProfilingIfNecessary(EVENT bod,
boolean isSeek) |
protected void |
preDump(ErosaConnection connection) |
protected void |
processDumpError(java.lang.Throwable e) |
protected void |
processSinkError(java.lang.Throwable e,
LogPosition lastPosition,
java.lang.String startBinlogFile,
java.lang.Long startPosition) |
protected boolean |
processTableMeta(EntryPosition position) |
void |
sendAlarm(java.lang.String destination,
java.lang.String msg) |
void |
setAlarmHandler(CanalAlarmHandler alarmHandler) |
void |
setBinlogParser(BinlogParser binlogParser) |
void |
setDestination(java.lang.String destination) |
void |
setDetectingEnable(boolean detectingEnable) |
void |
setDetectingIntervalInSeconds(java.lang.Integer detectingIntervalInSeconds) |
void |
setEventBlackFilter(CanalEventFilter eventBlackFilter) |
void |
setEventFilter(CanalEventFilter eventFilter) |
void |
setEventSink(CanalEventSink<java.util.List<CanalEntry.Entry>> eventSink) |
void |
setFieldBlackFilter(java.lang.String fieldBlackFilter) |
void |
setFieldFilter(java.lang.String fieldFilter) |
void |
setIsGTIDMode(boolean isGTIDMode) |
void |
setLogPositionManager(CanalLogPositionManager logPositionManager) |
void |
setParallel(boolean parallel) |
void |
setParallelBufferSize(int parallelBufferSize) |
void |
setParallelThreadSize(java.lang.Integer parallelThreadSize) |
void |
setParserExceptionHandler(ParserExceptionHandler parserExceptionHandler) |
void |
setProfilingEnabled(boolean profilingEnabled) |
void |
setServerId(long serverId) |
void |
setTransactionSize(int transactionSize) |
void |
start() |
protected void |
startHeartBeat(ErosaConnection connection) |
void |
stop() |
protected void |
stopHeartBeat() |
isStartclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisStartprotected final org.slf4j.Logger logger
protected CanalLogPositionManager logPositionManager
protected CanalEventSink<java.util.List<CanalEntry.Entry>> eventSink
protected CanalEventFilter eventFilter
protected CanalEventFilter eventBlackFilter
protected java.lang.String fieldFilter
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> fieldFilterMap
protected java.lang.String fieldBlackFilter
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> fieldBlackFilterMap
protected java.util.concurrent.atomic.AtomicBoolean profilingEnabled
protected java.util.concurrent.atomic.AtomicLong receivedEventCount
protected java.util.concurrent.atomic.AtomicLong parsedEventCount
protected java.util.concurrent.atomic.AtomicLong consumedEventCount
protected long parsingInterval
protected long processingInterval
protected volatile AuthenticationInfo runningInfo
protected java.lang.String destination
protected BinlogParser binlogParser
protected java.lang.Thread parseThread
protected java.lang.Thread.UncaughtExceptionHandler handler
protected EventTransactionBuffer transactionBuffer
protected int transactionSize
protected java.util.concurrent.atomic.AtomicBoolean needTransactionPosition
protected long lastEntryTime
protected volatile boolean detectingEnable
protected java.lang.Integer detectingIntervalInSeconds
protected volatile java.util.Timer timer
protected java.util.TimerTask heartBeatTimerTask
protected java.lang.Throwable exception
protected boolean isGTIDMode
protected boolean parallel
protected java.lang.Integer parallelThreadSize
protected int parallelBufferSize
protected MultiStageCoprocessor multiStageCoprocessor
protected ParserExceptionHandler parserExceptionHandler
protected long serverId
protected abstract BinlogParser buildParser()
protected abstract ErosaConnection buildErosaConnection()
protected abstract MultiStageCoprocessor buildMultiStageCoprocessor()
protected abstract EntryPosition findStartPosition(ErosaConnection connection) throws java.io.IOException
java.io.IOExceptionprotected void preDump(ErosaConnection connection)
protected boolean processTableMeta(EntryPosition position)
protected void afterDump(ErosaConnection connection)
public void sendAlarm(java.lang.String destination,
java.lang.String msg)
public void start()
start 在接口中 CanalLifeCyclestart 在类中 AbstractCanalLifeCyclepublic void stop()
stop 在接口中 CanalLifeCyclestop 在类中 AbstractCanalLifeCycleprotected boolean consumeTheEventAndProfilingIfNecessary(java.util.List<CanalEntry.Entry> entrys) throws CanalSinkException, java.lang.InterruptedException
CanalSinkExceptionjava.lang.InterruptedExceptionprotected CanalEntry.Entry parseAndProfilingIfNecessary(EVENT bod, boolean isSeek) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Boolean getProfilingEnabled()
protected LogPosition buildLastTransactionPosition(java.util.List<CanalEntry.Entry> entries)
protected LogPosition buildLastPosition(CanalEntry.Entry entry)
protected void processSinkError(java.lang.Throwable e,
LogPosition lastPosition,
java.lang.String startBinlogFile,
java.lang.Long startPosition)
protected void processDumpError(java.lang.Throwable e)
protected void startHeartBeat(ErosaConnection connection)
protected java.util.TimerTask buildHeartBeatTimeTask(ErosaConnection connection)
protected void stopHeartBeat()
public void setEventFilter(CanalEventFilter eventFilter)
public void setEventBlackFilter(CanalEventFilter eventBlackFilter)
public java.lang.Long getParsedEventCount()
public java.lang.Long getConsumedEventCount()
public void setProfilingEnabled(boolean profilingEnabled)
public long getParsingInterval()
public long getProcessingInterval()
public void setEventSink(CanalEventSink<java.util.List<CanalEntry.Entry>> eventSink)
public void setDestination(java.lang.String destination)
public void setBinlogParser(BinlogParser binlogParser)
public BinlogParser getBinlogParser()
public void setAlarmHandler(CanalAlarmHandler alarmHandler)
public CanalAlarmHandler getAlarmHandler()
public void setLogPositionManager(CanalLogPositionManager logPositionManager)
public void setTransactionSize(int transactionSize)
public CanalLogPositionManager getLogPositionManager()
public void setDetectingEnable(boolean detectingEnable)
public void setDetectingIntervalInSeconds(java.lang.Integer detectingIntervalInSeconds)
public java.lang.Throwable getException()
public boolean isGTIDMode()
public void setIsGTIDMode(boolean isGTIDMode)
public boolean isParallel()
public void setParallel(boolean parallel)
public int getParallelThreadSize()
public void setParallelThreadSize(java.lang.Integer parallelThreadSize)
public java.lang.Integer getParallelBufferSize()
public void setParallelBufferSize(int parallelBufferSize)
public ParserExceptionHandler getParserExceptionHandler()
public void setParserExceptionHandler(ParserExceptionHandler parserExceptionHandler)
public long getServerId()
public void setServerId(long serverId)
public java.lang.String getFieldFilter()
public void setFieldFilter(java.lang.String fieldFilter)
public java.lang.String getFieldBlackFilter()
public void setFieldBlackFilter(java.lang.String fieldBlackFilter)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getFieldFilterMap()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getFieldBlackFilterMap()
Copyright © 2019. All rights reserved.