naughty-or-nice
naughty-or-nice copied to clipboard
Not enough bytes to read value of component 0 -- in ChildDaoTest
Boneill42, Another issue, came up after the first.
I am not getting this, not enought byes while trying to run the ChildDaoTest
com.netflix.astyanax.connectionpool.exceptions.BadRequestException: BadRequestException: [host=localhost(127.0.0.1):9160, latency=6(6), attempts=1] InvalidRequestException(why:Not enough bytes to read value of component 0) at com.netflix.astyanax.thrift.ThriftConverter.ToConnectionPoolException(ThriftConverter.java:159) at com.netflix.astyanax.thrift.AbstractOperationImpl.execute(AbstractOperationImpl.java:60) at com.netflix.astyanax.thrift.AbstractOperationImpl.execute(AbstractOperationImpl.java:27) at com.netflix.astyanax.thrift.ThriftSyncConnectionFactoryImpl$1.execute(ThriftSyncConnectionFactoryImpl.java:132) at com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl.tryOperation(AbstractExecuteWithFailoverImpl.java:52) at com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java:229) at com.netflix.astyanax.thrift.ThriftKeyspaceImpl.executeOperation(ThriftKeyspaceImpl.java:446) at com.netflix.astyanax.thrift.ThriftKeyspaceImpl.access$400(ThriftKeyspaceImpl.java:62) at com.netflix.astyanax.thrift.ThriftKeyspaceImpl$1.execute(ThriftKeyspaceImpl.java:115) at com.github.boneill42.ChildDao.write(ChildDao.java:30) at com.github.boneill42.ChildDaoTest.testWrite(ChildDaoTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: InvalidRequestException(why:Not enough bytes to read value of component 0) at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:20833) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:964) at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:950) at com.netflix.astyanax.thrift.ThriftKeyspaceImpl$1$1.internalExecute(ThriftKeyspaceImpl.java:121) at com.netflix.astyanax.thrift.ThriftKeyspaceImpl$1$1.internalExecute(ThriftKeyspaceImpl.java:118) at com.netflix.astyanax.thrift.AbstractOperationImpl.execute(AbstractOperationImpl.java:55) ... 32 more
INFO (com.netflix.astyanax.connectionpool.impl.ConnectionPoolMBeanManager:45) - Registering mbean: com.netflix.MonitoredResources:type=ASTYANAX,name=MyConnectionPool,ServiceType=connectionpool DEBUG (com.github.boneill42.ChildDao:38) - Read child [bart.simpson] DEBUG (com.github.boneill42.ChildDaoTest:46) - [ ]->[] DEBUG (com.github.boneill42.ChildDaoTest:46) - [ country ]->[USA] DEBUG (com.github.boneill42.ChildDaoTest:46) - [ firstname ]->[Bart] DEBUG (com.github.boneill42.ChildDaoTest:46) - [ lastname ]->[Simpson] DEBUG (com.github.boneill42.ChildDaoTest:46) - [ state ]->[CA] DEBUG (com.github.boneill42.ChildDaoTest:46) - [ zip ]->[94111] DEBUG (com.netflix.astyanax.thrift.ThriftConverter:157) - DEBUG (com.github.boneill42.ChildDao:38) - Read child [the.devil] DEBUG (com.github.boneill42.ChildDao:46) - Deleted child [the.devil]
I am getting the "Not enough bytes to read value of component 0" on the ChildDaoTest.testWrite
I believe that this is because the children table creation does not have the 'WITH COMPACT STORAGE' in northpole++.cql. I'm guessing this is because you can't have a 'set' (toys in northpole++) as a column if you have 'WITH COMPACT STORAGE'. I'm very new to NoSQL and Cassandra so don't know how to fix yet :)