You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by "xuefli@outlook.com" <xu...@outlook.com> on 2020/08/12 08:21:22 UTC
回复: flink 1.11 使用sql写入hdfs无法自动提交分区
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/connectors/streamfile_sink.html
应该是这个原因
General
Important Note 1: When using Hadoop < 2.7, please use the OnCheckpointRollingPolicy which rolls part files on every checkpoint. The reason is that if part files “traverse” the checkpoint interval, then, upon recovery from a failure the StreamingFileSink may use the truncate() method of the filesystem to discard uncommitted data from the in-progress file. This method is not supported by pre-2.7 Hadoop versions and Flink will throw an exception.
发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用
发件人: Jun Zhang<ma...@gmail.com>
发送时间: 2020年7月23日 12:55
收件人: Jingsong Li<ma...@gmail.com>
抄送: user-zh<ma...@flink.apache.org>
主题: Re: flink 1.11 使用sql写入hdfs无法自动提交分区
hi,jinsong
我们生产环境hdfs是cdh 2.6的,我换了一个hadoop 3 版本的hdfs,还真没问题了,不知道是哪里出问题了。
Jingsong Li <ji...@gmail.com> 于2020年7月23日周四 上午11:45写道:
> 相同操作我也没有复现。。是可以成功执行的
>
> 你的HDFS是什么版本?是否可以考虑换个来测试下
>
> On Thu, Jul 23, 2020 at 11:34 AM Jun Zhang <zh...@gmail.com>
> wrote:
>
>> hi,jinsong:
>>
>> 这个问题不知道你后来有没有做过测试,我这里一直不行,就是并发度是1的时候,文件写入是正常的,就是没有生成success文件,如果是hive的话,就没有自动生成分区和更新分区数据。
>>
>> Jun Zhang <zh...@gmail.com> 于2020年7月23日周四 上午11:15写道:
>>
>>> hi,夏帅:
>>>
>>> 抱歉,这几天没搞这个,我这个问题是文件是正常写入hdfs了,但是没有自动提交,也没有错误日志,就是如果写入的是文件系统,没有SUCCESS文件,写入hive的话,没有自动更新分区。
>>>
>>> 你测试没有问题的情况并行度是 1 吗?写入hdfs?
>>>
>>> 夏帅 <jk...@dingtalk.com> 于2020年7月10日周五 下午5:39写道:
>>>
>>>> 你好,
>>>> 我这边同样的代码,并没有出现类似的问题
>>>> 是本地跑么,可以提供下日志信息么?
>>>>
>>>>
>
> --
> Best, Jingsong Lee
>