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