Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/8687#discussion_r39155712
--- Diff: core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala
---
@@ -1051,6 +1049,15 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
val jobAttemptId = newTaskAttemptID(jobtrackerID, stageId, isMap =
true, 0, 0)
val jobTaskContext = newTaskAttemptContext(wrappedConf.value,
jobAttemptId)
val jobCommitter = jobFormat.getOutputCommitter(jobTaskContext)
+
+ // If speculation is enabled, we only allow FileOutputCommitter.
+ val speculationEnabled = self.conf.getBoolean("spark.speculation",
false)
+ if (speculationEnabled && jobCommitter.getClass !=
+ classOf[org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter])
{
+ throw new SparkException(s"Cannot use ${jobCommitter.getClass} as
output committer when" +
+ "speculation is enabled.")
+ }
+
--- End diff --
I agree this is a too strong limitation, but my concern is that: there is
possibility that a user-defined output formatter provides a direct output
committer which we should reject. However, these is no simple way to see if a
output committer is direct or not, so I just restrict it to
`FileOutputCommitter` only here.
---
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]