Re: Missing image tag in apache/flink repository ?

2022-11-15 Thread godfrey he
Thanks for reporting this, I will resolve it ASAP. Best, Godfrey Alon Halimi via user 于2022年11月15日周二 16:46写道: > > Hello :) > > > > It seems the tag “apache/flink:1.16.0-scala_2.12” is missing – I get the > following error: > > > > failed to pull and unpack image

Re: Flink-1.15.0 在使用cumulate window报key group 不在范围内的错误

2022-05-27 Thread godfrey he
使用了什么state backend?能描述一下产生上述问题的步骤吗? 是直接跑作业就产生上述错误,还是作业有基于sp启动,或者是中途重启过? zhangbin 于2022年5月27日周五 13:34写道: > > Retry > 回复的原邮件 > 发件人 zhangbin > 发送日期 2022年05月27日 10:11 > 收件人 godfre...@gmail.com > 抄送人 user-zh > 主题 回复:Flink-1.15.0 在使用cumulate window报key group 不在范围内的错误 >

Re: Flink-1.15.0 在使用cumulate window报key group 不在范围内的错误

2022-05-26 Thread godfrey he
把异常栈也发出来吧 zhangbin 于2022年5月26日周四 22:54写道:

Re: flink创建视图后,SELECT语句后使用OPTIONS报错

2022-02-17 Thread godfrey he
r-3.4.14.jar > flink-sql-connector-mysql-cdc-2.1.1.jar > flink-table_2.11-1.13.0.jar > flink-table-blink_2.11-1.13.0.jar > log4j-1.2-api-2.12.1.jar > log4j-api-2.12.1.jar > log4j-core-2.12.1.jar > log4j-slf4j-impl-2.12.1.jar > -邮件原件- > 发件人: godfrey he [mailto:godfre...

Re: flink创建视图后,SELECT语句后使用OPTIONS报错

2022-02-16 Thread godfrey he
Hi liangjinghong, 原因是 blink planner 中引入并修改了 SqlTableRef 类, 而 Legacy planner 中没有引入 SqlTableRef 类,从而导致加载到了Calcite 中 SqlTableRef (该类有问题)。 解决方案:如果只使用到了blink planner,可以把legacy planner 的包冲lib下移除。 Best, Godfrey liangjinghong 于2022年2月14日周一 17:26写道: > 各位老师们好,以下代码在开发环境中可以执行,打包部署后报错: > > 代码: > > CREATE

Re: sql-gateway和jdbc-driver还维护吗?

2022-01-11 Thread godfrey he
Hi Ada, sql-gateway之前没有维护起来,确实是一个遗憾。 最近我们也关注到大家对batch的兴趣越来越浓,sql-gateway还会继续维护。 btw,非常欢迎分享一下你们使用Flink替换Spark遇到的一些痛点,我们会逐渐去解决这些痛点 Best, Godfrey Ada Wong 于2022年1月12日周三 10:09写道: > > cc tsreaper and Godfrey He > > 文末丶 <809097...@qq.com.invalid> 于2022年1月10日周一 19:39写道:

Re: 创建表t1的视图v1之后rowtime属性丢失

2021-11-02 Thread godfrey he
可以把具体的sql发出来看看 yidan zhao 于2021年11月2日周二 下午7:06写道: > > 如题,我原先基于flink1.11和1.12貌似没这个问题。目前基于1.13出现这个问题。 > 问题描述如下: > 我t1是kafka表,其中有个属性是event_time是row time属性,然后创建了view v1,通过select , > event_time from t1这样创建。 现在问题是这么创建之后,我基于v1查询报错说aggre.. window只能在time > attributes上定义。 >

Re: Re: Re: 公司数据密文,实现group by和join

2021-11-01 Thread godfrey he
上传的图片没法显示,通过图床工具或纯文本方式重新发一遍 lyh1067341434 于2021年11月1日周一 上午10:42写道: > 您好! > > 这样好像还是不行,因为group by id ,id还是密文字符串,还是会把id当成字符串处理,所以还是不能正确分组; > 为了更清楚表达,下面为图示: > > 谢谢您! > > > > > > > > 在 2021-10-29 10:49:35,"Caizhi Weng" 写道: > >Hi! > > > >你是不是想写这样的 SQL: > > > >SELECT id, sum(price) AS total_price

[ANNOUNCE] Apache Flink 1.11.4 released

2021-08-10 Thread godfrey he
The Apache Flink community is very happy to announce the release of Apache Flink 1.11.4, which is the fourth bugfix release for the Apache Flink 1.11 series. Apache Flink® is an open-source stream processing framework for distributed, high-performing, always-available, and accurate data

Re: k8s session模式SQLclient怎样连接

2021-07-23 Thread godfrey he
我建了一个jira,建议sql client把作业提交到各种集群的方式在文档里写清楚, 可以关注 https://issues.apache.org/jira/browse/FLINK-23483 Best, Godfrey Caizhi Weng 于2021年7月23日周五 上午10:12写道: > Hi! > > 可以考虑把 k8s session 的 flink rest api 地址暴露出来,然后客户端把 execution.target 设为 > remote,rest.address 和 rest.port 设为相应地址。 > >

Re: Lateral join not finding correlate variable

2020-11-19 Thread godfrey he
gt; > LEFT JOIN LATERAL ( > > SELECT > > attr1, > > attr3 > > FROM ( > > SELECT > > attr1, > > attr3, > > ROW_NUMBER() OVER ( > > PARTITION

Re: Lateral join not finding correlate variable

2020-11-18 Thread godfrey he
> > > > def eval(str: String, separator: String = ";"): Unit = { > > if (str != null) { > > str.split(separator).foreach(s => collect(Row.of(s.trim( > > } > > } > > } > > > > Removing the lateral table bit in that

Re: Lateral join not finding correlate variable

2020-11-18 Thread godfrey he
Hi Dylan, Could you provide which Flink version you find out the problem with? I test the above query on master, and I get the plan, no errors occur. Here is my test case: @Test def testLateralJoin(): Unit = { util.addTableSource[(String, String, String, String, String)]("table1", 'id, 'attr1,

Re: Calcite在嵌套多层包含where条件的sql语句时优化器OOM

2020-09-22 Thread godfrey he
例如 calc merge rule,还有calc,agg等其他相关rule,点比较散。得具体看 jun su 于2020年9月23日周三 上午10:22写道: > hi godfrey, > 方便说下是哪些rule fix了这个问题么? 我对这个比较好奇 , 想看下是什么原因导致的 > > godfrey he 于2020年9月23日周三 上午10:09写道: > > > Hi Jun, > > > > 可能是old planner缺少一些rule导致遇到了corner case, > > b

Re: Calcite在嵌套多层包含where条件的sql语句时优化器OOM

2020-09-22 Thread godfrey he
ano, 而blink貌似没用hep, > > 我将hep代码注释后valcano的迭代次数会大幅减少, 语句嵌套10层基本在4000次左右能获取最佳方案,我再debug看下原因 > > > > godfrey he 于2020年9月22日周二 下午8:58写道: > > > >> blink planner 有这个问题吗? > >> > >> jun su 于2020年9月22日周二 下午3:27写道: > >> > >> > hi all,

Re: Calcite在嵌套多层包含where条件的sql语句时优化器OOM

2020-09-22 Thread godfrey he
blink planner 有这个问题吗? jun su 于2020年9月22日周二 下午3:27写道: > hi all, > > 环境: flink-1.9.2 flink table planner > 现象: 代码一直在 VolcanoPlanner.findBestExp()方法中出不来, 直到OOM > > 发现在嵌套4层时 findBestExp方法中while(true)会循环3w多次后成功退出, 嵌套5层会达到几十万级别, 导致进程OOM > --- > 代码: > >

Re: Flink 1.11 jdbc查pg失败

2020-09-17 Thread godfrey he
据我所知,目前flink是大小写不敏感,但是pg是大小写敏感。这问题暂时没法解 wdmcode 于2020年9月10日周四 上午9:44写道: > Hi Jimmy > > 给字段加双引号试试呢 > Select “F1”,”F2” from xxx.xxx; > > > 发件人: Jimmy Zhang > 发送时间: Thursday, September 10, 2020 9:41 AM > 收件人: user-zh@flink.apache.org > 主题: Flink 1.11 jdbc查pg失败 > > flink 1.11用jdbc查询pg表时,pg表的字段是大写

Re: flink sql执行sql语句无法执行的错误-No operators defined in streaming topology. Cannot execute.

2020-09-17 Thread godfrey he
能提供完整的demo吗? me 于2020年9月11日周五 下午6:54写道: > 1.flink 版本是1.11.1 > streamEnv = StreamExecutionEnvironment.getExecutionEnvironment > streamBlinkSettings = > EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build() > streamTableEnv = StreamTableEnvironment.create(streamEnv, >

Re: 多线程模式下使用Blink TableEnvironment

2020-09-17 Thread godfrey he
TableEnvironment 不是多线程安全的。 btw, 你能描述一下你在多线程情况下怎么使用 TableEnvironment 的吗? Jeff Zhang 于2020年9月14日周一 下午12:10写道: > 参考zeppelin的做法,每个线程里都调用这个 > > > https://github.com/apache/zeppelin/blob/master/flink/interpreter/src/main/java/org/apache/zeppelin/flink/FlinkSqlInterrpeter.java#L111 > > > jun su

Re: flink hive批量作业报FileNotFoundException

2020-09-17 Thread godfrey he
cc @Rui Li 李佳宸 于2020年9月14日周一 下午5:11写道: > 大家好~我执行batch table的作业写入hive时,会出现FileNotFoundException的错误。找不到.staging文件 > 版本是1.11.1 > Caused by: java.io.FileNotFoundException: File > > hdfs://gykjcluster/user/hive/warehouse/etl_et_flink_sink.db/ods_et_es_financialestimate/.staging_1600070419144 > does

Re: 关于flink cdc 测试时遇到的几种问题,比较疑惑,各位大佬求帮助

2020-09-17 Thread godfrey he
sql client的默认并发为1,如果没有在sql-client-defaults.yaml显示设置parallelism,代码里面的默认并发为1.因此需要显示的设置 sql-client-defaults.yaml的parallelism Jark Wu 于2020年9月15日周二 上午11:43写道: > Hi, > > 请问 > 1. 有完整的异常栈吗? 你是怎么从 ck 恢复的呢? 用的什么命令? > 2. 是的。因为 source 只能并发1。先写到 kafka,再从 kafka 同步是可以的。 > > Best, > Jark > > On Fri, 11 Sep

Re: Flink SQL create view问题

2020-09-17 Thread godfrey he
已知问题,已fix:https://issues.apache.org/jira/browse/FLINK-18750 guaishushu1...@163.com 于2020年9月16日周三 下午2:32写道: > 当create_view和LATERAL TABLE 共用时 会出现字段找不到异常 > > 语法: > CREATE TABLE billing_data_test ( > message STRING > > > create view v1 as > select T.* > from billing_data_test, > LATERAL

Re: Flink SQL TableSource复用问题,相同数据源聚合多个指标,引擎创建多个相同的数据源

2020-09-17 Thread godfrey he
blink 根据每个算子的digest信息来判断是否可以reuse(只有digest完全一样才可以reuse), 例如table source节点,算子信息包括:表名,select的字段信息,其他push down之后的信息等。 你可以通过explain的方式把plan打印出来看看,source的digest是否一样 Jingsong Li 于2020年9月17日周四 下午2:45写道: > 你仔细看看这两个数据源是不是有什么不同 > 只要有一点不同,Blink 就 reuse 不了 > > On Thu, Sep 17, 2020 at 11:10 AM Kevin Dai

Re: flink 1.9 关于回撤流的问题

2020-09-17 Thread godfrey he
可以用flink提供的“去重"语法来支持 [1] https://ci.apache.org/projects/flink/flink-docs-master/zh/dev/table/sql/queries.html#%E5%8E%BB%E9%87%8D Shengkai Fang 于2020年9月15日周二 下午4:02写道: > hi, 我对于使用upsert > > kafka能够省state感到疑惑。金竹老师提供的实现只是丢掉了delete消息,你的下游表依旧需要手动去重才可以得到准确的结果才对啊。如果每个下游表都手动去重这样子还能省state吗? > > star

Re: Flink Table SQL, Kafka, partitions and unnecessary shuffling

2020-09-17 Thread godfrey he
Hi Dan, What kind of joins [1] you are using? Currently, only temporal join and join with table function do not reshuffle the input data in Table API and SQL, other joins always reshuffle the input data based on join keys. [1]

Re: flink-sql-gateway还会更新吗

2020-08-30 Thread godfrey he
已更新至flink1.11.1 godfrey he 于2020年8月24日周一 下午9:45写道: > 我们会在这周让flink-sql-gateway支持1.11,请关注 > 另外,sql-client支持gateway模式,据我所知目前还没计划。 > > shougou <80562...@qq.com> 于2020年8月24日周一 上午9:48写道: > >> 也有同样的问题,同时也问一下,sql client 计划在哪个版本支持gateway模式?多谢 >> >> >> >

Re: flink1.11 sql api使用per job模式提交后,客户端退出

2020-08-24 Thread godfrey he
如果是通过TableEnvironment#execute方法提交需要设置execution.attached=true, 或者是通过flink cli的 加上-d 如果是通过TableEnvironment#executeSql方法提交,需要代码里显示的等待作业结束: TableResult tableResult = tEnv.executeSql(xxx); // wait job finished

Re: flink-sql-gateway还会更新吗

2020-08-24 Thread godfrey he
我们会在这周让flink-sql-gateway支持1.11,请关注 另外,sql-client支持gateway模式,据我所知目前还没计划。 shougou <80562...@qq.com> 于2020年8月24日周一 上午9:48写道: > 也有同样的问题,同时也问一下,sql client 计划在哪个版本支持gateway模式?多谢 > > > > -- > Sent from: http://apache-flink.147419.n8.nabble.com/

Re: Flink log4j2 问题

2020-08-24 Thread godfrey he
检查一下log4j2相关的版本,参考[1] [1] https://stackoverflow.com/questions/50970960/facing-issue-with-log4j2-java-lang-exceptionininitializererror guaishushu1...@163.com 于2020年8月24日周一 上午11:18写道: > SQL提交会出现这种问题??? > Caused by: java.lang.IllegalArgumentException: Initial capacity must be at > least one but

Re: Format for timestamp type in Flink SQL

2020-08-18 Thread godfrey he
Hi Youngwoo, > 1. TIMESTAMP WITH LOCAL TIME ZONE Currently, SQL client uses legacy types for the collect sink, that means `TIMESTAMP WITH LOCAL TIME ZONE` is not supported. you can refer to [1] to find the supported types, and there is a pr [2] to fix this. >2. TIMESTAMP(3) WITH LOCAL TIME ZONE

Re: ScalarFunction 访问 state

2020-08-18 Thread godfrey he
看看deduplication语法[1] 是否满足你的需求 [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/sql/queries.html#deduplication forideal 于2020年8月17日周一 下午12:13写道: > Hi, > > 最近我有一个使用 Flink SQL 做简单的数据去重的需求,想使用 Flink 的 `ScalarFunction`,通过阅读 > API 发现 FunctionContext context 并不支持访问

Re: flink 1.11 SQL idea调试无数据也无报错

2020-08-18 Thread godfrey he
> GROUP BY TUMBLE(ts, INTERVAL '1' HOUR) 是要1个小时的window结束才会出结果。 你可以通过把window缩小或者设置early-fire来提早看到数据 table.exec.emit.early-fire.enabled=true table.exec.emit.early-fire.delay=xx > 手动拿到那个executeSql的返回的TableResult,然后去 wait job finished 这个是为了防止本地ide里执行时executeSql执行结束后进程退出导致job也强制结束 DanielGu

Re: flink 1.11.1 sql client 流式 join 出现预期之外的含 null 行

2020-08-13 Thread godfrey he
可以把原始的计算结果打印出来,执行 set execution.result-mode=changelog (如果source有delete消息,可能会出现null值) LittleFall <1578166...@qq.com> 于2020年8月13日周四 下午3:33写道: > mysql 的建表语句 > use test; > create table base ( > id int primary key, > location varchar(20) > ); > create table stuff( > id int

Re: FlinkSQL命令行方式提交sql任务的jar依赖问题

2020-08-13 Thread godfrey he
sql client 中通过 -j 或者 -l 的指定的包会被随着job提交的时候一起上传到jm。 Zhao,Yi(SEC) 于2020年8月13日周四 下午5:11写道: > A是10机器集群(HA模式,独立集群),B作为提交机器。 > 从我实验效果来看,我是先启动一个sql-client的cli,如下命令: > ./bin/sql-client.sh embedded -l $(pwd)/libs_sql -l $(pwd)/libs_udf > 其中libs_sql中有:flink-connector-kafka_2.12-1.10.0.jar >

Re: GroupBy with count on a joint table only let met write using toRetractStream

2020-08-11 Thread godfrey he
Hi Faye, 1) In your sql, different events are for different groups, it seems hard to extract a global Filter into DataStream. 2) AFAK, you can just drop the retract message (the flag is false), and then convert the retract stream to append stream. The downstream job needs to duplicate the

Re: flink 1.11 使用sql将流式数据写入hive

2020-08-11 Thread godfrey he
tEnv.executeSql(insertSql); 是异步提交完任务就返回了, 如果是IDE里运行的话话,进程就直接退出导致job也就结束了。需要需要等到job结束, 目前可以通过下面这种方式 TableResult result = tEnv.executeSql(insertSql); result..getJobClient().get().getJobExecutionResult(Thread.currentThread().getContextClassLoader()).get(); 另外 tEnv.executeSql(insertSql);

Re: flink sql状态清理问题

2020-08-09 Thread godfrey he
配置了 TableConfig 中的 minIdleStateRetentionTime 和 maxIdleStateRetentionTime 吗? Benchao Li 于2020年8月10日周一 上午10:36写道: > Hi, > > 最好也说一下使用的Flink版本以及对应的SQL,这样可以让其他同学容易复现这个问题。 > > op <520075...@qq.com> 于2020年8月10日周一 上午10:27写道: > > > Hi > > 在使用flink sql的过程中遇到如下情况,在配置了如下选项后: > > val config =

Re: 来自郭华威的邮件

2020-08-09 Thread godfrey he
BatchTableEnvironmentImpl 属于 old planner, 缺少 flink-table-planner_${scala.binary.version}.jar 的依赖 郭华威 于2020年8月10日周一 上午10:21写道: > flink1.11.1 使用tableApi 报错: > Exception in thread "main" org.apache.flink.table.api.TableException: > Create BatchTableEnvironment failed. > at >

Re: Submit Flink 1.11 job from java

2020-08-06 Thread godfrey he
hi Flavio, Maybe you can try env.executeAsync method, which just submits the job and returns a JobClient. Best, Godfrey Flavio Pompermaier 于2020年8月6日周四 下午9:45写道: > Hi to all, > in my current job server I submit jobs to the cluster setting up an SSH > session with the JobManager host and

Re: Re: Re: FLINK SQL view的数据复用问题

2020-08-05 Thread godfrey he
目前sql-client还不支持。关于纯SQL文本statement set的支持, 目前社区已经达成语法的一致意见,应该后续会慢慢的支持。 kandy.wang 于2020年8月5日周三 下午10:43写道: > > > > > > > @ godfrey > 你说的这种StatementSet 提交方式,在sql-client提交任务的时候不支持吧? 可以给加上么。 > > > > > > > > > > > > 在 2020-08-04 19:36:5

Re: Unexpected unnamed sink in SQL job

2020-08-04 Thread godfrey he
I think we assign a meaningful name to sink Transformation like other Transformations in StreamExecLegacySink/BatchExecLegacySink. Paul Lam 于2020年8月4日周二 下午5:25写道: > Hi Jingsong, > > Thanks for your input. Now I understand the design. > > I think in my case the StreamingFileCommitter is not

Re: Re: FLINK SQL view的数据复用问题

2020-08-04 Thread godfrey he
端是没有复用呢?理论上source + > Deduplicate 都是view里的逻辑,都应该复用才对。就是感觉复用的还不够多呢。 > > > 在 2020-08-04 17:26:02,"godfrey he" 写道: > >blink planner支持将多sink的query优化成尽量复用重复计算部分。 > >1.11里用StatementSet来提交job,1.11之前用sqlUpdate/insertInto + execute提交任务 > > > >kandy.wang 于2020

Re: FLINK SQL view的数据复用问题

2020-08-04 Thread godfrey he
blink planner支持将多sink的query优化成尽量复用重复计算部分。 1.11里用StatementSet来提交job,1.11之前用sqlUpdate/insertInto + execute提交任务 kandy.wang 于2020年8月4日周二 下午5:20写道: > FLINK SQL view相关问题: > create view order_source > > as > > select order_id, order_goods_id, user_id,... > > from ( > > ..

Re: Re: 有界数据中batch和stream的区别

2020-08-04 Thread godfrey he
feMemoryBudget.verifyEmpty(UnsafeMemoryBudget.java:64) > ... > at > org.apache.flink.runtime.taskexecutor.TaskExecutor.onStop(TaskExecutor.java:422) > ... 21 more > [CIRCULAR REFERENCE:java.lang.NoClassDefFoundError: Could not initialize > class org.apache.flink.util.JavaGcCleanerWrapper] >

Re: 有界数据中batch和stream的区别

2020-08-03 Thread godfrey he
逻辑上批产生的结果是Table,流产生的结果是Changelog。 你在例子中Table的结果和changelog的结果是一样的,所以你感觉差不多。 最简单的方式可以将query改为带group by的,再看结果的差异。 更多关于Table和Changelog的概念可以参考 [1] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/zh/dev/table/streaming/dynamic_tables.html chenxuying 于2020年8月4日周二 上午11:44写道: > hi : >

Re: Flink DDL 写 Hive parquet 是否支持 snappy压缩

2020-08-03 Thread godfrey he
parquet.compression=SNAPPY,更多信息可参考[1] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/connectors/formats/parquet.html#format-options lydata 于2020年8月4日周二 上午11:39写道: > Flink DDL的方式 写 Hive parquet 格式 ,是否支持 snappy压缩,如果支持 请问下参数是什么?

Re: UDF:Type is not supported: ANY

2020-08-03 Thread godfrey he
你把Map换为Map试试 zilong xiao 于2020年8月3日周一 下午4:56写道: > 目前转List可以用数组代替,Map貌似没法成功运行 > > zilong xiao 于2020年8月3日周一 上午10:43写道: > > > 最近在写Flink SQL处理数据的时候发现Flink自带的function不太能满足使用,像很常见的Json2Array > > Json2Map貌似官方都没有实现,所以需要自定义函数来实现,然后我自己尝试用Jackson来实现时发现在语法检查时总是会报 `Type is > not > > supported: > > >

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: StatementSet 里添加多个insertsql执行

2020-07-30 Thread godfrey he
StatementSet 中的多个insert会被编译成一个job提交。 你能提供一下对应的代码样例吗? op <520075...@qq.com> 于2020年7月30日周四 下午3:57写道: > 大家好,我发现StatementSet 里添加2个insertsql执行的时候会启动两个application, > 这两个任务除了sink都是一样的吗?这样是不是会重复计算和浪费资源,而且两边的数据可能不同步, > 有什么办法能解决? > 谢谢

Re: [DISCUSS] add a '--filename' parameter for sql-client

2020-07-28 Thread godfrey he
t suitable for > executing sql files > > godfrey he 于2020年7月29日周三 上午9:56写道: > >> hi Jun, >> >> Currently, sql client has supported -u option, just like: >> ./bin/sql-client.sh embedded -u "insert_statement". >> >> There is already a JIRA [

Re: [DISCUSS] add a '--filename' parameter for sql-client

2020-07-28 Thread godfrey he
t suitable for > executing sql files > > godfrey he 于2020年7月29日周三 上午9:56写道: > >> hi Jun, >> >> Currently, sql client has supported -u option, just like: >> ./bin/sql-client.sh embedded -u "insert_statement". >> >> There is already a JIRA [

Re: [DISCUSS] add a '--filename' parameter for sql-client

2020-07-28 Thread godfrey he
hi Jun, Currently, sql client has supported -u option, just like: ./bin/sql-client.sh embedded -u "insert_statement". There is already a JIRA [1] that wants to support -f option [1] https://issues.apache.org/jira/browse/FLINK-12828 Best, Godfrey Jun Zhang 于2020年7月29日周三 上午9:22写道: > I want

Re: flink1.11.0 执行sqlQuery时报NullPointException

2020-07-28 Thread godfrey he
VIDERS > > .set(JaninoRelMetadataProvider.of(FlinkDefaultRelMetadataProvider.INSTANCE()))后确实不报这个错了。 > > 题外话,个人认为flink不应该将这样的异常抛给用户去解决,除非我去深入研究源码,要不然根本无法搞清楚具体发生了什么,在封装性上还有待改善。 > ________ > 发件人: godfrey he > 发送时间: 2020年7月28日 13:55 > 收件人: user

Re: flink1.11.0 执行sqlQuery时报NullPointException

2020-07-27 Thread godfrey he
一次都会创建一个TableEnvironment > > 发件人: godfrey he > 发送时间: 2020年7月28日 9:58 > 收件人: user-zh > 主题: Re: flink1.11.0 执行sqlQuery时报NullPointException > > 你们是否在多线程环境下使用 TableEnvironment ? > TableEnvironment 不是线程安全的,多线程情况使用可能出现一些莫名其妙的问题。 > > g

Re: flink1.11.1使用Table API Hive方言的executSql报错

2020-07-27 Thread godfrey he
你的包是完整的flink-1.11.1的包吗? 例如 check一下 ClusterClientJobClientAdapter 这个类是否继承 CoordinationRequestGateway ? shimin huang 于2020年7月28日周二 上午11:21写道: > Hi,all: > 本人基于Flink1.11.1的table API使用Hive方言,调用executSql方法后报错,堆栈信息如下: > org.apache.flink.client.program.ProgramInvocationException: The main method >

Re: flink1.11.0 执行sqlQuery时报NullPointException

2020-07-27 Thread godfrey he
你们是否在多线程环境下使用 TableEnvironment ? TableEnvironment 不是线程安全的,多线程情况使用可能出现一些莫名其妙的问题。 godfrey he 于2020年7月28日周二 上午9:55写道: > hi 能给出详细的schema信息吗? > > wind.fly@outlook.com 于2020年7月27日周一 > 下午7:02写道: > >> 补充一下,执行的sql如下: >> >>

Re: flink1.11.0 执行sqlQuery时报NullPointException

2020-07-27 Thread godfrey he
hi 能给出详细的schema信息吗? wind.fly@outlook.com 于2020年7月27日周一 下午7:02写道: > 补充一下,执行的sql如下: > > select order_no, order_time from > x.ods.ods_binlog_test_trip_create_t_order_1 > > > 发件人: wind.fly@outlook.com > 发送时间: 2020年7月27日 18:49 > 收件人: user-zh@flink.apache.org

Re: flink 1.11 ddl sql 添加PROCTIME()列,读取csv错误

2020-07-23 Thread godfrey he
和hive结合下,filesystem是支持流式读取的,可以参考 [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/zh/dev/table/hive/hive_streaming.html#streaming-reading Leonard Xu 于2020年7月23日周四 下午10:28写道: > Hi, > > Filesystem connector 支持streaming 写入,streaming 读取 > 还未支持,所以读取完了就停止。支持streaming

Re: Re: flink sqlUpdate,如何获取里面的字段,字段类型,with 等3个属性

2020-07-23 Thread godfrey he
1.10 也是支持的 Michael Ran 于2020年7月22日周三 下午9:07写道: > 1.tableEvn.from(xx).getSchema() 我确实通过这个拿到了schema,2.with > properties属性很重要 ,关系我自定义的一些参数设定。3.关于 catalog 这个东西,是不是只有1.11 > 版本才能从catalog 获取 with properties 哦? 1.10 you 有支持吗 > 在 2020-07-22 18:22:22,"godfrey he"

Re: flink 1.11 ddl 写mysql的问题

2020-07-23 Thread godfrey he
你观察到有sink写不过来导致反压吗? 或者你调大flush interval试试,让每个buffer攒更多的数据 曹武 <14701319...@163.com> 于2020年7月23日周四 下午4:48写道: > 我使用fink 1.11.1 做cdc,发现一秒钟只能写100条左右数据到mysql,请问有优化方案,或者是其他的批量写入的方案建议嘛 > 代码如下: > String sourceDdl =" CREATE TABLE debezium_source " + > "( " + > "id

Re: Re: 回复:flink Sql 1.11 executeSql报No operators defined in streaming topology

2020-07-23 Thread godfrey he
hi, 目前没有解决办法,insert job根据sink表名自动生成job name。 后续解法关注 https://issues.apache.org/jira/browse/FLINK-18545 Weixubin <18925434...@163.com> 于2020年7月23日周四 下午6:07写道: > Hi, > 我想请教下,使用streamExecutionEnv.execute("from kafka sink hbase") 是可以指定Job的名称。 > 而当改用streamTableEnv.executeSql(sql)的方式时,似乎无法定义Job的名称。 >

Re: flink 1.11 executeSql查询kafka表print没有输出

2020-07-23 Thread godfrey he
867#event-3578490750> Best, Godfrey wind.fly@outlook.com 于2020年7月23日周四 下午7:34写道: > Hi,Godfrey: > 加了checkpoint后确实可以了,能具体讲一下原理吗?print是在完成快照的时候顺便把结果输出了吗?或者有没有相关文档? > > Best, > Junbao Zhang > ________ > 发件人: godfrey he > 发送时间: 2020年7月23日

Re: flink 1.11 executeSql查询kafka表print没有输出

2020-07-23 Thread godfrey he
1.11的 TableResult.collect() 和 TableResult.print() 方法在流模式下, 都是exactly once语义,需要配置checkpoint才能得到结果。 Best, Godfrey wind.fly@outlook.com 于2020年7月23日周四 下午7:22写道: > Hi, all: > > 本人当前使用flink版本1.11.0,但是在执行executeSql后,print时没有在console打印出结果(查看kafka是一直有数据产生的), > sql如下: > > >

Re: 回复:flink Sql 1.11 executeSql报No operators defined in streaming topology

2020-07-23 Thread godfrey he
这个问题的已经有一个issue:https://issues.apache.org/jira/browse/FLINK-18545,请关注 WeiXubin <18925434...@163.com> 于2020年7月23日周四 下午6:00写道: > Hi, > 我想请问下使用 streamExecutionEnv.execute("from kafka sink > hbase"),通过这种方式可以给Job指定名称。 > 而当使用streamTableEnv.executeSql(sql)之后似乎无法给Job定义名称。 > 请问有什么解决方案吗?谢谢 > > > > -- >

Re: flink sqlUpdate,如何获取里面的字段,字段类型,with 等3个属性

2020-07-22 Thread godfrey he
tableEnv 中 可以通过 tableEvn.from(xx).getSchema() 拿到该表的schema信息,但是没法拿到对应的properties。 如果要拿到properties,可以通过catalog的接口得到 [1]。 如果要自定义实现source/sink,可以参考 [2] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/zh/dev/table/catalogs.html [2]

Re: 关于1.11Flink SQL 全新API设计的一些问题

2020-07-22 Thread godfrey he
; >诚然,DataStream的灵活性确实会是一把双刃剑,但就像@leonard提到的,平台层和应用层的目的和开发重点可能也不太一样,对Flink > API使用侧重点也不同。我个人还是希望可以在享受全新API设计优势同时, > > 可以继续使用DataStream(Transformation)的灵活性,助力Flink组件在我们组的开落地 > > > 再次感谢各位的回复! > > > 发件人: Jark Wu > 发送时间: 2020年7月2

Re: Flink catalog的几个疑问

2020-07-21 Thread godfrey he
hi Xingxing, 1. Flink 提供了一套catalog的接口,提提供了几个内置的实现:in-memory catalog, hive catalog, postgres catalog, 可以根据自己的需求选择。也可以实现自定义的catalog。参考 [1] 2. hive catalog 主要是对接 hive,方便读取现有的hive catalog的meta信息。当然也可以往hive catalog写新的meta。 是否会转为默认catalog,据我所知,目前没有。 3. 一般没什么问题。在和其他区分大小写的db对接的时候,可能有问题。 Best, Godfrey

Re: [sql-client] 如何绕过交互式模式去做ddl

2020-07-21 Thread godfrey he
sql-client.sh的-u是指update语句,目前只支持insert。 Jark Wu 于2020年7月21日周二 下午6:47写道: > Hi, > > 你想要的是类似于 sql-client.sh -u 的功能,直接通过命令行去执行 ddl 是么?非常抱歉,目前这是不支持的。 > 社区的e2e测试目前也是通过 Java 代码来调用 sql-client.sh 来实现执行 ddl 的。 > 不过社区是有计划支持 sql-client.sh 执行一个 sql 文件的,可以关注下FLINK-12828. > > Best, > Jark > > On Thu, 16 Jul

Re: flink1.11 tablefunction

2020-07-21 Thread godfrey he
可以,定义清楚 getResultType 和 getParameterTypes, 可以参考[1] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/functions/udfs.html#implementation-guide Dream-底限 于2020年7月21日周二 下午7:25写道: > hi > >

Re: flink table同时作为写出及输入时下游无数据

2020-07-21 Thread godfrey he
你可以先只跑第一个insert,然后check一下g_sink_unit是否有数据。 另外,你可以把query 改为都读取 kafka_source_tab 再分别写到两个不同的sink: sql1='''Insert into g_sink_unit select alarm_id,trck_id from kafka_source_tab''' sql2='''Insert into g_summary_base select alarm_id,trck_id from kafka_source_tab;''' 小学生 <201782...@qq.com>

Re: flink 1.11 cdc: kafka中存了canal-json格式的多张表信息,需要按表解析做处理,sink至不同的下游,要怎么支持?

2020-07-21 Thread godfrey he
http://apache-flink.147419.n8.nabble.com/flink-1-10-sql-kafka-format-json-schema-json-object-tt4665.html 这个邮件里提到了类似的问题。 https://issues.apache.org/jira/browse/FLINK-18002 这个issue完成后(1.12),你可以将 “data”,“mysqlType”等格式不确定的字段定义为String类型, 下游通过udf自己再解析对应的json Best, Godfrey jindy_liu

Re: Flink SQL - Join Lookup Table

2020-07-20 Thread godfrey he
JIRA: https://issues.apache.org/jira/browse/FLINK-18651 godfrey he 于2020年7月21日周二 上午9:46写道: > hi Kelly, > As the exception message mentioned: currently, we must cast the time > attribute to regular TIMESTAMP type, > then we can do regular join. Because time attribute will be

Re: Flink SQL - Join Lookup Table

2020-07-20 Thread godfrey he
hi Kelly, As the exception message mentioned: currently, we must cast the time attribute to regular TIMESTAMP type, then we can do regular join. Because time attribute will be out-of-order after regular join, and then we can't do window aggregate based on the time attribute. We can improve it

Re: SQL 报错只有 flink runtime 的 NPE

2020-07-20 Thread godfrey he
; >> >> On Fri, Jul 17, 2020 at 2:54 PM godfrey he wrote: >> >>> udf_xxx的逻辑是啥? >>> >>> >>> Luan Cooper 于2020年7月17日周五 下午2:40写道: >>> >>> > Hi >>> > >>> > 我有这么一个 SQL >>> > INSERT INTO es >

Re: flink sink到kafka

2020-07-19 Thread godfrey he
如果你是用flink sql的,可以通过DDL的方式来定义kafka sink,参考 [1] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/connectors/kafka.html Best, Godfrey smq <374060...@qq.com> 于2020年7月19日周日 下午9:36写道: > 大家好,我想通过avro格式sink到kafka,请问该怎么实现,官网上没找到相关方法。

Re: Flink 1.11 Sql client environment yaml

2020-07-18 Thread godfrey he
hi GenericInMemoryCatalog does not support settings now, or you can refer to [1] for supported catalog details and you can refer to [2] to supported types details. "Kafka schema registry for schema" is under discussion [3], which can be ready in 1.12. sql client supports DDL to create a table

Re: FlinkSQL 任务提交后 任务名称问题

2020-07-18 Thread godfrey he
hi Evan, 感谢反馈,目前已经有一个issue [1]在跟踪该问题,可以关注后续进展 [1] https://issues.apache.org/jira/browse/FLINK-18545

Re: Re: Re:Re: flink 1.11任务提交的问题

2020-07-17 Thread godfrey he
是的。目前按照你的写法做不到只提交一个job了 sunfulin 于2020年7月17日周五 下午3:11写道: > > > > hi, > 再问下,这个方案还是会提交两个job吧? > > > > > > > > > > > > > > > 在 2020-07-17 14:36:19,"godfrey he" 写道: > >做不到,1.11里把 StreamExecutionEnvironment.execute 和 > &

Re: flink-1.11 DDL 写入hdfs问题 Cannot instantiate user function

2020-07-17 Thread godfrey he
第二个问题的异常栈是啥? kcz <573693...@qq.com> 于2020年7月17日周五 下午2:17写道: > 第一个bug提示只需要 > classloader.resolve-order: parent-first > 第二个bug采用了parquet还没解决 > > > --原始邮件-- > 发件人: > "kcz" >

Re: SQL 报错只有 flink runtime 的 NPE

2020-07-17 Thread godfrey he
udf_xxx的逻辑是啥? Luan Cooper 于2020年7月17日周五 下午2:40写道: > Hi > > 我有这么一个 SQL > INSERT INTO es > SELECT > a, > udf_xxx(b) > FROM mongo_oplog -- 自定义 TableFactory > > Job 提交后 fail 了,从 Job 提交到 Fail 只有一处来自非业务代码的 NPE 如下,没有任何业务代码 Exception,可以稳定重现 > > LUE _UTF-16LE'v2'))) AS return_received_time]) (1/1) >

Re: Re:Re: flink 1.11任务提交的问题

2020-07-17 Thread godfrey he
> > > > hi, > 感谢回复。这个机制我理解了。想了解下,有办法在1.11里仍然使用1.10版本的作业提交机制么?我现在虽然把代码回滚到1.10版本的逻辑,但是提交作业仍然有问题:比如我如果不执行env.execute,那么table > to DataStream的语句不会生成拓扑。 > > > > > > > > > > > > 在 2020-07-17 12:09:20,"godfrey he" 写道: > >hi sunfulin, >

Re: flink 1.11任务提交的问题

2020-07-16 Thread godfrey he
hi sunfulin, 目前这个做不到。executeSQL 和 table to DataStream 是分别优化和提交作业的。 即使在1.11 之前,table to DataStream 也不会和 sqlUpdate 或者 insertInto 的语句一起优化, 虽然只提交了一个job,但是是两个独立的pipeline,也没有计算复用,和两个job没啥差别。 Best, Godfrey Leonard Xu 于2020年7月17日周五 上午12:12写道: > Hi, > > 我理解目前好像做不到, cc: godfrey 大佬看看 > > 祝好, > Leonard Xu

Re: flink 1.11 checkpoint使用

2020-07-16 Thread godfrey he
为什么要 GROUP BY id,name ,description, weight ? 直接 "INSERT INTO sink SELECT id,name ,description, weight FROM debezium_source" 不能满足需求? 曹武 <14701319...@163.com> 于2020年7月16日周四 下午9:30写道: > 我在使用flink 1.11.0中得ddl 部分 采用debezium-json做cdc得时候 > 从checkpoint恢复以后,新来op=d的数据会删除失败 > 重启命令:./bin/flink run -m

Re: FlinkSQL 是通过怎样的机制找到要执行的 Java 代码的呢?

2020-07-16 Thread godfrey he
通过Java 的 SPI 机制来找到对应的 format,可以参考 [1] [1] https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/connectors/#how-to-use-connectors Best, Godfrey wangl...@geekplus.com.cn 于2020年7月16日周四 下午4:02写道: > 比如: > > CREATE TABLE my_table ( > id BIGINT, > first_name STRING, > last_name

Re: [sql-client] 通过sql-client提交sql怎么设置checkpointing.interval

2020-07-15 Thread godfrey he
现在还不支持在sql-client-defaults.yaml 里配置 checkpointing.interval, 你可以配置在flink-conf.yaml里 Harold.Miao 于2020年7月16日周四 下午1:27写道: > hi flink users > > 通过sql-client提交sql怎么设置checkpointing.interval? > 我看了一下sql-client-defaults.yaml中的execution, 并没有发现这个参数。请教大家一下。 > 谢谢 > > > > -- > > Best Regards, > Harold Miao

Re: Flink-1.11内置connector测试问题求解

2020-07-15 Thread godfrey he
目前 1.11 版本中的 tableResult.print 只支持 exactly once 语义,需要配置 checkpoint。 1.12 里准备支持 at least once 语义,用户可以不用配置 checkpoint。目前 pr [1] 正在reivew 。 [1] https://github.com/apache/flink/pull/12867 Best, Godfrey Jingsong Li 于2020年7月16日周四 上午11:36写道: > tableResult.print需要有checkpoint > > Best, > Jingsong >

Re: Parquet format in Flink 1.11

2020-07-15 Thread godfrey he
hi Flavio, Parquet format supports configuration from ParquetOutputFormat . please refer to [1] for details [1]

Re: flink 1.11运算结果存mysql出错

2020-07-13 Thread godfrey he
1.11 对 StreamTableEnvironment.execute() 和 StreamExecutionEnvironment.execute() 的执行方式有所调整, 简单概述为: 1. StreamTableEnvironment.execute() 只能执行 sqlUpdate 和 insertInto 方法执行作业; 2. Table 转化为 DataStream 后只能通过 StreamExecutionEnvironment.execute() 来执行作业; 3. 新引入的 TableEnvironment.executeSql() 和

Re: Table API jobs migration to Flink 1.11

2020-07-12 Thread godfrey he
way to test the migration..then >> I could try yo implement the new Table Source interface >> >> On Fri, Jul 10, 2020 at 3:38 PM godfrey he wrote: >> >>> hi Flavio, >>> Only old planner supports BatchTableEnvironment (which can convert >>> t

Re: flink 1.11 sql作业提交JM报错

2020-07-12 Thread godfrey he
hi sunfulin, 1.11 对 StreamTableEnvironment.execute() 和 StreamExecutionEnvironment.execute() 的执行方式有所调整, 简单概述为: 1. StreamTableEnvironment.execute() 只能执行 sqlUpdate 和 insertInto 方法执行作业; 2. Table 转化为 DataStream 后只能通过 StreamExecutionEnvironment.execute() 来执行作业; 3. 新引入的 TableEnvironment.executeSql() 和

Re: Table API jobs migration to Flink 1.11

2020-07-10 Thread godfrey he
hi Flavio, Only old planner supports BatchTableEnvironment (which can convert to/from DataSet), while Blink planner in batch mode only support TableEnvironment. Because Blink planner convert the batch queries to Transformation (corresponding to DataStream), instead of DataSet. one approach is you

Re: 代码中如何取消正在运行的Flink Streaming作业

2020-07-08 Thread godfrey he
可以通过 StreamExecutionEnvironment#executeAsync 提交作业,返回 JobClient [1], 通过 JobClient 可以 cancel 作业,获取 job status。 [1] https://cwiki.apache.org/confluence/display/FLINK/FLIP-74%3A+Flink+JobClient+API Best, Godfrey Evan 于2020年7月9日周四 上午9:40写道: > 这个问题之前看到过有人在问,但是没有看到答案,我想问一下,Flink Streaming >

Re: Flink SQL如何将多个表的查询结果(列不同)聚合成一张表

2020-07-08 Thread godfrey he
select a.table_tmp1.r1 / a.table_tmp2.r2 这个是对同一行的数据进行操作,所以你需要先对table_tmp1和table_tmp2做一个join,将两个表的数据根据条件合并成一张表。 zilong xiao 于2020年7月8日周三 下午8:55写道: > 列如下面这样,需要查询table1 & table2,分别查询不同的字段 > 在最外层做比值,flink貌似语法检查不通过,应该怎么写这样的SQL呢,有前辈可以指导下不~ > select a.table_tmp1.r1 / a.table_tmp2.r2 as value0 from >

Re: Re: 回复:flink Sql 1.11 executeSql报No operators defined in streaming topology

2020-07-08 Thread godfrey he
1.11 对 StreamTableEnvironment.execute() 和 StreamExecutionEnvironment.execute() 的执行方式有所调整, 简单概述为: 1. StreamTableEnvironment.execute() 只能执行 sqlUpdate 和 insertInto 方法执行作业; 2. Table 转化为 DataStream 后只能通过 StreamExecutionEnvironment.execute() 来执行作业; 3. 新引入的 TableEnvironment.executeSql() 方法是直接执行sql作业

Re: [ANNOUNCE] Apache Flink 1.11.0 released

2020-07-08 Thread godfrey he
Congratulations! Thanks Zhijiang and Piotr for the great work, and thanks everyone for their contribution! Best, Godfrey Benchao Li 于2020年7月8日周三 下午12:39写道: > Congratulations! Thanks Zhijiang & Piotr for the great work as release > managers. > > Rui Li 于2020年7月8日周三 上午11:38写道: > >>

Re: Blink Planner Retracting Streams

2020-06-16 Thread godfrey he
hi John, You can use Tuple2[Boolean, Row] to replace CRow, the StreamTableEnvironment#toRetractStream method return DataStream[(Boolean, T)]. the code looks like: tEnv.toRetractStream[Row](table).map(new MapFunction[(Boolean, Row), R] { override def map(value: (Boolean, Row)): R = ...

Re: pyflink数据查询

2020-06-15 Thread godfrey he
hi jack,jincheng Flink 1.11 支持直接将select的结果collect到本地,例如: CloseableIterator it = tEnv.executeSql("select ...").collect(); while(it.hasNext()) { it.next() } 但是 pyflink 还没有引入 collect() 接口。(后续会完善?@jincheng) 但是1.11的TableResult#collect实现对流的query支持不完整(只支持append only的query),master已经完整支持。 可以参照

Re: pyflink数据查询

2020-06-15 Thread godfrey he
hi jack,jincheng Flink 1.11 支持直接将select的结果collect到本地,例如: CloseableIterator it = tEnv.executeSql("select ...").collect(); while(it.hasNext()) { it.next() } 但是 pyflink 还没有引入 collect() 接口。(后续会完善?@jincheng) 但是1.11的TableResult#collect实现对流的query支持不完整(只支持append only的query),master已经完整支持。 可以参照

Re: flink sql字段重命名问题

2020-06-12 Thread godfrey he
hi,如 benchao 所说,SELECT XX AS YY 和Table API的renameColumns等价。 而且这些名字仅用于sql解析和优化阶段,实际执行的时候不会使用字段名。 Best, Godfrey Benchao Li 于2020年6月12日周五 下午6:36写道: > 直接用SELECT XX AS YY就等价于Table API的renameColumns了吧。 > > naisili Yuan 于2020年6月12日周五 下午6:23写道: > > > Hi all > >

Re: How to use Hbase Connector Sink

2020-06-11 Thread godfrey he
hi, you should make sure the types of the selected fields and the types of sink table are the same, otherwise you will get the above exception. you can change `active_ratio*25 score` to row type, just like: insert into circle_weight select rowkey, ROW(info) from ( select

  1   2   >