Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10392#discussion_r48101284
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -2072,14 +2072,15 @@ class SparkContext(config: SparkConf) extends 
Logging with ExecutorAllocationCli
         // Otherwise, the driver may attempt to reconstruct the checkpointed 
RDD from
         // its own local file system, which is incorrect because the 
checkpoint files
         // are actually on the executor machines.
    -    if (!isLocal && Utils.nonLocalPaths(directory).isEmpty) {
    +    val path = new Path(directory, UUID.randomUUID().toString)
    +    val fs = path.getFileSystem(hadoopConfiguration)
    +    val isDirLocal = fs.isInstanceOf[LocalFileSystem]
    +    if (!isLocal && Utils.nonLocalPaths(directory).isEmpty && !isDirLocal) 
{
    --- End diff --
    
    Wait, you're checking here whether the directory is _not_ local here -- the 
warning happens when it is local right? Checking `LocalFileSystem` is a little 
bit brittle too.
    
    I think the right answer here is to disambiguate the checkpoint dir with an 
`hdfs:` scheme. This avoids ambiguity too. If it's just to otherwise save a 
warning, I don't think this is worth it. At best, clarify the warning message.


---
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]

Reply via email to