I am trying to run multiple OLAP queries using script API and my first query runs very well , but as my testclass calls second method to execute 2nd query I got this error
com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Traversal source 'g' for graph 'MyGraph' is invalid. OLAP is not available when Spark is not running or cannot be detected.
I am initializing cqlsession through bean file and if I initialize bean before every query execution then each query works,
I am using these 2 statements from script api
statement = ScriptGraphStatement.builder(script).setQueryParams(queryParam).build(); result = session.execute(statement);
[UPDATE] my application.conf file is :-
datastax-java-driver { basic { contact-points=["10.1.27.44:9042"] load-balancing-policy.local-datacenter = SearchGraph session-name = cfx-iap request.page-size = 50000 config-reload-interval = 0 session-keyspace = "\"MyGraph\"" config-reload-interval = 0 } basic.request.timeout = 600000 ms basic.graph{ traversal-source= "a" timeout = 600 seconds name =MyGraph } advanced { protocol.compression = lz4 connection { max-requests-per-connection = 1024 timeout = 600 seconds pool { local.size = 1 remote.size = 1 } } throttler { class = ConcurrencyLimitingRequestThrottler max-concurrent-requests = 1000 max-queue-size = 100000 } #ssl-engine-factory { #class = CustomSSLEngineFactory # cipher-suites = [ "TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA" ] # hostname-validation = true # truststore-path = /path/to/client.truststore # keystore-path = /path/to/client.keystore #} }#end of advanced }