Netflix / astyanax

Cassandra Java Client
Apache License 2.0
1.04k stars 354 forks source link

BadRequestException: Object Chunk storeage - InvalidRequestException - Astyanax #622

Open deepakdabi opened 8 years ago

deepakdabi commented 8 years ago

I have been trying to implement Object chunk store implementation with Cassandra 3.x (tried same with 2.x as well getting same error)

  1. Table schema :- CREATE TABLE test.employees1(empid int PRIMARY KEY, deptid int, first_name text, last_name text) WITH COMPACT STORAGE;
  2. Below is the code:- ChunkedStorageProvider provider = new CassandraChunkedStorageProvider(keyspace, EMP_CF_NAME); String objName = "first_name"; InputStream someInputStream = new FileInputStream(new File(fPath)); ObjectMetadata meta = ChunkedStorage.newWriter(provider, objName, someInputStream).withChunkSize(0x1000) .withConcurrencyLevel(3).withTtl(60).call(); meta = ChunkedStorage.newInfoReader(provider, "first_name").call(); System.out.println(meta.getObjectSize().intValue()); System.out.println(meta.getChunkCount());

Done anyone has implemented Object chunk store with C* 3.0 ?

  1. to insert primary key with this mehtod ?

Full Error com.netflix.astyanax.connectionpool.exceptions.BadRequestException: BadRequestException: [host=127.0.0.1(127.0.0.1):9160, latency=231(255), attempts=1]InvalidRequestException(why:Expected 4 or 0 byte int (10)

Now here the qus is how do we insert primary key of table , i believe this error bay be due to that only. Is there any way we can insert multiple column in the same provider call. Any help appreciated. thx - Deepak