title: Too large batch size or timeout while waiting for server response while exporting data into cassandra
body: <p>I'm trying to import data from CSV files to cassandra using cassandra-loader:
  <a href="https://github.com/brianmhess/cassandra-loader" rel="nofollow noreferrer">https://github.com/brianmhess/cassandra-loader</a></p>
  
  <p><strong>Cassandra-version: 3.1</strong></p>
  
  <p>Export data from cassandra into CSV files takes ~ 20 minutes which is ok.
  Import data using this command: 
  cassandra-loader -f "path to files" -host "host" -schema "scema" -numThreads 40 takes more than 7 hours.
  If i try to increase -batchSize over than ~1.5k and -rate over than 50k than i get an error.</p>
  
  <pre><code>Error inserting: Batch too large
  com.datastax.driver.core.exceptions.InvalidQueryException: Batch too large
  </code></pre>
  
  <p>Sometimes i get error like "Server responce timeout"</p>
  
  <pre><code>Timed out waiting for server response
  com.datastax.driver.core.exceptions.OperationTimedOutException: [] Timed out waiting for server response
      at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onTimeout(RequestHandler.java:772)
  </code></pre>
  
  <p>How can i fix it and speed it up?</p>
  
  <p>Or maybe there is another way to import fast data from CSV into cassandra</p>