You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by "maker_dong@foxmail.com" <ma...@foxmail.com> on 2021/05/08 10:07:03 UTC

flinksql查询doris表报错

使用FlinkSQL的sql-client客户端,创建一张表连接Doris:
Flink SQL> CREATE TABLE flink_doris_source
> (
>     siteid INT,
>     citycode INT,
>     username STRING,
>     pv INT
> )
>     WITH (
>       'connector' = 'doris',
>       'fenodes' = 'xxx:8030',
>       'table.identifier' = 'example_db.table1',
>       'username' = 'root',
>       'password' = 'admin123',
>       'sink.batch.size' = '1'
> );
然后执行查询
select * from flink_doris_source;

若表是空的则查询数秒后程序停止
若表中有数据,数据查询不到 ,查询数秒后报错:
[ERROR] Could not execute SQL statement.Reason:java.lang.NoSuchMethodError: 
scala.collection.JavaConversions$.deprecated$u0020asScalaSet(Ljava/util/Set;)Lscala/collection/mutable/Set;

doris-version:0.13 也尝试编译了0.14,同样报错
flink-version:1.11.3
doris-flink-connector-version:1.0.0
希望大佬解答。



maker_dong@foxmail.com

回复: flinksql查询doris表报错

Posted by 41108453 <41...@qq.com>.
The flink connector is developed based on Scala 2.12.x, because the APIs between major Scala versions are not compatible, so please use Scala 2.12.x to compile flink connector




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "dev"                                                                                    <lingmiao@apache.org&gt;;
发送时间:&nbsp;2021年5月9日(星期天) 下午4:15
收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;

主题:&nbsp;Re: flinksql查询doris表报错



Question in English:
Using Doris Flink connector

If the table is empty, the program will stop after a few seconds of query.
If there is data in the table and the data cannot be queried, an error will
be reported after a few seconds of query:
[ERROR] Could not execute SQL statement.Reason:java.lang.NoSuchMethodError:
scala.collection.JavaConversions$.deprecated$u0020asScalaSet(Ljava/util/Set;)Lscala/collection/mutable/Set;

@JiaFeng, Zhang

Ling Miao


maker_dong@foxmail.com <maker_dong@foxmail.com&gt; 于2021年5月8日周六 下午6:07写道:

&gt; 使用FlinkSQL的sql-client客户端,创建一张表连接Doris:
&gt; Flink SQL&gt; CREATE TABLE flink_doris_source
&gt; &gt; (
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; siteid INT,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; citycode INT,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; username STRING,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; pv INT
&gt; &gt; )
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; WITH (
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'connector' = 'doris',
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'fenodes' = 'xxx:8030',
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'table.identifier' = 'example_db.table1',
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'username' = 'root',
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'password' = 'admin123',
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'sink.batch.size' = '1'
&gt; &gt; );
&gt; 然后执行查询
&gt; select * from flink_doris_source;
&gt;
&gt; 若表是空的则查询数秒后程序停止
&gt; 若表中有数据,数据查询不到 ,查询数秒后报错:
&gt; [ERROR] Could not execute SQL
&gt; statement.Reason:java.lang.NoSuchMethodError:
&gt;
&gt; scala.collection.JavaConversions$.deprecated$u0020asScalaSet(Ljava/util/Set;)Lscala/collection/mutable/Set;
&gt;
&gt; doris-version:0.13 也尝试编译了0.14,同样报错
&gt; flink-version:1.11.3
&gt; doris-flink-connector-version:1.0.0
&gt; 希望大佬解答。
&gt;
&gt;
&gt;
&gt; maker_dong@foxmail.com
&gt;

Re: flinksql查询doris表报错

Posted by ling miao <li...@apache.org>.
Question in English:
Using Doris Flink connector

If the table is empty, the program will stop after a few seconds of query.
If there is data in the table and the data cannot be queried, an error will
be reported after a few seconds of query:
[ERROR] Could not execute SQL statement.Reason:java.lang.NoSuchMethodError:
scala.collection.JavaConversions$.deprecated$u0020asScalaSet(Ljava/util/Set;)Lscala/collection/mutable/Set;

@JiaFeng, Zhang

Ling Miao


maker_dong@foxmail.com <ma...@foxmail.com> 于2021年5月8日周六 下午6:07写道:

> 使用FlinkSQL的sql-client客户端,创建一张表连接Doris:
> Flink SQL> CREATE TABLE flink_doris_source
> > (
> >     siteid INT,
> >     citycode INT,
> >     username STRING,
> >     pv INT
> > )
> >     WITH (
> >       'connector' = 'doris',
> >       'fenodes' = 'xxx:8030',
> >       'table.identifier' = 'example_db.table1',
> >       'username' = 'root',
> >       'password' = 'admin123',
> >       'sink.batch.size' = '1'
> > );
> 然后执行查询
> select * from flink_doris_source;
>
> 若表是空的则查询数秒后程序停止
> 若表中有数据,数据查询不到 ,查询数秒后报错:
> [ERROR] Could not execute SQL
> statement.Reason:java.lang.NoSuchMethodError:
>
> scala.collection.JavaConversions$.deprecated$u0020asScalaSet(Ljava/util/Set;)Lscala/collection/mutable/Set;
>
> doris-version:0.13 也尝试编译了0.14,同样报错
> flink-version:1.11.3
> doris-flink-connector-version:1.0.0
> 希望大佬解答。
>
>
>
> maker_dong@foxmail.com
>