ad1happy2go commented on issue #11170:
URL: https://github.com/apache/hudi/issues/11170#issuecomment-2115400503

   @matthijseikelenboom I was able to successfully test. There were two issues 
- 
   1. InprocessLockProvider doesn't work for multiple writes. So use 
FileSystemBasedLockProvider in transactionWriter.java
   ```
   dataSet.write().format("hudi")
                       .option("hoodie.table.name", tableName)
                       .option("hoodie.datasource.write.recordkey.field", 
"primaryKeyValue")
                       .option("hoodie.datasource.write.partitionpath.field", 
"partitionKeyValue")
                       .option("hoodie.datasource.write.precombine.field", 
"dataValue")
                       .option("hoodie.write.lock.provider", 
"org.apache.hudi.client.transaction.lock.FileSystemBasedLockProvider")
                       .mode(SaveMode.Append)
                       .save(tablePath);
   ```
   3. Along with refresh, to add partitions to mock repair also in 
ReaderThread. 
   ```        
   session.sql("REFRESH TABLE " + fullyQualifiedTableName);
   session.sql("MSCK REPAIR TABLE" + fullyQualifiedTableName);
   ```


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to