weixiuli opened a new pull request #35693:
URL: https://github.com/apache/spark/pull/35693


   ### What changes were proposed in this pull request?
   
   This pr follows up the https://github.com/apache/spark/pull/35492, try to 
use a stagingDir constant instead of the  stagingDir method in 
HadoopMapReduceCommitProtocol.
   
   ### Why are the changes needed?
   
   In the https://github.com/apache/spark/pull/35492#issuecomment-1054910730
   
   ```
   ./build/sbt -mem 4096 -Phadoop-2 "sql/testOnly 
org.apache.spark.sql.sources.PartitionedWriteSuite -- -z SPARK-27194"
   ...
   [info]   Cause: org.apache.spark.SparkException: Task not serializable
   ...
   [info]   Cause: java.io.NotSerializableException: org.apache.hadoop.fs.Path
   ...
   
   ```
   It's because org.apache.hadoop.fs.Path is serializable in Hadoop3 but not in 
Hadoop2.  So, we should make the stagingDir  transient to avoid that.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   ### How was this patch tested?
   
   Passed `./build/sbt -mem 4096 -Phadoop-2 "sql/testOnly 
org.apache.spark.sql.sources.PartitionedWriteSuite -- -z SPARK-27194"`
   
   Pass the CIs.


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



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

Reply via email to