Github user aramesh117 commented on a diff in the pull request:
https://github.com/apache/spark/pull/17024#discussion_r102592127
--- Diff:
core/src/main/scala/org/apache/spark/rdd/ReliableCheckpointRDD.scala ---
@@ -169,14 +174,24 @@ private[spark] object ReliableCheckpointRDD extends
Logging {
val bufferSize = env.conf.getInt("spark.buffer.size", 65536)
val fileOutputStream = if (blockSize < 0) {
- fs.create(tempOutputPath, false, bufferSize)
+ val checkpointCodec =
env.conf.get("spark.checkpoint.compress.codec", "none")
+ val fileStream = fs.create(tempOutputPath, false, bufferSize)
+ if
(CompressionCodec.ALL_COMPRESSION_CODECS_SHORT.contains(checkpointCodec)) {
+ val compressionCodec = CompressionCodec.createCodec(env.conf,
checkpointCodec)
+ logInfo(s"Compressing using $checkpointCodec.")
+ compressionCodec.compressedOutputStream(fileStream)
+ } else {
+ fileStream
+ }
} else {
// This is mainly for testing purpose
fs.create(tempOutputPath, false, bufferSize,
fs.getDefaultReplication(fs.getWorkingDirectory), blockSize)
}
val serializer = env.serializer.newInstance()
val serializeStream = serializer.serializeStream(fileOutputStream)
+ logInfo(s"Starting to write to checkpoint file $tempOutputPath.")
--- End diff --
My thought was that since checkpointing shouldn't be done too frequently
anyway, this won't make the logs too verbose in the executor, and may be
helpful for debugging after issues with checkpointing have already occurred.
I'll make it logDebug for now, is this okay?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]