I use a custom comparator class. So I think there is a high chance that I do 
something wrong there. I was thinking that the stack trace could give a clue 
and help me on the way, maybe because some already got the same error.

 

Anyway, here is some more information you requested.

 

Yaml definition :

name: ForwardStringValues

          column_type: Super

          compare_with: 
be.landc.services.search.server.db.cassandra.node.ForwardCFStringValues

          compare_subcolumns_with: BytesType

          keys_cached: 100000

          rows_cached: 0

          comment: Stores the values of functions returning string

          memtable_throughput_in_mb: 64

          memtable_operations_in_millions: 15

          min_compaction_threshold: 2

          max_compaction_threshold: 5

 

Column Family: ForwardStringValues

                SSTable count: 8

                Space used (live): 131311776690

                Space used (total): 131311776690

                Memtable Columns Count: 0

                Memtable Data Size: 0

                Memtable Switch Count: 0

                Read Count: 1

                Read Latency: 404.890 ms.

                Write Count: 0

                Write Latency: NaN ms.

                Pending Tasks: 0

                Key cache capacity: 100000

                Key cache size: 8

                Key cache hit rate: 1.0

                Row cache: disabled

                Compacted row minimum size: 150

                Compacted row maximum size: 7152383774

                Compacted row mean size: 3064535

 

No secondary indexes.

Total database disk size 823 Gb

disk_access_mode: auto on 64 bit windows os

partitioner: org.apache.cassandra.dht.ByteOrderedPartitioner

Data was stored over a period of 5 days.

Cassandra 0.7.4 was running as an embedded server.

Batch insert, using the StorageProxy.mutate.

No errors were logged during the batch insert period.

The row key is a string representation of a positive integer value. 

The same row key is used during many different mutate calls, but all super 
column names are different for each call.

The column name of the super class stored  is composed of the 32 bytes and the 
bytes of 2 integer (positive and negative) values and the bytes (UTF8) of the 
string value :[32 bytes][4 int bytes][4 int bytes][string bytes]

The custom comparator class ...ForwardCFStringValues sorts the names by first 
sorting the string , then the 32 bytes, and then the two integer values

For each column name two subcolumns are inserted with fixed name and some small 
binary value (about 40 bytes)

 

The query :

Get_slice using thrift.

Params : 

  Row key : the string representation of the positive integer String ‘1788’ 
thus hex values 31 37 38 38

  ColumnParent : the column family ForwardStringValues

  SlicePredicate : SlicePredicate(slice_range:SliceRange(start:00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 FF FF FF FF FF FF FF FF 55 52 49 4E 41 52 59 20 54 52 41 43 54 20 49 4E 46 
45 43 54 49 4F 4E, finish:7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 
7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F 7F FF FF FF 7F FF FF FF 7F 55 52 49 4E 
41 52 59 20 54 52 41 43 54 20 49 4E 46 45 43 54 49 4F 4E, reversed:false, 
count:10000))

 

This SlicePredicate is supposed to fetch all the columns with the string ‘55 52 
49 4E 41 52 59 20 54 52 41 43 54 20 49 4E 46 45 43 54 49 4F 4E’ regardless of 
the other bytes in the column name. So the start and finish have the same 
string bytes. The rest of the bytes for the start values are set to the lowest 
possible value (32 zero bytes and the bytes FFFFFFFF representing the integer 
value -1) , the finish is set the highest possible value (32 bytes with value 
7F, …)

 

I tested the same code but with a small data set and all seemed to be OK. Even 
on the same database I get back results without exception if I use different 
String values. I’m almost sure that there should be columns with that string. 
If the string is not present I don’t get the error.

 

 

 

 

From: Aaron Morton [mailto:aa...@thelastpickle.com] 
Sent: Monday, May 16, 2011 11:33 PM
To: user@cassandra.apache.org
Subject: Re: AssertionError

 

The code is trying to follow the column index for a row in an sstable, but it 
cannot skip as many bytes as it would like to to get to the column. Helpfully 
the help says running out of bytes is only one of the reasons why this could 
happen:)

 

Can you provide some more information about the query and the data, and also 
the upgrade history for your cluster.

 

Thanks

Aaron


On 17/05/2011, at 3:07 AM, "Desimpel, Ignace" <ignace.desim...@nuance.com> 
wrote:

        Environment : java 64 bit server, java client, thrift get_slice method, 
Cassandra 0.7.4, single node

        Depending on the data I pass for a query on a CF I get the following 
listed below. Any suggestions what could be wrong based on the stack trace?

         

        java.lang.AssertionError

                        at 
org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.getNextBlock(IndexedSliceReader.java:176)

                        at 
org.apache.cassandra.db.columniterator.IndexedSliceReader.computeNext(IndexedSliceReader.java:120)

                        at 
org.apache.cassandra.db.columniterator.IndexedSliceReader.computeNext(IndexedSliceReader.java:48)

                        at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:136)

                        at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:131)

                        at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.hasNext(SSTableSliceIterator.java:108)

                        at 
org.apache.commons.collections.iterators.CollatingIterator.set(CollatingIterator.java:282)

                        at 
org.apache.commons.collections.iterators.CollatingIterator.least(CollatingIterator.java:325)

                        at 
org.apache.commons.collections.iterators.CollatingIterator.next(CollatingIterator.java:229)

                        at 
org.apache.cassandra.utils.ReducingIterator.computeNext(ReducingIterator.java:68)

                        at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:136)

                        at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:131)

                        at 
org.apache.cassandra.db.filter.SliceQueryFilter.collectReducedColumns(SliceQueryFilter.java:116)

                        at 
org.apache.cassandra.db.filter.QueryFilter.collectCollatedColumns(QueryFilter.java:130)

                        at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1368)

                        at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1245)

                        at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1173)

                        at org.apache.cassandra.db.Table.getRow(Table.java:333)

                        at 
org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:63)

                        at 
org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:453)

                        at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)

                        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                        at java.lang.Thread.run(Thread.java:662)

         

        Ignace Desimpel

Reply via email to