You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2017/10/11 18:19:18 UTC
[GitHub] spark pull request #18979: [SPARK-21762][SQL] FileFormatWriter/BasicWriteTas...
Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/18979#discussion_r144094437
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/BasicWriteStatsTracker.scala ---
@@ -57,7 +60,14 @@ class BasicWriteTaskStatsTracker(hadoopConf: Configuration)
private def getFileSize(filePath: String): Long = {
val path = new Path(filePath)
val fs = path.getFileSystem(hadoopConf)
- fs.getFileStatus(path).getLen()
+ try {
+ fs.getFileStatus(path).getLen()
+ } catch {
+ case e: FileNotFoundException =>
+ // may arise against eventually consistent object stores
+ logInfo(s"File $path is not yet visible", e)
--- End diff --
Could you update the log message and indicate the size zero might be wrong? For example negative caching in S3
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org