补充下问题
Flink 1.9.0
1.使用StreamingFileSink 消费kafka数据到HDFS
2.开启了EXACTLY_ONCE
3.StreamingFileSink.forBulkFormat,Parquet格式、snappy压缩
写入hdfs的文件都是
part-{parallel-task}-{count}
这种格式
如何重命名啊?
marvin.mxw <[email protected]> 于2019年10月8日周二 下午6:11写道:
> 补充下问题
>
> Flink 1.9.0
>
> 1. 使用StreamingFileSink 消费kafka数据到HDFS
> 2. 开启了EXACTLY_ONCE
> 3. StreamingFileSink.forBulkFormat,Parquet格式、snappy压缩
>
> 写入hdfs的文件都是
> part-{parallel-task}-{count}
> 这种格式
>
> 如何重命名啊?
>
> marvin.mxw
> [email protected]
>
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=marvin.mxw&uid=marvin.mxw%40gmail.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22marvin.mxw%40gmail.com%22%5D>
> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>
> 在2019年10月8日 18:07,marvin.mxw<[email protected]> <[email protected]>
> 写道:
>
>
> 补充下问题
>
> Flink 1.9.0
>
> 1. 使用StreamingFileSink 消费kafka数据到HDFS
> 2. 开启了EXACTLY_ONCE
> 3. StreamingFileSink.forBulkFormat,Parquet格式、snappy压缩
>
> 写入hdfs的文件都是
> part-{parallel-task}-{count}
> 这种格式
>
> 如何重命名啊?
>
> marvin.mxw
> [email protected]
>
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=marvin.mxw&uid=marvin.mxw%40gmail.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22marvin.mxw%40gmail.com%22%5D>
> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>
> 在2019年10月8日 17:51,Zili Chen<[email protected]> <[email protected]>
> 写道:
>
> 简单看了下拼文件名的规则,你可以试试
>
> RowFormatBuilder#withPartFilePrefix
> RowFormatBuilder#withPartFileSuffix
>
> 这两个方法。应该可以将你的文件名设置成
>
> <prefix>-<subtaskIdx>-<partCounter><suffix>
>
> 中间段是写死的。
>
> 如果你有更自定义的重命名需求,建议把你为什么需要重命名具体的说一下。
>
> Best,
> tison.
>
>
> Wesley Peng <[email protected]> 于2019年10月8日周二 下午5:43写道:
>
> May you want to rename them in HDFS with FileSystem.rename method?
>
>
> on 2019/10/8 17:39, yanggang_it_job wrote:
>
> 写入hdfs的文件都是
> part-{parallel-task}-{count}
> 这种格式
>
>
> 如何重命名啊?
>
>
>