image

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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



 

Reply | Threaded
Open this post in threaded view
|

Re: image

Benchao Li
明文,

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


潘明文 <[hidden email]> 于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: [hidden email]; [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re:Re: image

潘明文


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" <[hidden email]> 写道:

>明文,
>
>你的图片没有在邮件中显示出来。
>你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。
>
>
>潘明文 <[hidden email]> 于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: [hidden email]; [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Re: image

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

潘明文 <[hidden email]> 于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" <[hidden email]> 写道:
> >明文,
> >
> >你的图片没有在邮件中显示出来。
> >你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。
> >
> >
> >潘明文 <[hidden email]> 于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: [hidden email]; [hidden email]
>


--

Benchao Li
School of Electronics Engineering and Computer Science, Peking University
Tel:+86-15650713730
Email: [hidden email]; [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Re: image

Jark
Administrator
 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 <[hidden email]> wrote:

> 我理解应该只需要flink-sql-connector-kafka_2.11-1.10.0.jar这个包就可以了,
> flink-connector-kafka_2.11-1.10.0.jar这个包不需要放进去的。
>
> 潘明文 <[hidden email]> 于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" <[hidden email]> 写道:
> > >明文,
> > >
> > >你的图片没有在邮件中显示出来。
> > >你可以用第三方的图床来上传图片,或者直接以text的方式发送你的异常信息。
> > >
> > >
> > >潘明文 <[hidden email]> 于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: [hidden email]; [hidden email]
> >
>
>
> --
>
> Benchao Li
> School of Electronics Engineering and Computer Science, Peking University
> Tel:+86-15650713730
> Email: [hidden email]; [hidden email]
>