mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
add tablestore adapter (#3754)
* add tablestore adapter * add tablestore adapter * fix bug add add log when etl fail * fix bug,tinyint(1)以及rowupdatechange Co-authored-by: agapple <jianghang115@gmail.com>
This commit is contained in:
@@ -141,6 +141,19 @@
|
||||
<classifier>jar-with-dependencies</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.otter</groupId>
|
||||
<artifactId>client-adapter.tablestore</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>*</artifactId>
|
||||
<groupId>*</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<classifier>jar-with-dependencies</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- connector plugin -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.otter</groupId>
|
||||
|
||||
@@ -64,6 +64,13 @@
|
||||
<exclude>META-INF/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../tablestore/src/main/resources/</directory>
|
||||
<outputDirectory>/conf</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>META-INF/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>target</directory>
|
||||
<outputDirectory>logs</outputDirectory>
|
||||
|
||||
@@ -65,6 +65,13 @@
|
||||
<exclude>META-INF/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../tablestore/src/main/resources/</directory>
|
||||
<outputDirectory>/conf</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>META-INF/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>target</directory>
|
||||
<outputDirectory>logs</outputDirectory>
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -217,8 +218,15 @@ public class AdapterProcessor {
|
||||
canalMsgConsumer.rollback(); // 处理失败, 回滚数据
|
||||
logger.error(e.getMessage() + " Error sync and rollback, execute times: " + (i + 1));
|
||||
} else {
|
||||
canalMsgConsumer.ack();
|
||||
logger.error(e.getMessage() + " Error sync but ACK!");
|
||||
if (canalClientConfig.getTerminateOnException()) {
|
||||
canalMsgConsumer.rollback();
|
||||
logger.error("Retry fail, turn switch off and abort data transfer.");
|
||||
syncSwitch.off(canalDestination);
|
||||
logger.error("finish turn off switch of destination:" + canalDestination);
|
||||
} else {
|
||||
canalMsgConsumer.ack();
|
||||
logger.error(e.getMessage() + " Error sync but ACK!");
|
||||
}
|
||||
}
|
||||
Thread.sleep(500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user