I have this code:
sliceRange.Start = UTF8StringToBytes(strStart)
sliceRange.Finish = UTF8StringToBytes(strFinish)
sliceRange.Reversed = True
sliceRange.Count = intCount
predicate.Slice_range = sliceRange
Dim results As List(Of ColumnOrSuperColumn) = client.get_slice(UTF8StringToBytes(rowKey), columnFamily, predicate, ConsistencyLevel.ONE)
When I use this code this results in the following error from cassandra / thrift: Required field 'reversed' was not found in serialized data!
What's wrong?
You appear to have an issue with the underlying generated Thrift code. Unless you have a specific reason to do so, using Thrift directly to access Cassandra is not recommended. There are many client libraries available that will abstract this for you.
Having said that, I have used the Thrift-generated C# code to write my own library in the past, and have not run into this issue. Perhaps your problem has something to do with your use of VB? If you have some reason to use Thrift directly, you might try the same code in C# to see if that resolves the issue. If not, make sure you have the right versions of Cassandra and Thrift, as incompatibilities there can cause issues such as this.