prodriguezdefino commented on code in PR #29566:
URL: https://github.com/apache/beam/pull/29566#discussion_r1476620928


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/io/ReadAllViaFileBasedSource.java:
##########
@@ -35,59 +35,114 @@
  * <p>To obtain the collection of {@link ReadableFile} from a filepattern, use 
{@link
  * FileIO#readMatches()}.
  */
-public class ReadAllViaFileBasedSource<T> extends 
ReadAllViaFileBasedSourceTransform<T, T> {
-  public ReadAllViaFileBasedSource(
+public class ReadAllViaFileBasedSource<T, K> extends 
ReadAllViaFileBasedSourceTransform<T, K> {
+
+  private final SerializableFunction<OutputContextFromFile<T>, K> outputFn;
+
+  protected ReadAllViaFileBasedSource(
       long desiredBundleSizeBytes,
       SerializableFunction<String, ? extends FileBasedSource<T>> createSource,
-      Coder<T> coder) {
+      Coder<K> coder,
+      SerializableFunction<OutputContextFromFile<T>, K> outputFn) {
     super(
         desiredBundleSizeBytes,
         createSource,
         coder,
         DEFAULT_USES_RESHUFFLE,
-        new ReadFileRangesFnExceptionHandler());
+        new 
ReadAllViaFileBasedSourceTransform.ReadFileRangesFnExceptionHandler());
+    this.outputFn = outputFn;
   }
 
-  public ReadAllViaFileBasedSource(
+  protected ReadAllViaFileBasedSource(

Review Comment:
   I'm happy to revert the visibility change on the constructor signature. 
   The other transforms that uses this class in Beam only accessed the 
functionality through inheritance.  I understand the potential breakage of 
other user based transforms that may be impacted by this code change. 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to