[
https://issues.apache.org/jira/browse/BEAM-6526?focusedWorklogId=233780&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-233780
]
ASF GitHub Bot logged work on BEAM-6526:
----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Apr/19 21:40
Start Date: 26/Apr/19 21:40
Worklog Time Spent: 10m
Work Description: chamikaramj commented on pull request #8414:
[BEAM-6526] Add ReadFiles transform for AvroIO
URL: https://github.com/apache/beam/pull/8414#discussion_r279111849
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/AvroIO.java
##########
@@ -283,17 +283,31 @@
.build();
}
+ /**
+ * Like {@link #read}, but reads each file in a {@link PCollection} of {@link
+ * FileIO.ReadableFile}, returned by {@link FileIO#readMatches}.
+ *
+ * <p>You can read {@link GenericRecord} by using {@code
#readFiles(GenericRecord.class)} or
+ * {@code #readFiles(new Schema.Parser().parse(schema))} if the schema is a
String.
+ */
+ public static <T> ReadFiles<T> readFiles(Class<T> recordClass) {
Review comment:
Please consider adding an integration test for this (similar to
https://github.com/apache/beam/blob/master/sdks/java/io/file-based-io-tests/src/test/java/org/apache/beam/sdk/io/avro/AvroIOIT.java).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 233780)
Time Spent: 2.5h (was: 2h 20m)
> Add ReadFiles transform for AvroIO
> ----------------------------------
>
> Key: BEAM-6526
> URL: https://issues.apache.org/jira/browse/BEAM-6526
> Project: Beam
> Issue Type: Improvement
> Components: io-java-avro
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: Minor
> Labels: triaged
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> AvroIO lacks the `readFiles()` method to make it fully composable with FileIO
> as other file based IOs do, e.g. TextIO, ParquetIO.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)