Kontinuation opened a new pull request, #1581:
URL: https://github.com/apache/datafusion-comet/pull/1581

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   ## Rationale for this change
   
   Comet native operators always write spill files into the default tmp 
directory, this is not always the behavior we want. There are cases where we 
want to write spill files into Spark local directories:
   
   1. The default tmp directory is too small to hold spill files, a special 
volume is configured for Spark to write temporary files and shuffle data/index 
files.
   2. Multiple directories are configured as Spark local directories. These 
directories could be backed by multiple physical devices to have a larger 
overall disk read/write throughput. Spark will spread spill files and shuffle 
data/index files evenly onto these local directories by default, comet should 
also do that when writing spill files.
   
   All the above mentioned cases are quite common for running Spark jobs on 
Kubernetes. Users usually specify 
   persistent volume claims prefixed by `spark-local-dir-` to use allocated 
volumes as Spark local directories. 
https://spark.apache.org/docs/latest/running-on-kubernetes.html#local-storage
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Create DataFusion DiskManager using spark local directories, this will make 
spill files being created on spark local directories instead of the default tmp 
directory.
   
   ## How are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   4. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   Manually tested locally and on Kubernetes. Will add a unit test later.
   


-- 
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: github-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to