Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-8619

using CQLSSTableWriter gives ConcurrentModificationException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0.13, 2.1.3
    • Legacy/Tools
    • None
    • sun jdk 7
      linux - ubuntu

    • Normal

    Description

      Using CQLSSTableWriter gives ConcurrentModificationException
      I'm trying to load many timeseries into cassandra 2.0.11-1
      using 'org.apache.cassandra:cassandra-all:2.0.11'

      java.util.ConcurrentModificationException
      	at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1115)
      	at java.util.TreeMap$ValueIterator.next(TreeMap.java:1160)
      	at org.apache.cassandra.db.ColumnIndex$Builder.build(ColumnIndex.java:126)
      	at org.apache.cassandra.io.sstable.SSTableWriter.rawAppend(SSTableWriter.java:202)
      	at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:187)
      	at org.apache.cassandra.io.sstable.SSTableSimpleUnsortedWriter$DiskWriter.run(SSTableSimpleUnsortedWriter.java:215)
      
      schema
      CREATE TABLE test.sample (ts_id bigint, yr int, t timestamp, v double, tgs set<varchar>, PRIMARY KEY((ts_id,yr), t)) WITH CLUSTERING ORDER BY (t DESC) AND COMPRESSION = {'sstable_compression': 'LZ4Compressor'};
      
      statement:
      INSERT INTO  test.sample(ts_id, yr, t, v) VALUES (?,?,?,?)
      
      

      with .withBufferSizeInMB(128); it happens more than with
      .withBufferSizeInMB(256);

      code based on http://planetcassandra.org/blog/using-the-cassandra-bulk-loader-updated/

      writer.addRow(tsId, year, new Date(time), value);

      Any suggestions will be highly appreciated

      Attachments

        1. 8619
          0.8 kB
          Benedict Elliott Smith
        2. TimeSeriesCassandraLoaderTest.java
          4 kB
          Igor Berman

        Activity

          People

            benedict Benedict Elliott Smith
            igor.berman Igor Berman
            Benedict Elliott Smith
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: