Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/4980#discussion_r29306989
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveWriterContainers.scala ---
@@ -234,7 +234,13 @@ private[spark] class
SparkHiveDynamicPartitionWriterContainer(
val outputPath = FileOutputFormat.getOutputPath(conf.value)
assert(outputPath != null, "Undefined job output-path")
val workPath = new Path(outputPath,
dynamicPartPath.stripPrefix("/"))
- new Path(workPath, getOutputName)
+ val path = new Path(workPath, getOutputName)
+ val fs = path.getFileSystem(conf.value)
+ // this judgement is added for SPARK-6067
+ if (fs.exists(path) && path.toUri.toString.contains("part-")) {
--- End diff --
As @srowen mentioned, please check "part-" first, and then check existence,
to save NameNode RPC.
---
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]