YuweiXiao commented on a change in pull request #4913:
URL: https://github.com/apache/hudi/pull/4913#discussion_r824318662



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieAppendHandle.java
##########
@@ -113,22 +116,37 @@
   // Header metadata for a log block
   protected final Map<HeaderMetadataType, String> header = new HashMap<>();
   private SizeEstimator<HoodieRecord> sizeEstimator;
+  protected final WriteMarkers writeMarkers;
+  private final IOType ioType;
 
   private Properties recordProperties = new Properties();
 
   public HoodieAppendHandle(HoodieWriteConfig config, String instantTime, 
HoodieTable<T, I, K, O> hoodieTable,
-                            String partitionPath, String fileId, 
Iterator<HoodieRecord<T>> recordItr, TaskContextSupplier taskContextSupplier) {
+                            String partitionPath, String fileId, 
Iterator<HoodieRecord<T>> recordItr,
+                            TaskContextSupplier taskContextSupplier, IOType 
ioType) {
     super(config, instantTime, partitionPath, fileId, hoodieTable, 
taskContextSupplier);
     this.fileId = fileId;
     this.recordItr = recordItr;
     sizeEstimator = new DefaultSizeEstimator();
     this.statuses = new ArrayList<>();
     this.recordProperties.putAll(config.getProps());
+    this.writeMarkers = WriteMarkersFactory.get(config.getMarkersType(), 
hoodieTable, instantTime);
+    this.ioType = ioType;
   }
 
+  // constructor used for creating new file group
   public HoodieAppendHandle(HoodieWriteConfig config, String instantTime, 
HoodieTable<T, I, K, O> hoodieTable,
                             String partitionPath, String fileId, 
TaskContextSupplier sparkTaskContextSupplier) {
-    this(config, instantTime, hoodieTable, partitionPath, fileId, null, 
sparkTaskContextSupplier);
+    this(config, instantTime, hoodieTable, partitionPath, fileId, null, 
sparkTaskContextSupplier,
+        IOType.CREATE);

Review comment:
       Just curious, in which case we will use IOType.CREATE for a AppendHandle?




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