gaborgsomogyi commented on a change in pull request #24263: [MINOR][DSTREAMS]
Add DStreamCheckpointData.cleanup warning if delete returns false
URL: https://github.com/apache/spark/pull/24263#discussion_r271159193
##########
File path:
streaming/src/main/scala/org/apache/spark/streaming/dstream/DStreamCheckpointData.scala
##########
@@ -87,7 +87,9 @@ class DStreamCheckpointData[T: ClassTag](dstream: DStream[T])
if (fileSystem == null) {
fileSystem =
path.getFileSystem(dstream.ssc.sparkContext.hadoopConfiguration)
}
- fileSystem.delete(path, true)
+ if (!fileSystem.delete(path, true)) {
+ logWarning(s"Error deleting old checkpoint file '$file' for
time $time")
+ }
timeToCheckpointFile -= time
logInfo("Deleted checkpoint file '" + file + "' for time " +
time)
Review comment:
Wanted to make the smallest change but since it would touch another log
statement its good idea.
----------------------------------------------------------------
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]