You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by redbaron <gi...@git.apache.org> on 2015/04/05 20:05:49 UTC

[GitHub] spark pull request: [SPARK-6478] New RDD.pipeWithPartition method

Github user redbaron commented on the pull request:

    https://github.com/apache/spark/pull/5147#issuecomment-89822406
  
    Guys, so what do you think? There is no easy way to achieve same goal without copy-pasting a whole PipeRDD into a new one.
    
    For a moment I thought I can get away with:
    ```
    class PPipeRDD[T: ClassTag]( prev: RDD[T],
                                 cmdFunc: (Partition) => Seq[String],
                                 envFunc: (Partition) => Map[String, String])
      extends RDD[String](prev) {
    
      override protected def getPartitions =  prev.partitions
      override def compute(split: Partition, context: TaskContext) =
        prev.pipe(cmdFunc(split),envFunc(split)).compute(split, context)
    }
    ```
    
    But then I was caught by SPARK-5063. So there is no easy way to get it without changing spark itself.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org