-
Type:
Bug
-
Status: Resolved
-
Priority:
P2
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.19.0
-
Component/s: sdk-java-core
-
Labels:
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); } }))
- links to