Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-5499

Mysql connector parser the ddl statement failed when including keyword "buckets"

XMLWordPrintable

    • False
    • None
    • False

      CREATE TABLE hive_tables
      (
      id int(11) auto_increment NOT NULL COMMENT 'ID',
      tbname varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '表名',
      tbalias varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
      pic_user varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '负责人',
      created int(11) NULL COMMENT '表创建时间(UNIX时间戳)',
      tbtype varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表类型',
      view_expanded_text mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '虚拟表来源',
      input_fm varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '输入格式',
      output_fm varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '输出格式',
      compressed tinyint(4) NULL COMMENT '是否为压缩表',
      location varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '位置',
      `size` bigint(20) NULL COMMENT '数据表大小',
      buckets int(11) NOT NULL COMMENT '分桶数',
      serde_lib varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '序列化的库',
      delimiters text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '行/列/map及序列化的分割符',
      db_id int(11) NOT NULL COMMENT '表所属数据库名',
      comment text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表注释',
      updated timestamp DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL COMMENT '更新时间',
      available tinyint(1) DEFAULT 1 NOT NULL COMMENT '表是否可用',
      `level` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'C' NULL COMMENT '等级字符',
      owner varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表所有者(HCAT)',
      invalid tinyint(3) unsigned DEFAULT 0 NOT NULL COMMENT '是否作废的表',
      data_type int(11) DEFAULT 1 NOT NULL COMMENT 'Hive表数据类型 1-默认-业务组生成 2-海度原始数据 3-海度处理公共数据',
      raw_comment text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '原始从hive同步的备注',
      CONSTRAINT `PRIMARY` PRIMARY KEY (id)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='Hive表信息'

      org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped. at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:50) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:374) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$25(MySqlStreamingChangeEventSource.java:875) at com.github.shyiko.mysql.binlog.BinaryLogClient.notifyEventListeners(BinaryLogClient.java:1130) at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:978) at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:599) at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857) at java.base/java.lang.Thread.run(Thread.java:830) Caused by: io.debezium.DebeziumException: Error processing binlog event ... 7 more Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'CREATE TABLE hive_tables ( id int(11) auto_increment NOT NULL COMMENT 'ID', tbname varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '表名', tbalias varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL, pic_user varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '负责人', created int(11) NULL COMMENT '表创建时间(UNIX时间戳)', tbtype varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表类型', view_expanded_text mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '虚拟表来源', input_fm varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '输入格式', output_fm varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '输出格式', compressed tinyint(4) NULL COMMENT '是否为压缩表', location varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '位置', `size` bigint(20) NULL COMMENT '数据表大小', buckets int(11) NOT NULL COMMENT '分桶数', serde_lib varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '序列化的库', delimiters text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '行/列/map及序列化的分割符', db_id int(11) NOT NULL COMMENT '表所属数据库名', comment text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表注释', updated timestamp DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL COMMENT '更新时间', available tinyint(1) DEFAULT 1 NOT NULL COMMENT '表是否可用', `level` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'C' NULL COMMENT '等级字符', owner varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表所有者(HCAT)', invalid tinyint(3) unsigned DEFAULT 0 NOT NULL COMMENT '是否作废的表', data_type int(11) DEFAULT 1 NOT NULL COMMENT 'Hive表数据类型 1-默认-业务组生成 2-海度原始数据 3-海度处理公共数据', raw_comment text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '原始从hive同步的备注', CONSTRAINT `PRIMARY` PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='Hive表信息'' no viable alternative at input 'CREATE TABLE hive_tables (\n\tid int(11) auto_increment NOT NULL COMMENT 'ID',\n\ttbname varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '表名',\n\ttbalias varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,\n\tpic_user varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '负责人',\n\tcreated int(11) NULL COMMENT '表创建时间(UNIX时间戳)',\n\ttbtype varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表类型',\n\tview_expanded_text mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '虚拟表来源',\n\tinput_fm varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '输入格式',\n\toutput_fm varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '输出格式',\n\tcompressed tinyint(4) NULL COMMENT '是否为压缩表',\n\tlocation varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '位置',\n\t`size` bigint(20) NULL COMMENT '数据表大小',\n\tbuckets' at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:43) at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41) at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544) at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310) at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136) at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1228) at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:950) at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:73) at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:45) at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:78) at io.debezium.connector.mysql.MySqlDatabaseSchema.parseDdl(MySqlDatabaseSchema.java:212) at io.debezium.connector.mysql.MySqlDatabaseSchema.parseStreamingDdl(MySqlDatabaseSchema.java:198) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleQueryEvent(MySqlStreamingChangeEventSource.java:572) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.lambda$execute$14(MySqlStreamingChangeEventSource.java:847) at io.debezium.connector.mysql.MySqlStreamingChangeEventSource.handleEvent(MySqlStreamingChangeEventSource.java:354) ... 6 more Caused by: org.antlr.v4.runtime.NoViableAltException at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2026) at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467) at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393) at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1026) ... 15 more	
      

            Unassigned Unassigned
            ywyuewei Harvey Yue (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: