Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Spark report "error: not found: type Properties" when loading a data set?

I am running Spark 2.1.0 on Windows 10, I am following the Spark programming guide to load data using JDBC from MySQL. When I try to load data using the second method in the link, I get the following error.

scala> val connectionProperties = new Properties()
<console>:44: error: not found: type Properties
       val connectionProperties = new Properties()
                                      ^
like image 725
SoakingHummer Avatar asked Apr 30 '26 09:04

SoakingHummer


1 Answers

Use import java.util.Properties.

See https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html.

like image 166
Jacek Laskowski Avatar answered May 02 '26 02:05

Jacek Laskowski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!