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

    https://github.com/apache/spark/pull/5030#discussion_r29555708
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -1346,6 +1346,15 @@ abstract class RDD[T: ClassTag](
       }
     
       /**
    +   * Save this RDD as a SequenceFile of compressed serialized objects.
    +   */
    +  def saveAsObjectFile(path: String, codec: Class[_ <: CompressionCodec]) {
    --- End diff --
    
    Yeah this looks correct API-wise, though the duplication of code seems a 
shame. I suppose one could call the other with `null` for `codec` though that 
feels a little icky too. The common code here could be factored into a private 
`prepareObjectFileRDD` method or something. Come to think of it, so could the 
`saveAsTextFile` method above, which has more duplication. I know it's not the 
topic of this change, but if expanding this pattern to another method might be 
worth streamlining both.
    
    Tapping @pwendell @rxin @JoshRosen as this technically adds to the core API.


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