Home:ALL Converter>use java packages in databrick scala

use java packages in databrick scala

Ask Time:2018-12-19T15:10:56         Author:youyouyouzi

Json Formatter

I'm new to databrick and I'm just trying to copy my scala code to databrick notebook.

However, for the imports, everything is fine except

import org.apache.spark.util.LongAccumxulator

which is a package written in Java,

I know that scala can import java packages, so what is going wrong here?

The error message is:

notebook:11: error: object LongAccumxulator is not a member of package org.apache.spark.util import org.apache.spark.util.LongAccumxulator

What is the reason for getting this error?

Author:youyouyouzi,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53846218/use-java-packages-in-databrick-scala
yy