mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
optimize gtid
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package com.alibaba.otter.canal.parse.driver.mysql.packets;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* 类 MariaGTIDSet.java 的实现
|
||||
*
|
||||
@@ -13,8 +13,9 @@ import java.util.Map;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class MariaGTIDSet implements GTIDSet {
|
||||
|
||||
//MariaDB 10.0.2+ representation of Gtid
|
||||
Map<Long, MariaGtid> gtidMap = new HashMap<>();
|
||||
private Map<Long, MariaGtid> gtidMap = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public byte[] encode() throws IOException {
|
||||
|
||||
@@ -15,7 +15,8 @@ public class GtidUtil {
|
||||
public static GTIDSet parseGtidSet(String gtid, boolean isMariaDB) {
|
||||
if (isMariaDB) {
|
||||
return MariaGTIDSet.parse(gtid);
|
||||
} else {
|
||||
return MysqlGTIDSet.parse(gtid);
|
||||
}
|
||||
return MysqlGTIDSet.parse(gtid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user