如何为CompressedSource构造FileBasedSource

时间:2018-10-30 17:56:05

标签: google-cloud-dataflow apache-beam

apache beam javadoc具有以下内容:

 FileBasedSource<T> mySource = ...;
 PCollection<T> collection = p.apply(Read.from(CompressedSource
     .from(mySource)
     .withCompression(Compression.GZIP)));

如何构造“ mySource”以指向本地磁盘或云存储上的zip文件? 基本上,我压缩了一堆protobuf文件,这些文件将成为我的管道的输入。所以二进制文件,而不是文本文件。

0 个答案:

没有答案