我的数据总线配置有什么问题?

时间:2017-04-28 01:39:35

标签: java mysql databus

我运行databus mysql快速启动demo,但是当我更新一行时,它会抛出错误。

我的 my.cnf MySQL版本 5.7

[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port = 3306
log-bin=mysql-bin
server-id=1
binlog_checksum =NONE
socket=/tmp/mysql.sock
bind-address        = localhost
binlog_format=ROW

我认为我的my.cnf是正确的,因为数据总线日志文件 databus2-relay-or_person.out 表示已成功连接mysql

{TransportImpl} connecting to host: localhost, port: 3306
login successfully, user: or_test, detail: OKPacket[packetMarker=0,affectedRows=0,insertId=0,serverStatus=2,warningCount=0,message=<null>]

但是一旦我更新了表格,例如

update or_test.person set first_name='bbbb' where id=1;
Query OK, 1 row affected (0.08 sec)
Rows matched: 1  Changed: 1  Warnings: 0

日志抛出错误

{OpenReplicator_person} Connecting to OpenReplicator or_test@localhost:3306/mysql-bin.000001#4
2017-04-28 09:08:18,916 +52465 [ORListener_person] (INFO) {OpenReplicator_person} BEGIN sql: BEGIN
2017-04-28 09:08:18,916 +52465 [ORListener_person] (INFO) {OpenReplicator_person} startXtionQueryEvent[header=BinlogEventV4HeaderImpl[timestamp=1493341698000,eventType=2,serverId=1,eventLength=64,nextPosition=275,flags=8,timestampOfReceipt=1493341698913],threadId=4,elapsedTime=0,databaseNameLength=0,errorCode=0,statusVariablesLength=26,statusVariables=[QFlags2Code[flags=0], QSQLModeCode[sqlMode=1075838976], QCatalogNzCode[catalogName=std], QCharsetCode[characterSetClient=33,collationConnection=33,collationServer=8]],databaseName=,sql=BEGIN]
2017-04-28 09:08:18,919 +52468 [ORListener_person] (INFO) {DatabusThreadBase} Starting source: or_test.person
2017-04-28 09:08:18,920 +52469 [ORListener_person] (INFO) {DatabusThreadBase} UPDATE or_test.person: 1
//noghting wrong above 
//it wrong below

2017-04-28 09:08:18,926 +52475 [ORListener_person] (ERROR) {OpenReplicator_person} Got UnsupportedKeyException :
com.linkedin.databus.core.UnsupportedKeyException: Bad key type: java.math.BigInteger
        at com.linkedin.databus.core.DbusEventKey.<init>(DbusEventKey.java:126)
        at com.linkedin.databus2.producers.OpenReplicatorAvroEventFactory.createAndAppendEvent(OpenReplicatorAvroEventFactory.java:101)
        at com.linkedin.databus2.producers.OpenReplicatorEventProducer$EventProducerThread.addTxnToBuffer(OpenReplicatorEventProducer.java:544)
        at com.linkedin.databus2.producers.OpenReplicatorEventProducer$EventProducerThread.onEndTransaction(OpenReplicatorEventProducer.java:480)
        at com.linkedin.databus2.producers.ORListener.endXtion(ORListener.java:238)
        at com.linkedin.databus2.producers.ORListener.run(ORListener.java:761)
2017-04-28 09:08:18,928 +52477 [ORListener_person] (FATAL) {OpenReplicator_person} Got UnsupportedKeyException exception while adding txn (com.linkedin.databus2.producers.ds.Transaction@3e11e832) to the buffer

我的数据总线配置

{
  "name" : "person",
  "id" : 1,
  "uri" : "mysql://or_test%2For_test@localhost:3306/3306/mysql-bin",
    "slowSourceQueryThreshold" : 2000,
    "sources" :
       [
        {
          "id" : 40,
          "name" : "com.linkedin.events.example.or_test.Person",
         "uri": "or_test.person",
         "partitionFunction" : "constant:1"
       }
   ]}

我的表定义

 desc person;
+------------+--------------+------+-----+---------+----------------+
| Field      | Type         | Null | Key | Default | Extra          |
+------------+--------------+------+-----+---------+----------------+
| id         | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| first_name | varchar(120) | NO   |     | NULL    |                |
| last_name  | varchar(120) | NO   |     | NULL    |                |
| birth_date | date         | YES  |     | NULL    |                |
| deleted    | varchar(5)   | NO   |     | false   |                |
+------------+--------------+------+-----+---------+----------------+



  mysql> select * from  person limit 5 ;
+----+------------+-----------+------------+---------+
| id | first_name | last_name | birth_date | deleted |
+----+------------+-----------+------------+---------+
|  1 | bbbb       | varadaran | 1980-01-01 | false   |
|  2 | a          | shkolnik  | 1981-02-02 | false   |
|  3 | sunil      | nagaraj   | 1982-03-03 | false   |
|  4 | chavdar    | botev     | 1983-04-04 | false   |
|  5 | phanindra  | ganti     | 1984-05-05 | false   |
+----+------------+-----------+------------+---------+

我的问题是:我的配置有什么问题?或者数据集不支持mysql版本?

0 个答案:

没有答案