Talend Cassandra issue - Not enough bytes to read value of component 0

One Star

Talend Cassandra issue - Not enough bytes to read value of component 0

Hi,
I am trying to read data from Datastax Cassandra 2.0.5 through TOS_BD 5.4.1 (both are hosted on my local machine Win 7).
I am new to both these tools, so I followed the instructions in the Talend user guide to create a job to connect and read data through tCassandraInput.
The Job is reading data from the below table and writing to output file.
Cassandra table:
CREATE TABLE emp (
empid int,
emp_dept text,
emp_first text,
emp_last text,
PRIMARY KEY (empid)
)
I am getting the below error while reading the data:
Exception in component tCassandraInput_1
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Not enough bytes to read value of component 0)
If I do not include the non-key columns (emp_dept, emp_first and emp_last) in query configuration, the job runs fine and reads NULL for those fields.
I tried creating a job that reads data from csv file and writes to Cassandra table, it converts all the data (string and ints) to Blobs.
I think that is the reason I am getting the above error while reading data.
Is there any configuration change that I need to do for Talend or for Cassandra?
I believe the StringSerializer.get() is not working properly but there is no way to change the back-end java code for the job.
Please advise.
I am hopelessly stuck.
Any help will be greatly appreciated.
Thanks!!
Employee

Re: Talend Cassandra issue - Not enough bytes to read value of component 0

Hi arush,
Have you looked at the output schema in your tCassandraInput component for the DB type listed there? If those types are too small or wrong it might through an error like that.
Best Regards,
Ben
One Star

Re: Talend Cassandra issue - Not enough bytes to read value of component 0

I am having exactly the same problem (same version of Cassandra and Talend), with a much simpler Cassandra table which has 3 string columns.
In my case I have defined the DBType as UTF8Type (I have also tried the AsciiType), and have tried numerous settings for 'Length' of the string columns...however the 2 non-key columns are always being returned as NULL.
Could this be related to the newer version of Cassandra?
One Star

Re: Talend Cassandra issue - Not enough bytes to read value of component 0

Hello,
I am experiencing the exact same issue, but with a very simple table - CREATE TABLE test2 (
col1 int,
col2 int,
PRIMARY KEY (col1)
)
Does anyone have this working with Cassandra 2.0?
One Star

Re: Talend Cassandra issue - Not enough bytes to read value of component 0

Try to create table with COMPACT STORAGE OPTION. Seems to be talend issue