mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #1032 , support raw config
This commit is contained in:
@@ -147,6 +147,7 @@ public class CanalInstanceWithManager extends AbstractCanalInstance {
|
||||
memoryEventStore.setBufferMemUnit(parameters.getMemoryStorageBufferMemUnit());
|
||||
memoryEventStore.setBatchMode(BatchMode.valueOf(parameters.getStorageBatchMode().name()));
|
||||
memoryEventStore.setDdlIsolation(parameters.getDdlIsolation());
|
||||
memoryEventStore.setRaw(parameters.getMemoryStorageRawEntry());
|
||||
eventStore = memoryEventStore;
|
||||
} else if (mode.isFile()) {
|
||||
// 后续版本支持
|
||||
|
||||
@@ -39,6 +39,7 @@ public class CanalParameter implements Serializable {
|
||||
private BatchMode storageBatchMode = BatchMode.MEMSIZE; // 基于大小返回结果
|
||||
private Integer memoryStorageBufferSize = 16 * 1024; // 内存存储的buffer大小
|
||||
private Integer memoryStorageBufferMemUnit = 1024; // 内存存储的buffer内存占用单位,默认为1kb
|
||||
private Boolean memoryStorageRawEntry = Boolean.TRUE; // 内存存储的对象是否启用raw的ByteString模式
|
||||
private String fileStorageDirectory; // 文件存储的目录位置
|
||||
private Integer fileStorageStoreCount; // 每个文件store存储的记录数
|
||||
private Integer fileStorageRollverCount; // store文件的个数
|
||||
@@ -955,6 +956,14 @@ public class CanalParameter implements Serializable {
|
||||
this.gtidEnable = gtidEnable;
|
||||
}
|
||||
|
||||
public Boolean getMemoryStorageRawEntry() {
|
||||
return memoryStorageRawEntry;
|
||||
}
|
||||
|
||||
public void setMemoryStorageRawEntry(Boolean memoryStorageRawEntry) {
|
||||
this.memoryStorageRawEntry = memoryStorageRawEntry;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, CanalToStringStyle.DEFAULT_STYLE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user