prashantwason commented on a change in pull request #1687:
URL: https://github.com/apache/hudi/pull/1687#discussion_r441002064
##########
File path:
hudi-client/src/main/java/org/apache/hudi/io/storage/HoodieFileWriterFactory.java
##########
@@ -34,29 +34,28 @@
import java.io.IOException;
-import static org.apache.hudi.common.model.HoodieFileFormat.HOODIE_LOG;
import static org.apache.hudi.common.model.HoodieFileFormat.PARQUET;
+import static org.apache.hudi.common.model.HoodieFileFormat.HFILE;
-public class HoodieStorageWriterFactory {
+public class HoodieFileWriterFactory {
- public static <T extends HoodieRecordPayload, R extends IndexedRecord>
HoodieStorageWriter<R> getStorageWriter(
+ public static <T extends HoodieRecordPayload, R extends IndexedRecord>
HoodieFileWriter<R> getFileWriter(
Review comment:
I have created the new HoodieSortedMergeHandle which extends the
HoodieMergeHandle. This way, the sort functionality is moved to the
HoodieSortedMergeHandle. The correct handle will be initialized and used within
CommitActionExecutor.
This was cleaner than an external merge Algorithm to be plugged into the
HoodieMergeHandle because:
1. Sort in MergeHandle is closely tied to reading and writing the records.
The algorithm is better suited to cases where all records are already available
in memory.
2. Cleaner code as the intention is evident from the handle name.
3. Removes code duplication
4. No change for non-hfile base formats (the existing HoodieMergeHandle will
be used).
Please take a look.
----------------------------------------------------------------
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]