英文:
Is it possible to write without breaking line for each pcollection in Java?
问题
我刚开始使用Java SDK的Apache Beam。由于需要在元素之间不断开行地写入文件,我正在尝试找到一种方法来实现这一点。
从下面的代码看,我觉得它有些相似,但我仍然找不到等价的选项。
https://stackoverflow.com/questions/50913942/beam-io-writetotext-add-new-line-after-each-value-can-it-be-removed
我正在尝试的是这个。
org.apache.beam.sdk.io.TextIO.write()
这种方法可行吗?
提前感谢您的帮助。
英文:
I've just started using Java SDK Apache beam.
As it is required to write files without breaking lines on elements, I'm trying to find a way to do it.
Looking at below, I kind of find it similar but still I can't find the equivalent option.
https://stackoverflow.com/questions/50913942/beam-io-writetotext-add-new-line-after-each-value-can-it-be-removed
What I'm trying with is this.
org.apache.beam.sdk.io.TextIO.write()
Is it possible?
Thanks in advance.
答案1
得分: 0
一个累加器,它扩展了CombineFn<InputT, AccumT, OutputT>
,使其能够编写连接的字符串集合而不中断换行。
英文:
An accumator which extends CombineFn<InputT, AccumT, OutputT>
led it write concatenated string sets without breaking line.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论