Scala -- native API
Java -- java wrappers for Scala API, slightly clunky but same implementation
Python+R -- janky process involving forking a process and feeding strings back and forth between JVM and python/R via pipes
Scala -- native API
Java -- java wrappers for Scala API, slightly clunky but same implementation
Python+R -- janky process involving forking a process and feeding strings back and forth between JVM and python/R via pipes
For example, if I want to convert an RDD of JSON strings into Python dictionaries:
import json
rdd_dict = rdd.map(lambda x: json.loads(x))
Same goes for any external Python libraries I install on the cluster and want to use in my Spark job. You can even run your Python code on PyPy [4]!For me, working in Python generally feels like a first class experience on Spark. There are areas -- like GraphX [0], certain niche features [1] -- where Scala is definitely easier to work with, but with time that is becoming less [2] and less [3] true thanks to the DataFrame API.
[0] https://spark.apache.org/graphx/
[1] http://stackoverflow.com/q/23995040/877069
[2] https://github.com/graphframes/graphframes