Database Reference
In-Depth Information
One piece of advice here is to avoid trying to load data in sstables for the same
table using json2sstable multiple times, as it may leave an sstable in a corrupted
state. You can check server.log (under the log directory) for the following error:
Caused by:
org.apache.cassandra.io.compress.CorruptBlockException:
(/var/lib/cassandra/data/twitterkeyspace/dumpuser/
twitterkeyspace-dumpuser-jb-1-Data.db): corruption
detected, chunk at 0 of length 210.
at
org.apache.cassandra.io.compress.CompressedRandomAccessReader.decompressChunk
(CompressedRandomAccessReader.java:122)
at
org.apache.cassandra.io.compress.CompressedRandomAccessReader.reBuffer
(CompressedRandomAccessReader.java:87)
... 26 more
Trying to fetch data from a corrupted table (in this case the dumpuser table) using
the cql shell results in the following output:
cqlsh:twitterkeyspace> select * from dumpuser;
Request did not complete within rpc_timeout.
In this situation scrubbing and removing the corrupted data is our only option.
1.
The Cassandra distribution comes with sstablescrub utility,
which we'll use here:
$CASSANDRA_HOME/bin/sstablescrub
twitterkeyspace dumpuser
Running the preceding command results in the following output:
Pre-scrub sstables snapshotted into snapshot
pre-scrub-1412993550669
Scrubbing SSTableReader(path='/var/lib/
cassandra/data/twitterkeyspace/dumpuser/
twitterkeyspace-dumpuser-jb-1-Data.db') (218
bytes)
Search WWH ::




Custom Search