Details
-
Bug
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
Description
The doc says
However, I had to modify the code to below:
p.apply("ReadLines", FileIO.match().filepattern("hdfs:///foo/bar/*.gz")) .apply(FileIO.readMatches().withCompression(GZIP)) .apply(MapElements // uses imports from TypeDescriptors .into(kvs(strings(), strings())) .via((ReadableFile f) -> { try { return KV.of( f.getMetadata().resourceId().toString(), f.readFullyAsUTF8String()); } catch (IOException ex) { throw new RuntimeException("Failed to read the file", ex); } }))
Attachments
Attachments
Issue Links
- links to