你好,
这说明写入的hive文件没有进行rollup,可以贴下SQL么

------------------------------------------------------------------
发件人:[email protected] <[email protected]>
发送时间:2020年7月14日(星期二) 16:40
收件人:user-zh <[email protected]>; xbjtdcq <[email protected]>
主 题:回复: Re: 不能实时读取实时写入到 Hive 的数据


我加上了这个 tablehint 。
任务提交上去了,但客户端还是没有任何返回显示。 
我到 hadoop 集群上看了下 hive 表所在的这个目录,所有的文件都是 .part 开头的 inprogress 文件。 

谢谢,
王磊



[email protected] 

发件人: Leonard Xu
发送时间: 2020-07-14 16:17
收件人: user-zh
主题: Re: 不能实时读取实时写入到 Hive 的数据
HI, wanglei

你开启了 streaming-source.enable 
吗?这个参数用于指定如何读取是batch读,还是stream读,如果你要实时读的话应该把这个值设定为true, 可以使用tablehints 方便地指定参数。

SELECT * FROM hive_table /*+ OPTIONS('streaming-source.enable'='true', 
'streaming-source.consume-start-offset'='2020-05-20') */;

就在你看得这个页面应该有对应的文档说明如何读取hive数据。

祝好,
Leonard Xu

> 在 2020年7月14日,15:47,[email protected] 写道:
> 
> 
> 试验了一下 Flink-1.11  hive streaming 的功能
> https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/hive/hive_streaming.html
> 
> 创建 kafka 表,通过 SQL 实时写入 Hive.
> 
> 但我再通过 flink sql-client 客户端 select * from hive_table 客户端没有任何返回,通过 flink webUI 
> 页面观察 这个 select * from hive_table 的 job 已经结束了。
> 
> 谢谢,
> 王磊
> 
> 
> 
> [email protected] 
> 

回复