mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
format code
This commit is contained in:
@@ -480,13 +480,13 @@ public class MysqlConnection implements ErosaConnection {
|
||||
}
|
||||
|
||||
/**
|
||||
* MASTER_HEARTBEAT_PERIOD sets the interval in seconds between
|
||||
* replication heartbeats. Whenever the master's binary log is updated
|
||||
* with an event, the waiting period for the next heartbeat is reset.
|
||||
* interval is a decimal value having the range 0 to 4294967 seconds and
|
||||
* a resolution in milliseconds; the smallest nonzero value is 0.001.
|
||||
* Heartbeats are sent by the master only if there are no unsent events
|
||||
* in the binary log file for a period longer than interval.
|
||||
* MASTER_HEARTBEAT_PERIOD sets the interval in seconds between replication
|
||||
* heartbeats. Whenever the master's binary log is updated with an event, the
|
||||
* waiting period for the next heartbeat is reset. interval is a decimal value
|
||||
* having the range 0 to 4294967 seconds and a resolution in milliseconds; the
|
||||
* smallest nonzero value is 0.001. Heartbeats are sent by the master only if
|
||||
* there are no unsent events in the binary log file for a period longer than
|
||||
* interval.
|
||||
*/
|
||||
try {
|
||||
long periodNano = TimeUnit.SECONDS.toNanos(MASTER_HEARTBEAT_PERIOD_SECONDS);
|
||||
@@ -509,7 +509,8 @@ public class MysqlConnection implements ErosaConnection {
|
||||
|
||||
List<String> columnValues = rs.getFieldValues();
|
||||
if (columnValues == null || columnValues.size() != 2) {
|
||||
logger.warn("unexpected binlog format query result, this may cause unexpected result, so throw exception to request network to io shutdown.");
|
||||
logger.warn(
|
||||
"unexpected binlog format query result, this may cause unexpected result, so throw exception to request network to io shutdown.");
|
||||
throw new IllegalStateException("unexpected binlog format query result:" + rs.getFieldValues());
|
||||
}
|
||||
|
||||
@@ -578,10 +579,9 @@ public class MysqlConnection implements ErosaConnection {
|
||||
rs = query("select @@version_comment");
|
||||
List<String> columnValues = rs.getFieldValues();
|
||||
if (columnValues != null && columnValues.size() >= 1 && columnValues.get(0) != null) {
|
||||
logger.warn("--> loadVersionComment(), select @@version_comment : " + columnValues.get(0));
|
||||
logger.warn("load MySQL @@version_comment : " + columnValues.get(0));
|
||||
if (StringUtils.containsIgnoreCase(columnValues.get(0), "Percona")) {
|
||||
compatiablePercona = true;
|
||||
logger.warn("--> loadVersionComment(), set compatiablePercona = true");
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
||||
Reference in New Issue
Block a user