Hi Charles, Poked around a bit. Turns out that the Cassandra client seems to work a bit differently than a JDBC client. From the JavaDoc page: "Session instances are thread-safe and usually a single instance is enough per application." Given this, you might be able to cache a single connection (per keyspace) to be shared by the planner and scans. [1]
Still need some global object to open, maintain and close the connection, so something would have to be added to Drill to support this. JDBC is harder to work with because connection access must be serialized: only one thread can use the connection at a time. More to the point, transactions must be serialized; JDBC can't support two separate connections on a single JDBC connection. Thanks, - Paul [1] https://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Session.html On Friday, January 17, 2020, 04:56:39 AM PST, Charles Givre <[email protected]> wrote: Hello Drill Devs I have a question for you. I'm working on a storage plugin for Apache Cassandra. I've got the queries mostly working, but I have a question. Connections to Cassandra are meant to be opened once and remain open and so they are "heavy". It takes about 2 seconds to connect to the Cassandra instance on my local machine. Once the connection happens, the queries are very fast. I'm wondering is there a way to open the connection once and have it persist somehow so that we don't have that overhead for each query? I seem to recall a similar discussion for the JDBC storage plugin. Thanks, -- C
