求和统计后的数据格式-科学计数法

2020-12-28 文章 superainbower
大家好: 有一张Mysql表,flink cdc接了表的binlog,对表中按id分组后对某个字段(DECIMAL(38,2))求和,之后输出到Kafka(id STRING, sum DECIMAL(38,2)); 现在的问题是,Kafka中收到的sum值会以不同形式展示,如下2条数据中的charge_number字段 {"stats_key”:"123","charge_number":18353.83,"charge_duration":38825,"charge_income":5013.8,"charge_count":432}

Re: Some questions about limit push down

2020-12-28 文章 Shengkai Fang
hi, Jun Zhang. Currently, the rule `PushLimitIntoTableSourceScanRule` captures the structure that the `FlinkLogicalSort` node is the parent of the `FlinkLogicalTableSourceScan`. In your case, we have a Calc node between the Sort node and the Scan node, which makes the rule fails to apply. Maybe

Re: Flink 1.11.2客户端 select * from table

2020-12-28 文章 Shengkai Fang
要看一下日志里面是否有报错信息,才能进一步分析。 Jacob <17691150...@163.com> 于2020年12月29日周二 上午9:11写道: > Dear All, > > > > > > 在Flink SQL客户端中使用select * from table 语句查询表数据,结果只显示表头,没有数据,是什么原因。 > >

flink1.10.2 读取mysql并打印数据,本地可以执行,yarn上报错,什么原因呢

2020-12-28 文章 xufengfeng
Caused by: org.apache.flink.runtime.concurrent.FutureUtils$RetryException: Could not complete the operation. Number of retries has been exhausted. at org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$8(FutureUtils.java:284) at

Re: 根据业务需求选择合适的flink state

2020-12-28 文章 张锴
感谢你,稍后我会按这种思路试试 赵一旦 于2020年12月28日周一 下午7:12写道: > 按直播间ID和用户ID分组,使用session window,使用1min作为gap,统计key+window内的count即可,即sum(1)。 > > 或者感觉你打点实际不一定肯定是1min、2min这种整时间点,可以统计key+window内的min/max,然后输出的时候做个减法。 > > session window的作用就是根据连续2个元素的gap决定是否将2个元素放入同一个window中。 > > > 张锴 于2020年12月28日周一 下午5:35写道: > > >

kafka producer ?????????????????????????????

2020-12-28 文章 ??????????
kafka source flink.partition-discovery.interval-millis ??kafka sink partitionmap int[] partitions = (int[])this.topicPartitionsMap.get(targetTopic); if (null == partitions) {

Re: flink 1.12.0 kubernetes-session部署问题

2020-12-28 文章 Yang Wang
ConfigMap不需要提前创建,那个Warning信息可以忽略,是正常的,主要原因是先创建的deployment,再创建的ConfigMap 你可以参考社区的文档[1]把Jm的log打到console看一下 我怀疑是你没有创建service account导致的[2] [1]. https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/native_kubernetes.html#log-files [2].

Re: flink1.12????OSError: Expected IPC message of type schema but got record batch

2020-12-28 文章 ??????
??udfMySQL import pymysql import pandas as pd def pole_record_perid1(poleId: int, current_time: int, days: int): days_delta_ts = current_time - days * 24 * 60 * 60 * 1000 days_mh_delta = '''select rt,ts from test where poleId={} and ts

Flink 1.11.2客户端 select * from table

2020-12-28 文章 Jacob
Dear All, 在Flink SQL客户端中使用select * from table 语句查询表数据,结果只显示表头,没有数据,是什么原因。 在sql-client-defaults.yaml中已经指定catalog - Thanks! Jacob -- Sent from:

flink 1.12 Cancel Job??????????(??)

2020-12-28 文章 ??????
flink sqlCancelCancelIDEA??CheckpointsCanceljobTaskManager??

Re: flink1.12错误OSError: Expected IPC message of type schema but got record batch

2020-12-28 文章 Xingbo Huang
Hi, 我试了一下这个版本的pyarrow,跑了一下现有的test并没有能复现这个问题。你方便提供一下你的pandas udf的内容吗? Best, Xingbo 小学生 <201782...@qq.com> 于2020年12月28日周一 下午3:07写道: > 您好,我使用的pyarrow是0.17.1。

Re: 根据业务需求选择合适的flink state

2020-12-28 文章 赵一旦
按直播间ID和用户ID分组,使用session window,使用1min作为gap,统计key+window内的count即可,即sum(1)。 或者感觉你打点实际不一定肯定是1min、2min这种整时间点,可以统计key+window内的min/max,然后输出的时候做个减法。 session window的作用就是根据连续2个元素的gap决定是否将2个元素放入同一个window中。 张锴 于2020年12月28日周一 下午5:35写道: > 能描述一下用session window的考虑吗 > > Akisaya 于2020年12月28日周一 下午5:00写道: > >

Re: Flink RocksDBStateBackend 可以设置阿里云 OSS 存储吗?

2020-12-28 文章 Yun Tang
Hi 王磊, 当然是可以的,state backend的checkpoint地址其实依赖于Flink的file system实现,只要参照文档[1]的描述,对oss进行相关配置即可。 [1] https://ci.apache.org/projects/flink/flink-docs-stable/deployment/filesystems/oss.html#shaded-hadoop-oss-file-system 祝好 唐云 From: Lei Wang Sent: Monday, December

Re:flink 1.12.0 kubernetes-session部署问题

2020-12-28 文章 陈帅
今天改用官方最新发布的flink镜像版本1.11.3也启不起来 这是我的命令 ./bin/kubernetes-session.sh \ -Dkubernetes.cluster-id=rtdp \ -Dtaskmanager.memory.process.size=4096m \ -Dkubernetes.taskmanager.cpu=2 \ -Dtaskmanager.numberOfTaskSlots=4 \ -Dresourcemanager.taskmanager-timeout=360 \

Re: 根据业务需求选择合适的flink state

2020-12-28 文章 张锴
能描述一下用session window的考虑吗 Akisaya 于2020年12月28日周一 下午5:00写道: > 这个可以用 session window 吧 > > https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#session-windows > > news_...@163.com 于2020年12月28日周一 下午2:15写道: > > >

Re: 根据业务需求选择合适的flink state

2020-12-28 文章 张锴
能描述一下用session window的考虑吗 Akisaya 于2020年12月28日周一 下午5:00写道: > 这个可以用 session window 吧 > > https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#session-windows > > news_...@163.com 于2020年12月28日周一 下午2:15写道: > > >

Some questions about limit push down

2020-12-28 文章 Jun Zhang
when I query hive table by sql, like this `select * from hivetable where id = 1 limit 1`, I found that the limit push down is invalid, is it a bug or was it designed like this? if the sql is 'select * from hivetable limit 1' ,it is ok thanks

Re: 根据业务需求选择合适的flink state

2020-12-28 文章 Akisaya
这个可以用 session window 吧 https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#session-windows news_...@163.com 于2020年12月28日周一 下午2:15写道: > 这么做的前提是每条记录是顺序进入KAFKA的才行,但真实场景不能保证这条,有可能较早的打点记录却较晚进入kafka队列。 > > > > news_...@163.com > > 发件人: 张锴 > 发送时间: 2020-12-28 13:35

Flink RocksDBStateBackend 可以设置阿里云 OSS 存储吗?

2020-12-28 文章 Lei Wang
如题, 可以直接这样写吗? env.setStateBackend(new RocksDBStateBackend(“oss://”, true)); 谢谢, 王磊