In order to run Spark SQL queries on DSE Graph, I want to connect to Spark engine running inside the docker container. I have mapped 9042, 7077 ports so that they can be accessed outside docker.
Following is the Java code:
spark = SparkSession.builder().appName("My application name").config(new SparkConf()) .master("dse://localhost:9042?connection.local_dc=dc1;connection.host=;").getOrCreate();
I am getting this error:
Couldn't parse Master URL: dse://localhost:9042?connection.local_dc=dc1;connection.host=;
I also tried "spark://localhost:9042?connection.local_dc=dc1;connection.host=;" master URL but in that case, it gives "Invalid Master URL" error.
What am I missing here?