mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
rds binlog 下载支持
This commit is contained in:
@@ -32,7 +32,7 @@ public class MysqlConnector {
|
||||
private String password;
|
||||
|
||||
private byte charsetNumber = 33;
|
||||
private String defaultSchema = "retl";
|
||||
private String defaultSchema = "test";
|
||||
private int soTimeout = 30 * 1000;
|
||||
private int connTimeout = 5 * 1000;
|
||||
private int receiveBufferSize = 16 * 1024;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BinlogDumpCommandPacket extends CommandPacket {
|
||||
// 1. write 4 bytes bin-log position to start at
|
||||
ByteHelper.writeUnsignedIntLittleEndian(binlogPosition, out);
|
||||
// 2. write 2 bytes bin-log flags
|
||||
int binlog_flags = BINLOG_DUMP_NON_BLOCK;
|
||||
int binlog_flags = 0;
|
||||
binlog_flags |= BINLOG_SEND_ANNOTATE_ROWS_EVENT;
|
||||
out.write(binlog_flags);
|
||||
out.write(0x00);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.alibaba.otter.canal.parse.driver.mysql.socket;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@@ -24,7 +25,7 @@ public class BioSocketChannel implements SocketChannel {
|
||||
|
||||
BioSocketChannel(Socket socket) throws IOException{
|
||||
this.socket = socket;
|
||||
this.input = socket.getInputStream();
|
||||
this.input = new BufferedInputStream(socket.getInputStream(), 16384);
|
||||
this.output = socket.getOutputStream();
|
||||
}
|
||||
|
||||
@@ -164,5 +165,4 @@ public class BioSocketChannel implements SocketChannel {
|
||||
this.socket = null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user