You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Michael Fortin <mi...@m410.us> on 2010/12/02 00:06:29 UTC

thrift error

Hello,

I'm trying to insert a super column but I can't get passed this error.  

the error:
InvalidRequestException(why:column name must not be empty)
	at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:14408)
	at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:828)
	at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:800)

Family def:
- {name: Super, column_type: Super, compare_with: TimeUUIDType, compare_subcolumns_with: LongType}

this is the code I'm calling:
...
client = new Cassandra.Client(protocol, protocol)
client.insert(key, columnParent, c, level)


And the values from the debugger:
key = {java.nio.HeapByteBuffer@3168}  "java.nio.HeapByteBuffer[pos=0 lim=16 cap=16]"
columnParent = {org.apache.cassandra.thrift.ColumnParent@3169}  "ColumnParent(column_family:Super, super_column:00 00 00 00 00 00 00 0C)"
c = {org.apache.cassandra.thrift.Column@3170}  "Column(name:63 6F 6C 75 6D 6E, value:76 61 6C 75 65, timestamp:1291243840220)"


I can insert a standard column without any issues with the same codebase..  What column name must not be empty??  Clearly it's not.  What am I missing?  

Thanks
Mike



Re: thrift error

Posted by Aaron Morton <aa...@thelastpickle.com>.
Try turning up the logging on the server side to DEBUG and see what it says. Chances are you are not sending what you think you are. 

Or if you feel like it put a breakpoint in o.a.c.thrift.Cassandra$Client.send_insert to see how when the client is doing. 

I agree with Tyler, higher level clients are *much* easier. But it's sometimes fun to see what's happening on the inside. 

Aaron


On 02 Dec, 2010,at 12:59 PM, Tyler Hobbs <ty...@riptano.com> wrote:

Is there a particular reason why you're not using a high level client?

http://wiki.apache.org/cassandra/ClientOptions

Raw thrift is painful in many ways.

- Tyler

On Wed, Dec 1, 2010 at 5:06 PM, Michael Fortin <mi...@m410.us> wrote:
Hello,

I'm trying to insert a super column but I can't get passed this error.

the error:
InvalidRequestException(why:column name must not be empty)
       at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:14408)
       at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:828)
       at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:800)

Family def:
- {name: Super, column_type: Super, compare_with: TimeUUIDType, compare_subcolumns_with: LongType}

this is the code I'm calling:
...
client = new Cassandra.Client(protocol, protocol)
client.insert(key, columnParent, c, level)


And the values from the debugger:
key = {java.nio.HeapByteBuffer@3168}  "java.nio.HeapByteBuffer[pos=0 lim=16 cap=16]"
columnParent = {org.apache.cassandra.thrift.ColumnParent@3169}  "ColumnParent(column_family:Super, super_column:00 00 00 00 00 00 00 0C)"
c = {org.apache.cassandra.thrift.Column@3170}  "Column(name:63 6F 6C 75 6D 6E, value:76 61 6C 75 65, timestamp:1291243840220)"


I can insert a standard column without any issues with the same codebase..  What column name must not be empty??  Clearly it's not.  What am I missing?

Thanks
Mike




Re: thrift error

Posted by Tyler Hobbs <ty...@riptano.com>.
Is there a particular reason why you're not using a high level client?

http://wiki.apache.org/cassandra/ClientOptions

Raw thrift is painful in many ways.

- Tyler

On Wed, Dec 1, 2010 at 5:06 PM, Michael Fortin <mi...@m410.us> wrote:

> Hello,
>
> I'm trying to insert a super column but I can't get passed this error.
>
> the error:
> InvalidRequestException(why:column name must not be empty)
>        at
> org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:14408)
>        at
> org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:828)
>        at
> org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:800)
>
> Family def:
> - {name: Super, column_type: Super, compare_with: TimeUUIDType,
> compare_subcolumns_with: LongType}
>
> this is the code I'm calling:
> ...
> client = new Cassandra.Client(protocol, protocol)
> client.insert(key, columnParent, c, level)
>
>
> And the values from the debugger:
> key = {java.nio.HeapByteBuffer@3168}  "java.nio.HeapByteBuffer[pos=0
> lim=16 cap=16]"
> columnParent = {org.apache.cassandra.thrift.ColumnParent@3169}
>  "ColumnParent(column_family:Super, super_column:00 00 00 00 00 00 00 0C)"
> c = {org.apache.cassandra.thrift.Column@3170}  "Column(name:63 6F 6C 75 6D
> 6E, value:76 61 6C 75 65, timestamp:1291243840220)"
>
>
> I can insert a standard column without any issues with the same codebase..
>  What column name must not be empty??  Clearly it's not.  What am I missing?
>
> Thanks
> Mike
>
>
>