brianmhess / cassandra-loader

Delimited file loader for Cassandra
Apache License 2.0
197 stars 93 forks source link

How are the queries handled with threads ? #26

Closed chirag93 closed 8 years ago

chirag93 commented 8 years ago

Hi, how are the queries handled at multiple threads ? how do you split and execute them and where is this being handled ?

brianmhess commented 8 years ago

The level of multi-threading is done at the file level. That is, each file is processed by one thread. The threads work on a file and then get the next file to work on.

The code that creates the thread pool and fills with threads is: https://github.com/brianmhess/cassandra-loader/blob/master/src/main/java/com/datastax/loader/CqlDelimLoad.java#L562-L584