You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/03/02 22:47:05 UTC

[GitHub] [hudi] nsivabalan commented on issue #4929: [SUPPORT] SparkSession To Hudi Small files are not merged

nsivabalan commented on issue #4929:
URL: https://github.com/apache/hudi/issues/4929#issuecomment-1057470031


   I assume all files seen in snapshot are written in one commit. and not across diff commits. 
   and I guess its the first commit you are making to the hudi table.
   if thats the case, may be you need to set the right value for 
   https://hudi.apache.org/docs/configurations/#hoodiecopyonwriterecordsizeestimate 
   
   If you are not sure of your record size, you can check the commit metadata of already committed file.
   
   ```
   ls -ltr /tmp/hudi_trips_cow/.hoodie/
   total 32
   drwxr-xr-x  2 nsb  wheel    64 Mar  2 10:08 archived
   -rw-r--r--  1 nsb  wheel   600 Mar  2 10:08 hoodie.properties
   -rw-r--r--  1 nsb  wheel     0 Mar  2 10:08 20220302100851024.commit.requested
   -rw-r--r--  1 nsb  wheel  2594 Mar  2 10:08 20220302100851024.inflight
   -rw-r--r--  1 nsb  wheel  4428 Mar  2 10:08 20220302100851024.commit
   ```
   ```
   cat /tmp/hudi_trips_cow/.hoodie/20220302100851024.commit
   {
     "partitionToWriteStats" : {
       "americas/brazil/sao_paulo" : [ {
         "fileId" : "12a03b4e-e371-4586-913e-fa496332a982-0",
         "path" : "americas/brazil/sao_paulo/12a03b4e-e371-4586-913e-fa496332a982-0_0-28-33_20220302100851024.parquet",
         "prevCommit" : "null",
         "numWrites" : 1,
         "numDeletes" : 0,
         "numUpdateWrites" : 0,
         "numInserts" : 1,
         "totalWriteBytes" : 437642,
         "totalWriteErrors" : 0,
         "tempPath" : null,
         "partitionPath" : "americas/brazil/sao_paulo",
         "totalLogRecords" : 0,
         "totalLogFilesCompacted" : 0,
         "totalLogSizeCompacted" : 0,
         "totalUpdatedRecordsCompacted" : 0,
         "totalLogBlocks" : 0,
         "totalCorruptLogBlock" : 0,
         "totalRollbackBlocks" : 0,
         "fileSizeInBytes" : 437642,
         "minEventTime" : null,
         "maxEventTime" : null
       } ],
       "americas/united_states/san_francisco" : [ {
         "fileId" : "bfb3b7ac-e484-4264-b4f0-51d3154de619-0",
         "path" : "americas/united_states/san_francisco/bfb3b7ac-e484-4264-b4f0-51d3154de619-0_1-34-34_20220302100851024.parquet",
   .
   .
   ```
   
   you can calculate using numWrites and fileSizeInBytes. 
   
   
   


-- 
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-unsubscribe@hudi.apache.org

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