Astyanax: simple write throwing this exception: Not enough bytes to read value of component

前端 未结 2 1490
一整个雨季
一整个雨季 2021-01-12 01:36

I am new to astyanax and trying some sample programs and getting this error. This is a simple write and looks like am doing some thing basic wrong. Not using composite keys.

2条回答
  •  离开以前
    2021-01-12 01:55

    I'm also new to Astyanax and encountering the the same exceptions. The exception is due to a mismatch between what Astyanax Thrift-based objects think the column definition should look like and how it is store in 1.2+ using CQL 3. I learned specifying COMPACT STORAGE so that the table is created in the pre 1.2 format will allow me interact with it via the Thrift-based objects. FWIW: I'm building Astyanax from source, but I did see a 1.56.34 in maven central; I would update to that also.

    CREATE TABLE test (
     col1 text PRIMARY KEY,
     col2 text,
     col3 text
    ) WITH COMPACT STORAGE AND
    ...
    

    See Working with pre-CQL 3 applications

提交回复
热议问题