You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 潘明文 <pa...@163.com> on 2020/02/14 09:30:51 UTC

image




CREATE TABLE mykafka1(name String) WITH (
   'connector.type' = 'kafka',
   'connector.version' = 'universal',
   'connector.topic' = 'mysql_binlog',
   'connector.properties.zookeeper.connect' = 'masternode1:2181',
   'connector.properties.bootstrap.servers' = 'masternode1:9092',
   'format.type' = 'csv',
   'update-mode' = 'append'
);



出现下面错误,没有方法,是版本不对吗?我用的是flink-sql-connector-kafka_2.11-1.10.0.jar flink-connector-kafka_2.11-1.10.0.jar


Re: Re: image

Posted by Jark Wu <im...@gmail.com>.
 Benchao is right.

flink-sql-connector-kafka_2.11-1.10.0.jar 有做 shade,是可以直接丢到 flink-dist/lib
中用的。
你遇到的问题应该就是没有 shade 导致冲突了。

Best,
Jark

On Fri, 14 Feb 2020 at 17:56, Benchao Li <li...@gmail.com> wrote:

> 我理解应该只需要flink-sql-connector-kafka_2.11-1.10.0.jar这个包就可以了,
> flink-connector-kafka_2.11-1.10.0.jar这个包不需要放进去的。
>
> 潘明文 <pa...@163.com> 于2020年2月14日周五 下午5:50写道:
>
> >
> >
> > select * from mykafka1
> >
> > 错误信息:
> >     [ERROR] Could not execute SQL statement. Reason:
> > java.lang.NoSuchMethodError:
> >
> org.apache.flink.streaming.connectors.kafka.internals.metrics.KafkaMetricWrapper.<init>(Lorg/apache/kafka/common/Metric;)V
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 在 2020-02-14 17:43:16,"Benchao Li" <li...@gmail.com> 写道:
> > >明文,
> > >
> > >你的图片没有在邮件中显示出来。
> > >你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。
> > >
> > >
> > >潘明文 <pa...@163.com> 于2020年2月14日周五 下午5:31写道:
> > >
> > >>
> > >>
> > >> CREATE TABLE mykafka1(name String) WITH (
> > >>    'connector.type' = 'kafka',
> > >>    'connector.version' = 'universal',
> > >>    'connector.topic' = 'mysql_binlog',
> > >>    'connector.properties.zookeeper.connect' = 'masternode1:2181',
> > >>    'connector.properties.bootstrap.servers' = 'masternode1:9092',
> > >>    'format.type' = 'csv',
> > >>    'update-mode' = 'append'
> > >> );
> > >>
> > >>
> > >> 出现下面错误,没有方法,是版本不对吗?我用的是flink-sql-connector-kafka_2.11-1.10.0.jar
> > flink-connector-kafka_2.11-1.10.0.jar
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >--
> > >
> > >Benchao Li
> > >School of Electronics Engineering and Computer Science, Peking
> University
> > >Tel:+86-15650713730
> > >Email: libenchao@gmail.com; libenchao@pku.edu.cn
> >
>
>
> --
>
> Benchao Li
> School of Electronics Engineering and Computer Science, Peking University
> Tel:+86-15650713730
> Email: libenchao@gmail.com; libenchao@pku.edu.cn
>

Re: Re: image

Posted by Benchao Li <li...@gmail.com>.
我理解应该只需要flink-sql-connector-kafka_2.11-1.10.0.jar这个包就可以了,
flink-connector-kafka_2.11-1.10.0.jar这个包不需要放进去的。

潘明文 <pa...@163.com> 于2020年2月14日周五 下午5:50写道:

>
>
> select * from mykafka1
>
> 错误信息:
>     [ERROR] Could not execute SQL statement. Reason:
> java.lang.NoSuchMethodError:
> org.apache.flink.streaming.connectors.kafka.internals.metrics.KafkaMetricWrapper.<init>(Lorg/apache/kafka/common/Metric;)V
>
>
>
>
>
>
>
>
>
> 在 2020-02-14 17:43:16,"Benchao Li" <li...@gmail.com> 写道:
> >明文,
> >
> >你的图片没有在邮件中显示出来。
> >你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。
> >
> >
> >潘明文 <pa...@163.com> 于2020年2月14日周五 下午5:31写道:
> >
> >>
> >>
> >> CREATE TABLE mykafka1(name String) WITH (
> >>    'connector.type' = 'kafka',
> >>    'connector.version' = 'universal',
> >>    'connector.topic' = 'mysql_binlog',
> >>    'connector.properties.zookeeper.connect' = 'masternode1:2181',
> >>    'connector.properties.bootstrap.servers' = 'masternode1:9092',
> >>    'format.type' = 'csv',
> >>    'update-mode' = 'append'
> >> );
> >>
> >>
> >> 出现下面错误,没有方法,是版本不对吗?我用的是flink-sql-connector-kafka_2.11-1.10.0.jar
> flink-connector-kafka_2.11-1.10.0.jar
> >>
> >>
> >>
> >>
> >>
> >
> >
> >--
> >
> >Benchao Li
> >School of Electronics Engineering and Computer Science, Peking University
> >Tel:+86-15650713730
> >Email: libenchao@gmail.com; libenchao@pku.edu.cn
>


-- 

Benchao Li
School of Electronics Engineering and Computer Science, Peking University
Tel:+86-15650713730
Email: libenchao@gmail.com; libenchao@pku.edu.cn

Re:Re: image

Posted by 潘明文 <pa...@163.com>.

select * from mykafka1

错误信息:
    [ERROR] Could not execute SQL statement. Reason:
java.lang.NoSuchMethodError: org.apache.flink.streaming.connectors.kafka.internals.metrics.KafkaMetricWrapper.<init>(Lorg/apache/kafka/common/Metric;)V









在 2020-02-14 17:43:16,"Benchao Li" <li...@gmail.com> 写道:
>明文,
>
>你的图片没有在邮件中显示出来。
>你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。
>
>
>潘明文 <pa...@163.com> 于2020年2月14日周五 下午5:31写道:
>
>>
>>
>> CREATE TABLE mykafka1(name String) WITH (
>>    'connector.type' = 'kafka',
>>    'connector.version' = 'universal',
>>    'connector.topic' = 'mysql_binlog',
>>    'connector.properties.zookeeper.connect' = 'masternode1:2181',
>>    'connector.properties.bootstrap.servers' = 'masternode1:9092',
>>    'format.type' = 'csv',
>>    'update-mode' = 'append'
>> );
>>
>>
>> 出现下面错误,没有方法,是版本不对吗?我用的是flink-sql-connector-kafka_2.11-1.10.0.jar flink-connector-kafka_2.11-1.10.0.jar
>>
>>
>>
>>
>>
>
>
>-- 
>
>Benchao Li
>School of Electronics Engineering and Computer Science, Peking University
>Tel:+86-15650713730
>Email: libenchao@gmail.com; libenchao@pku.edu.cn

Re: image

Posted by Benchao Li <li...@gmail.com>.
明文,

你的图片没有在邮件中显示出来。
你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。


潘明文 <pa...@163.com> 于2020年2月14日周五 下午5:31写道:

>
>
> CREATE TABLE mykafka1(name String) WITH (
>    'connector.type' = 'kafka',
>    'connector.version' = 'universal',
>    'connector.topic' = 'mysql_binlog',
>    'connector.properties.zookeeper.connect' = 'masternode1:2181',
>    'connector.properties.bootstrap.servers' = 'masternode1:9092',
>    'format.type' = 'csv',
>    'update-mode' = 'append'
> );
>
>
> 出现下面错误,没有方法,是版本不对吗?我用的是flink-sql-connector-kafka_2.11-1.10.0.jar flink-connector-kafka_2.11-1.10.0.jar
>
>
>
>
>


-- 

Benchao Li
School of Electronics Engineering and Computer Science, Peking University
Tel:+86-15650713730
Email: libenchao@gmail.com; libenchao@pku.edu.cn