Reputation: 417
I have a script that downloads all the necessary files to use sstabledump from gcloud and then dumps them to a json but for some reason i got this error:
java.io.EOFException
at org.apache.cassandra.io.util.RebufferingInputStream.readByte(RebufferingInputStream.java:180)
at org.apache.cassandra.io.util.RebufferingInputStream.readPrimitiveSlowly(RebufferingInputStream.java:142)
at org.apache.cassandra.io.util.RebufferingInputStream.readInt(RebufferingInputStream.java:222)
at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:157)
at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:132)
at org.apache.cassandra.tools.Util.metadataFromSSTable(Util.java:317)
at org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:144)
java.io.EOFException
at org.apache.cassandra.io.util.RebufferingInputStream.readByte(RebufferingInputStream.java:180)
at org.apache.cassandra.io.util.RebufferingInputStream.readPrimitiveSlowly(RebufferingInputStream.java:142)
at org.apache.cassandra.io.util.RebufferingInputStream.readInt(RebufferingInputStream.java:222)
at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:157)
at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:132)
at org.apache.cassandra.tools.Util.metadataFromSSTable(Util.java:317)
at org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:144)
any idea on why that could happen?
Upvotes: 0
Views: 136
Reputation: 16353
That indicates to me that one (or more) of the SSTables is incomplete or corrupted.
The end-of-file exception (EOFException
) gets thrown because the SSTable metadata indicates that there's more data in the *-Data.db
file but the end of the file was reached.
This is expected if you are copying the files from the live data/*
subdirectories because the files have not necessarily been (a) fully flushed to disk, or (b) not fully compacted yet.
I recommend that you do a nodetool snapshot
and only copy the SSTables from the snapshots/*
subdirectories to ensure that the files are fully consistent. Cheers!
Upvotes: 2