suryaprasanna commented on code in PR #17495:
URL: https://github.com/apache/hudi/pull/17495#discussion_r2734038772


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/io/storage/hadoop/HoodieAvroHFileWriter.java:
##########
@@ -127,9 +130,12 @@ public boolean canWrite() {
 
   @Override
   public void writeAvro(String recordKey, IndexedRecord record) throws 
IOException {
-    if (prevRecordKey.equals(recordKey)) {
-      throw new HoodieDuplicateKeyException("Duplicate recordKey " + recordKey 
+ " found while writing to HFile."
-          + "Record payload: " + record);
+    if (!this.hfileConfig.isAllowDuplicatesOnHfileWrites()) {
+      // When this config is enabled, do not allow duplicates to be written to 
hFile.

Review Comment:
   Fixed the comments and also expanded the description for 
hoodie.hfile.writer.allow.duplicates config.



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