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

sstableloader NegativeArraySizeException when deserializing to build histograms

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Won't Fix
    • None
    • Legacy/Tools
    • None
    • Normal

    Description

      When a customer attempts to load sstable data files copied from a production cluster, it returns the following exception:

      $ sstableloader -d <ip> -p <rpc_port> -v <KS>/<CF>/
      null 
      java.lang.NegativeArraySizeException
      at org.apache.cassandra.utils.EstimatedHistogram$EstimatedHistogramSerializer.deserialize(EstimatedHistogram.java:266)
      at org.apache.cassandra.io.sstable.SSTableMetadata$SSTableMetadataSerializer.deserialize(SSTableMetadata.java:292)
      at org.apache.cassandra.io.sstable.SSTableMetadata$SSTableMetadataSerializer.deserialize(SSTableMetadata.java:282)
      at org.apache.cassandra.io.sstable.SSTableReader.openMetadata(SSTableReader.java:234)
      at org.apache.cassandra.io.sstable.SSTableReader.openForBatch(SSTableReader.java:162)
      at org.apache.cassandra.io.sstable.SSTableLoader$1.accept(SSTableLoader.java:100)
      at java.io.File.list(File.java:1155)
      at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:67)
      at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:121)
      at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:66)
      -pr,--principal kerberos principal 
      -k,--keytab keytab location 
      --ssl-keystore ssl keystore location 
      --ssl-keystore-password ssl keystore password 
      --ssl-keystore-type ssl keystore type 
      --ssl-truststore ssl truststore location 
      --ssl-truststore-password ssl truststore password 
      --ssl-truststore-type ssl truststore type 
      

      It appears to be failing on this line of code:

              public EstimatedHistogram deserialize(DataInput dis) throws IOException
              {
                  int size = dis.readInt();
                  long[] offsets = new long[size - 1];     <---- here
      

      The same error is returned regardless of which data file is attempted. I suspect this may be due to corrupt data files or the way data is written that is not compatible with the sstableloader utility.

      NOTE: Both source and target clusters are DSE 3.2.5.

      Attachments

        Activity

          People

            Unassigned Unassigned
            flightc Erick Ramirez (deprecated)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: