viirya commented on issue #26159: [SPARK-29506][SQL] Use 
dynamicPartitionOverwrite in FileCommitProtocol when insert into hive table
URL: https://github.com/apache/spark/pull/26159#issuecomment-544347848
 
 
   @cloud-fan FileOutputCommitter commits job in an inefficient way. 
   
   1. List all committed task paths under job attempt path:
   
   
https://github.com/apache/hadoop/blob/c0a0c353e86fc3f3d4eedd91aeb9d5b9c8eb748a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java#L402-L406
   
   
https://github.com/apache/hadoop/blob/c0a0c353e86fc3f3d4eedd91aeb9d5b9c8eb748a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java#L329-L333
   
   2. Merge paths under committed task paths to job output path. When there are 
conflicting path names, it merges paths/files recursively:
   
   
https://github.com/apache/hadoop/blob/c0a0c353e86fc3f3d4eedd91aeb9d5b9c8eb748a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java#L486-L489
   
   But dynamicPartitionOverwrite simply renames partition paths under staging 
dir to job output path. 
   
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to