Github user dwmclary commented on the pull request:

    https://github.com/apache/spark/pull/3213#issuecomment-63157839
  
    Yin,
    
      Thanks for jumping in.  I'll run some complex types through ObjectMapper
    and see how it compares to JsonFactory.  I figure object creation overhead
    is probably equivalent.
    
      I think you're correct about the python approach.  I was hoping to pick
    up javaToPython, but since I have a MappedRDD at the end of the
    transformation I can't get it.  javaToPython should stay private, so I
    probably have to go after the _jvm.
    
    Cheers,
    Dan
    
    On Fri, Nov 14, 2014 at 6:31 PM, Yin Huai <[email protected]> wrote:
    
    > @dwmclary <https://github.com/dwmclary> Thank you for working on it. I
    > think we need to handle complex types. The approach @NathanHowell
    > <https://github.com/NathanHowell> is using looks good since we do not
    > need to convert Scala collections to Java collections to generate the JSON
    > string.
    >
    > Regarding the Python API, toJSON will returns a Scala RDD and I think you
    > can use jrdd = self._jvm.JavaRDD.fromRDD to generate a Java RDD and then 
create
    > an RDD at the Python side
    > <https://github.com/apache/spark/blob/master/python/pyspark/rdd.py#L123> 
(RDD(jrdd,
    > self._sc, self._jrdd_deserializer)). @davies <https://github.com/davies>
    > is it the right way?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/3213#issuecomment-63156674>.
    >


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