mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Fix upgrade protobuf version
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -237,7 +237,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<groupId>com.google.protobuf</groupId>
|
||||||
<artifactId>protobuf-java</artifactId>
|
<artifactId>protobuf-java</artifactId>
|
||||||
<version>2.6.1</version>
|
<version>3.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.ibatis</groupId>
|
<groupId>org.apache.ibatis</groupId>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
|||||||
|
syntax = "proto2";
|
||||||
package com.alibaba.otter.canal.protocol;
|
package com.alibaba.otter.canal.protocol;
|
||||||
|
|
||||||
option java_package = "com.alibaba.otter.canal.protocol";
|
option java_package = "com.alibaba.otter.canal.protocol";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
syntax = "proto2";
|
||||||
package com.alibaba.otter.canal.protocol;
|
package com.alibaba.otter.canal.protocol;
|
||||||
|
|
||||||
option java_package = "com.alibaba.otter.canal.protocol";
|
option java_package = "com.alibaba.otter.canal.protocol";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.alibaba.otter.canal.server.netty.listener;
|
|||||||
|
|
||||||
import com.alibaba.otter.canal.protocol.CanalPacket;
|
import com.alibaba.otter.canal.protocol.CanalPacket;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.protobuf.GeneratedMessage;
|
import com.google.protobuf.GeneratedMessageV3;
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
import org.jboss.netty.channel.ChannelFutureListener;
|
import org.jboss.netty.channel.ChannelFutureListener;
|
||||||
|
|
||||||
@@ -16,19 +16,19 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
|
|||||||
|
|
||||||
private ClientRequestResult result;
|
private ClientRequestResult result;
|
||||||
|
|
||||||
public ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency, boolean empty) {
|
public ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency, boolean empty) {
|
||||||
this(destination, request, type, amount, latency, empty, (short) 0);
|
this(destination, request, type, amount, latency, empty, (short) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency) {
|
public ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency) {
|
||||||
this(destination, request, type, amount, latency, false, (short) 0);
|
this(destination, request, type, amount, latency, false, (short) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency, short errorCode) {
|
public ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency, short errorCode) {
|
||||||
this(destination, request, type, amount, latency, false, errorCode);
|
this(destination, request, type, amount, latency, false, errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ChannelFutureAggregator(String destination, GeneratedMessage request, CanalPacket.PacketType type, int amount, long latency, boolean empty, short errorCode) {
|
private ChannelFutureAggregator(String destination, GeneratedMessageV3 request, CanalPacket.PacketType type, int amount, long latency, boolean empty, short errorCode) {
|
||||||
this.result = new ClientRequestResult.Builder()
|
this.result = new ClientRequestResult.Builder()
|
||||||
.destination(destination)
|
.destination(destination)
|
||||||
.type(type)
|
.type(type)
|
||||||
@@ -56,7 +56,7 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
|
|||||||
|
|
||||||
private String destination;
|
private String destination;
|
||||||
private CanalPacket.PacketType type;
|
private CanalPacket.PacketType type;
|
||||||
private GeneratedMessage request;
|
private GeneratedMessageV3 request;
|
||||||
private int amount;
|
private int amount;
|
||||||
private long latency;
|
private long latency;
|
||||||
private short errorCode;
|
private short errorCode;
|
||||||
@@ -81,7 +81,7 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
|
|||||||
|
|
||||||
private String destination;
|
private String destination;
|
||||||
private CanalPacket.PacketType type;
|
private CanalPacket.PacketType type;
|
||||||
private GeneratedMessage request;
|
private GeneratedMessageV3 request;
|
||||||
private int amount;
|
private int amount;
|
||||||
private long latency;
|
private long latency;
|
||||||
private short errorCode;
|
private short errorCode;
|
||||||
@@ -98,7 +98,7 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Builder request(GeneratedMessage request) {
|
Builder request(GeneratedMessageV3 request) {
|
||||||
this.request = request;
|
this.request = request;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
|
|||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GeneratedMessage getRequest() {
|
public GeneratedMessageV3 getRequest() {
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user