I have 2 spark jobs which connect to Cassandra using the spark-cassandra connector. https://github.com/datastax/spark-cassandra-connector
First job uses Kafka to stream data in Spark and process in real time. After processing each message, it saves the message to Cassandra.
Second job is a batch job which is deployed every 10 seconds to read data from cassandra.
So, one streaming spark job is writing the data to a Cassandra keyspace and other batch job is deployed again and again to read data from the SAME keyspace. My question is:
Can you open 2 sessions from 2 spark jobs to read/write the same keyspace ?
Note: I am also using the same username/password to connect to cassandra from both spark jobs.