spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CodingCat <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-1100] prevent Spark from overwriting di...
Date Sat, 01 Mar 2014 03:26:38 GMT
Github user CodingCat commented on the pull request:

    https://github.com/apache/spark/pull/11#issuecomment-36414832
  
    @pwendell , I just updated the code
    
    In the latest update, I make the checking only applicable to FileOutputFormat, the difference
with your suggestion is that I added checking for that if the user has set mapred.output.dir,
because the internal implementation of getOutputPath is actually based on this property....
    
    {code}
    
    /**
       * Get the {@link Path} to the output directory for the map-reduce job.
       * 
       * @return the {@link Path} to the output directory for the map-reduce job.
       * @see FileOutputFormat#getWorkOutputPath(JobConf)
       */
      public static Path getOutputPath(JobConf conf) {
        String name = conf.get("mapred.output.dir");
        return name == null ? null: new Path(name);
      }
    
    {code}


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message