There are a little bit more than the list you specified  nevertheless, some 
data types are not directly compatible between Scala and Java and requires 
conversion, so it’s good to not pollute your code with plenty of conversion and 
focus on using the straight API. 

I don’t remember from the top of my head, but if you use more Spark 2 features 
(dataframes, structured streaming...) you will require less of those 
Java-specific API. 

Do you see a problem here? What’s your take on this?

jg


> On May 14, 2019, at 10:22, Gary Gao <garygaow...@gmail.com> wrote:
> 
> Hi all,
> 
> I am wondering why do we need Java-Friendly APIs in Spark ? Why can't we just 
> use scala apis in java codes ? What's the difference ?
> 
> Some examples of Java-Friendly APIs commented in Spark code are as follows:
> 
>   JavaDStream
>   JavaInputDStream
>   JavaStreamingContext
>   JavaSparkContext
> 

Reply via email to