This should be done only once before all threads start processing. The init code creates a keyspace object that is thread safe and hence the same instances can be given to all processing threads, once it is inited safely.
As mentioned above, keyspace is thread safe and hence can be shared among multiple threads. Similarly ColumnFamily is also thread safe.
The impls for ColumnFamilyQuery and MutationBatch maintain intermittent state for supporting features like mixed write batches, merging batches, pagination, host pinning, timers, tracers etc and hence SHOULD NOT be used by multiple threads and are NOT thread safe.
Last edited by opuneet,