Support Questions

Find answers, ask questions, and share your expertise

value spark not found

Expert Contributor


I am trying to establish a spark cassandra connection using : scala> spark.setCassandraConf("Cluster2", CassandraConnectorConf.ConnectionHostParam.option("x.x.x.x")) <console>:45: error: not found: value spark spark.setCassandraConf("Cluster2", CassandraConnectorConf.ConnectionHostParam.option("x.x.x.x")) But i am getting value spark not found ...


Expert Contributor

An update to this: After I used import org.apache.spark, the above error is gone but I am getting the below error when trying to create dataframe... scala> spark.setCassandraConf(CassandraConnectorConf.KeepAliveMillisParam.option(10000)) <console>:35: error: object setCassandraConf is not a member of package org.apache.spark spark.setCassandraConf(CassandraConnectorConf.KeepAliveMillisParam.option(10000))


There is no function setCassandraConf in org.apache.spark class, check out below link for connecting to Cassandra