diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala index 0d32280642b7a..79b5bcf2468e9 100644 --- a/core/src/main/scala/org/apache/spark/util/Utils.scala +++ b/core/src/main/scala/org/apache/spark/util/Utils.scala @@ -280,7 +280,10 @@ private[spark] object Utils extends Logging { hadoopConf: Configuration): Unit = { if (isTrashEnabled && hadoopConf.getInt("fs.trash.interval", 0) > 0) { logDebug(s"will move data ${partitionPath.toString} to trash") - Trash.moveToAppropriateTrash(fs, partitionPath, hadoopConf) + val isSuccess = Trash.moveToAppropriateTrash(fs, partitionPath, hadoopConf) + if (!isSuccess) { + logWarning(s"Failed to move data ${partitionPath.toString} to trash") + } } else { fs.delete(partitionPath, true) }