Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/5407#discussion_r27944086
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala ---
@@ -187,16 +189,17 @@ class CheckpointWriter(
val bos = new ByteArrayOutputStream()
val zos = compressionCodec.compressedOutputStream(bos)
val oos = new ObjectOutputStream(zos)
- oos.writeObject(checkpoint)
- oos.close()
- bos.close()
try {
+ oos.writeObject(checkpoint)
executor.execute(new CheckpointWriteHandler(
checkpoint.checkpointTime, bos.toByteArray,
clearCheckpointDataLater))
logDebug("Submitted checkpoint of time " + checkpoint.checkpointTime
+ " writer queue")
} catch {
case rej: RejectedExecutionException =>
logError("Could not submit checkpoint task to the thread pool
executor", rej)
+ }finally{
--- End diff --
Also here. Style should keep the same.
---
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]