JingGe commented on a change in pull request #17656:
URL: https://github.com/apache/flink/pull/17656#discussion_r742955664



##########
File path: 
flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/src/reader/FileRecordFormat.java
##########
@@ -34,7 +34,14 @@
 import java.io.Serializable;
 
 /**
- * A reader format that reads individual records from a file.
+ * This interface is Deprecated, use {@link StreamFormat} instead. The main 
motivation for removing
+ * it is the inherent design flaw in the batching of FileRecordFormat: 
StreamFormat can guarantee
+ * that only a certain amount of memory is being used (unless a single record 
exceeds that already),
+ * but FileRecordFormat can only batch by the number of records. By removing 
FileRecordFormat, we
+ * relay the responsibility of implementing the batching to the format 
developer; they need to use
+ * BulkFormat and find a better way than batch by number of records.

Review comment:
       I am open about it and totally fine to remove it. @AHeise WDYT? I 
thought this case is a little different. Putting this info in Javadoc will give 
developers the hint while using StreamFormat or BulkFormat as replacement. 




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