是说把1.10.1的hive connector跟1.11的flink一起用么?如果这样用是肯定有问题的。可以把版本都统一成1.11试试。
On Wed, Jun 17, 2020 at 12:18 PM Sun.Zhu <17626017...@163.com> wrote: > Sqlcli上得报错就上面这点,没有更多得信息了,或者从哪些log里可以看到更多信息 > > > > > 在2020年06月17日 10:27,Benchao Li 写道: > 目前这个缺少的依赖是在flink-table-runtime-blink module的,现在这些重构到了flink-table-common > module了。 > 如果只是connector、format这些用老的版本,应该是没有问题的。 > 你可以把更详细的报错信息发一下吗?看一下具体是哪个模块还在依赖老版本的flink-table-runtime-blink > > Sun.Zhu <17626017...@163.com> 于2020年6月17日周三 上午12:49写道: > > > 是的 除了1.11 编译出来的包之外依赖的包,比如connector的、hivecatalog需要依赖的包,由于1.11 > > 还没有release所以就用的1.10.1版本的,上面两个问题在1.10.1版本下是没有的,升级了1.11报了不知道什么原因,缺少依赖吗? > > > > > > > > > > 在2020年06月16日 18:38,Benchao Li 写道: > > 1.11中对底层数据结构做了一些重构,所以你不可以直接把1.10的jar包拿到1.11里面使用的。 > > 你可以直接使用1.11里面编译出来的jar包来跑应该是没有问题的。 > > > > Sun.Zhu <17626017...@163.com> 于2020年6月16日周二 下午6:11写道: > > > > > 我编译了1.11包 > > > 在sql-cli下查询hive的表报如下错误: > > > [ERROR] Could not execute SQL statement. Reason: > > > java.lang.NoClassDefFoundError: > org/apache/flink/table/dataformat/BaseRow > > > > > > > > > 查注册的kafka表报: > > > [ERROR] Could not execute SQL statement. Reason: > > > java.lang.ClassNotFoundException: > > org.apache.flink.table.dataformat.BaseRow > > > > > > > > > 依赖包是从1.10.1下面拷贝的 > > > | | > > > Sun.Zhu > > > | > > > | > > > 17626017...@163.com > > > | > > > 签名由网易邮箱大师定制 > > > > > > > > > 在2020年06月13日 11:44,Sun.Zhu<17626017...@163.com> 写道: > > > Got it! > > > Thx,junbao > > > > > > > > > | | > > > Sun.Zhu > > > | > > > | > > > 17626017...@163.com > > > | > > > 签名由网易邮箱大师定制 > > > > > > > > > 在2020年06月13日 09:32,zhangjunbao<wind.fly....@outlook.com> 写道: > > > 1.10.x版本,在hivecatalog下,建表时用proctime as PROCTIME()应该是有bug的, > > > https://issues.apache.org/jira/browse/FLINK-17189 < > > > https://issues.apache.org/jira/browse/FLINK-17189> > > > > > > Best, > > > Junbao Zhang > > > > > > 2020年6月13日 上午12:31,Sun.Zhu <17626017...@163.com> 写道: > > > > > > hi,all > > > 在用sql client集成hiveCatalog时,在hiveCatalog中注册了一个kafka的table > > > ddl如下: > > > | > > > CREATETABLE user_behavior ( > > > user_id BIGINT, > > > item_id BIGINT, > > > category_id BIGINT, > > > behavior STRING, > > > ts TIMESTAMP(3), > > > proctime as PROCTIME(), -- 通过计算列产生一个处理时间列 > > > WATERMARK FOR ts as ts - INTERVAL'5'SECOND-- 在ts上定义watermark,ts成为事件时间列 > > > ) WITH ( > > > 'connector.type' = 'kafka', -- 使用 kafka connector > > > 'connector.version' = 'universal', -- kafka 版本,universal 支持 0.11 以上的版本 > > > 'connector.topic' = 'user_behavior', -- kafka topic > > > 'connector.startup-mode' = 'earliest-offset', -- 从起始 offset 开始读取 > > > 'connector.properties.zookeeper.connect' = 'localhost:2181', -- > > zookeeper > > > 地址 > > > 'connector.properties.bootstrap.servers' = 'localhost:9092', -- kafka > > > broker 地址 > > > 'format.type' = 'json'-- 数据源格式为 json > > > ); > > > | > > > 在查询时select * from user_behavior;报错如下: > > > [ERROR] Could not execute SQL statement. Reason: > > > java.lang.AssertionError: Conversion to relational algebra failed to > > > preserve datatypes: > > > validated type: > > > RecordType(BIGINT user_id, BIGINT item_id, BIGINT category_id, > > > VARCHAR(2147483647) CHARACTER SET "UTF-16LE" behavior, TIME > > > ATTRIBUTE(ROWTIME) ts, TIMESTAMP(3) NOT NULL proctime) NOT NULL > > > converted type: > > > RecordType(BIGINT user_id, BIGINT item_id, BIGINT category_id, > > > VARCHAR(2147483647) CHARACTER SET "UTF-16LE" behavior, TIME > > > ATTRIBUTE(ROWTIME) ts, TIME ATTRIBUTE(PROCTIME) NOT NULL proctime) NOT > > NULL > > > rel: > > > LogicalProject(user_id=[$0], item_id=[$1], category_id=[$2], > > > behavior=[$3], ts=[$4], proctime=[$5]) > > > LogicalWatermarkAssigner(rowtime=[ts], watermark=[-($4, 5000:INTERVAL > > > SECOND)]) > > > LogicalProject(user_id=[$0], item_id=[$1], category_id=[$2], > > > behavior=[$3], ts=[$4], proctime=[PROCTIME()]) > > > LogicalTableScan(table=[[myhive, my_db, user_behavior, source: > > > [KafkaTableSource(user_id, item_id, category_id, behavior, ts)]]]) > > > > > > > > > flink版本:1.10.1 > > > blink planner,streaming model > > > > > > > > > Thx > > > | | > > > Sun.Zhu > > > | > > > | > > > 17626017...@163.com > > > | > > > 签名由网易邮箱大师定制 > > > > > > > > > > > > -- Best regards! Rui Li