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

    https://github.com/apache/spark/pull/1658#discussion_r15618893
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -511,6 +511,26 @@ class SparkContext(config: SparkConf) extends Logging {
       }
     
       /**
    +   * Get an RDD for a Hadoop-readable dataset as byte-streams for each 
file (useful for binary data)
    +   *
    +   * @param minPartitions A suggestion value of the minimal splitting 
number for input data.
    +   *
    +   * @note Small files are preferred, large file is also allowable, but 
may cause bad performance.
    +   */
    +  def byteFiles(path: String, minPartitions: Int = defaultMinPartitions): 
RDD[(String, Array[Byte])] = {
    --- End diff --
    
    I'd call this `binaryFiles`.
    
    Also, please add it to `JavaSparkContext`, and ideally we'd have a way to 
add it to Python as well. That one will be trickier -- we probably need to read 
the file in chunks and pass them to Python. But I think it's important to 
design the API as part of this change.


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

Reply via email to