stream sink hive 在hdfs ha模式下

2020-08-02 Thread air23
hi 你好 我这边集群是cdh的。 配置了hdfs ha模式 在使用 kafka sink 到hive 时候找不到nameservices java.lang.IllegalArgumentException: java.net.UnknownHostException: nameservices1 请问 在ha模式下 应该怎么配置

Re: pyflink 消费kafka protobuf数据

2020-08-02 Thread Benchao Li
Hi, Flink暂时还没有内置的protobuf format,社区正在讨论实现一个protobuf format[1],预期在1.12来支持。 目前来讲,你可以考虑自定义一个format,或者直接定义一个没有任何解析直接转发byte[] 数据的format, 然后用UDF来解析。 [1] https://issues.apache.org/jira/browse/FLINK-18202 stephenlee <871826...@qq.com> 于2020年7月31日周五 下午10:27写道: > hi,各位大佬好: > 我是flink新手,我想问一下如何使用pyflink

flink??ScalarFunction????????

2020-08-02 Thread ??????

Re: Flink Kafka EXACTLY_ONCE causing KafkaException ByteArraySerializer is not an instance of Serializer

2020-08-02 Thread Qingsheng Ren
Hi Vikash, Sorry for the late reply. Is your version of Flink kafka *connector* 1.10.1 too? Actually it's a bug in the connector, so I think you need to upgrade the connector to 1.10.1 too, not just Flink itself. I tried Flink 1.10.0/1.10.1 + flink-kafka-connector 1.10.0 and indeed reproduced

Re: flink 1.11.0 conenctor-jdbc 报错

2020-08-02 Thread song wang
对,就是这个原因 Leonard Xu 于2020年8月3日周一 上午10:26写道: > Hi > > > 在 2020年8月3日,10:16,song wang 写道: > > > > 查询 integer > > 如果MySQL中数据类型是 INT UNSIGNED,Flink 中 对应的类型是 BIGINT, > 你检查下是不是这个原因,类型映射可以参考[1] > > Best > Leonard > [1] >

Re:Re: flinksql insert overwrite 报错 INSERT OVERWRITE requires JDBC:MySQL DynamicTableSink to implement SupportsOverwrite interface

2020-08-02 Thread chenxuying
谢谢, 明白了 在 2020-08-03 10:42:53,"Leonard Xu" 写道: >如果 DB 支持 upsert 语法,执行的是update, 如果不支持 upsert语法, 则是 delete + insert,MySQL 和 PG >都支持 upsert, 底层对应的sql语句是 > >Database Upsert Grammar >MySQL INSERT .. ON DUPLICATE KEY UPDATE .. >PostgreSQL INSERT .. ON CONFLICT .. DO UPDATE SET .. >

Flink 1.11.1 消费带SASL的Kafka报错: java.lang.IllegalArgumentException: No serviceName defined in either JAAS or Kafka config

2020-08-02 Thread RS
Hi, 我尝试消费SASL机制的Kafka集群 jaas.conf 文件内容: KafkaClient { org.apache.kafka.common.security.plain.PlainLoginModule required username="admin001" password="123456"; }; 执行命令如下: export KAFKA_OPTS="-Djava.security.auth.login.config=/etc/jaas.conf" ./bin/sql-client.sh embedded CREATE TABLE t1

UDF:Type is not supported: ANY

2020-08-02 Thread zilong xiao
最近在写Flink SQL处理数据的时候发现Flink自带的function不太能满足使用,像很常见的Json2Array Json2Map貌似官方都没有实现,所以需要自定义函数来实现,然后我自己尝试用Jackson来实现时发现在语法检查时总是会报 `Type is not supported: ANY`,个人猜想这个是不是和Java泛型的特性有关,由于Java是假泛型,最终泛型会被擦除编程Object才会引发这个异常呢?想到Flink本身也有一个字符串转容器的函数

Re:Re: flinksql insert overwrite 报错 INSERT OVERWRITE requires JDBC:MySQL DynamicTableSink to implement SupportsOverwrite interface

2020-08-02 Thread chenxuying
你好,我这边只是做一个尝试 , 因为之前使用了insert into + 主键做到更新db记录的操作 , 然后现在看到INSERT OVERWRITE的语法就试了一下 , 原来OVERWRITE目前只支持 Filesystem connector 和 Hive table 然后还想问下在使用insert into + 主键 时,如果主键存在 , 则在底层执行sql时是update语句是吗, 还是delete+update , 我们这边之前有个需求是update执行效率太低 , 然后需要用到replace into , 不知道flink是否支持 在

Re: flink 1.11.0 conenctor-jdbc 报错

2020-08-02 Thread Leonard Xu
Hi > 在 2020年8月3日,10:16,song wang 写道: > > 查询 integer 如果MySQL中数据类型是 INT UNSIGNED,Flink 中 对应的类型是 BIGINT, 你检查下是不是这个原因,类型映射可以参考[1] Best Leonard [1] https://ci.apache.org/projects/flink/flink-docs-master/dev/table/connectors/jdbc.html#data-type-mapping

Re: 数据预览

2020-08-02 Thread godfrey he
如果你想在client端拿到query的结果做preview的话,目前API层面支持直接collect或者print执行结果,可以参考 [1] [1] https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sql/queries.html#execute-a-query Jeff Zhang 于2020年8月1日周六 下午11:01写道: > Apache Zeppelin有自己的rest api,你可以用rest api来提交flink sql >

Re: [DISCUSS] FLIP-133: Rework PyFlink Documentation

2020-08-02 Thread Shuiqiang Chen
Hi jincheng, Thanks for the discussion. +1 for the FLIP. A well-organized documentation will greatly improve the efficiency and experience for developers. Best, Shuiqiang Hequn Cheng 于2020年8月1日周六 上午8:42写道: > Hi Jincheng, > > Thanks a lot for raising the discussion. +1 for the FLIP. > > I

Re: [DISCUSS] FLIP-133: Rework PyFlink Documentation

2020-08-02 Thread Shuiqiang Chen
Hi jincheng, Thanks for the discussion. +1 for the FLIP. A well-organized documentation will greatly improve the efficiency and experience for developers. Best, Shuiqiang Hequn Cheng 于2020年8月1日周六 上午8:42写道: > Hi Jincheng, > > Thanks a lot for raising the discussion. +1 for the FLIP. > > I

Re: RocksDBKeyedStateBackend如何写磁盘

2020-08-02 Thread jun su
hi congxian, 感谢回复 , 我会再调查下 , 多谢 Congxian Qiu 于2020年8月2日周日 下午2:11写道: > Hi jiafu > RocksDB 刷磁盘是它自己负责的(writebuffer 满了,就会 flush 到磁盘,具体的可以看下 RocksDB 的文档),另外在 > snapshot 的时候会 flush 一次 writebuffer 来保证一致性。 > 你上面截图的是 Flink 中 wrapper 的一个 write batch 操作,这个方法的含义是,积攒一批 操作 再去写 > rocksdb,和 rocksdb

Re: [Flink Unit Tests] Unit test for Flink streaming codes

2020-08-02 Thread David Anderson
Vijay, There's a section of the docs that describes some strategies for writing tests of various types, and it includes some Scala examples [1]. There are also some nice examples from Konstantin Knauf in [2], though they are mostly in Java. [1]

Re: sporadic "Insufficient no of network buffers" issue

2020-08-02 Thread Rahul Patwari
After debugging more, it seems like this issue is caused by the scheduling strategy. Depending on the tasks assigned to the task manager, probably the amount of memory configured for network buffers is running out. Through these references: FLINK-12122

??????????: Re: Flink????Kafka??Mysql?? End-To-End Exactly-Once????????????

2020-08-02 Thread ??????
MySQL??Connection?? ??Connection A T ??commit()Connection A??A TwoPhaseCommitSinkFunction pendingCommitTransactions??Connection

Re: [Flink Unit Tests] Unit test for Flink streaming codes

2020-08-02 Thread Arvid Heise
Hi Vijay, Any unit test of Flink operators is actually an IT case as it involves a large portion of the stack. A real unit test, would be over a factored out logic class. Similar to Niels, I'd recommend to use simple sources (env.fromElements) and sinks to inject the data and retrieve the data

Re: RocksDBKeyedStateBackend如何写磁盘

2020-08-02 Thread Congxian Qiu
Hi jiafu RocksDB 刷磁盘是它自己负责的(writebuffer 满了,就会 flush 到磁盘,具体的可以看下 RocksDB 的文档),另外在 snapshot 的时候会 flush 一次 writebuffer 来保证一致性。 你上面截图的是 Flink 中 wrapper 的一个 write batch 操作,这个方法的含义是,积攒一批 操作 再去写 rocksdb,和 rocksdb 刷磁盘还不是一回事。 Best, Congxian jun su 于2020年7月31日周五 下午4:57写道: > hi, > > 看到