mssql不能使用递增或时间戳源连接器

hm2xizp9  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(231)

我正在尝试为sql server表创建源连接器,下面是一个示例:

{
  "name": "test",
  "config": {
      "tasks.max":"1",
      "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector",
      "connection.url": "jdbc:sqlserver://REDACTED;databaseName=REDACTED",
      "connection.user": "REDACTED",
      "connection.password": "REDACTED",
      "topic.prefix": "test",
      "poll.interval.ms" : 2000,
      "table.whitelist": "dbo.Client",
      "mode":"incrementing",
      "incrementing.column.name": "Id"
  }
}

我得到了下面的错误,这并不能说明什么。。。

java.lang.IllegalArgumentException: Number of groups must be positive.
 at org.apache.kafka.connect.util.ConnectorUtils.groupPartitions(ConnectorUtils.java:41)
 at io.confluent.connect.jdbc.JdbcSourceConnector.taskConfigs(JdbcSourceConnector.java:148)
 at org.apache.kafka.connect.runtime.Worker.connectorTaskConfigs(Worker.java:305)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder.reconfigureConnector(DistributedHerder.java:997)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder.reconfigureConnectorTasksWithRetry(DistributedHerder.java:950)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder.access$900(DistributedHerder.java:110)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder$17$1.call(DistributedHerder.java:963)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder$17$1.call(DistributedHerder.java:960)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:270)
 at org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:219)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)

当我将mode timestamp与timestamp.column.name(column modified with type datetimeoffset)一起使用时,也会发生同样的情况。
在自定义查询中使用大容量模式时,效果很好。
有什么想法吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题