We are getting the following kind of exception due to a small mistake that we do in creating column families in cassandra. I had created the column family with providing
comparator type as LONG.
But once i try to insert columns having String values as column names it throws this error.
Solution: Drop the created column family using cassandra-cli
create the Column Family with appropriate comparator type
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Expected 8 or 0 byte long (9))
at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:42)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:95)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:88)
at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:156)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:129)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:100)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:106)
at me.prettyprint.cassandra.model.MutatorImpl$2.doInKeyspace(MutatorImpl.java:172)
at me.prettyprint.cassandra.model.MutatorImpl$2.doInKeyspace(MutatorImpl.java:169)
at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:72)
at me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:169)
at org.apache.qpid.server.store.CassandraMessageStore.addMessageContent(CassandraMessageStore.java:267)
at org.apache.qpid.server.store.CassandraMessageStore$StoredCassandraMessage.addContent(CassandraMessageStore.java:620)
at org.apache.qpid.server.queue.IncomingMessage.addContentBodyFrame(IncomingMessage.java:144)
at org.apache.qpid.server.AMQChannel.publishContentBody(AMQChannel.java:391)
at org.apache.qpid.server.protocol.AMQProtocolEngine.contentBodyReceived(AMQProtocolEngine.java:477)
at org.apache.qpid.framing.ContentBody.handle(ContentBody.java:83)
at org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:336)
at org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:285)
at org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:256)
at org.apache.qpid.pool.Job.processAll(Job.java:110)
at org.apache.qpid.pool.Job.run(Job.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: InvalidRequestException(why:Expected 8 or 0 byte long (9))
at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16477)
at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916)
at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:93)
... 25 more
This is where i thought of sharing my experience , my knowledge and what i know ..
Friday, August 5, 2011
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Expected 8 or 0 byte long (9))
We are getting the following kind of exception due to a small mistake that we do in creating column families in cassandra.
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Expected 8 or 0 byte long (9))
at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:42)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:95)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:88)
at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:156)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:129)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:100)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:106)
at me.prettyprint.cassandra.model.MutatorImpl$2.doInKeyspace(MutatorImpl.java:172)
at me.prettyprint.cassandra.model.MutatorImpl$2.doInKeyspace(MutatorImpl.java:169)
at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:72)
at me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:169)
at org.apache.qpid.server.store.CassandraMessageStore.addMessageContent(CassandraMessageStore.java:267)
at org.apache.qpid.server.store.CassandraMessageStore$StoredCassandraMessage.addContent(CassandraMessageStore.java:620)
at org.apache.qpid.server.queue.IncomingMessage.addContentBodyFrame(IncomingMessage.java:144)
at org.apache.qpid.server.AMQChannel.publishContentBody(AMQChannel.java:391)
at org.apache.qpid.server.protocol.AMQProtocolEngine.contentBodyReceived(AMQProtocolEngine.java:477)
at org.apache.qpid.framing.ContentBody.handle(ContentBody.java:83)
at org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:336)
at org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:285)
at org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:256)
at org.apache.qpid.pool.Job.processAll(Job.java:110)
at org.apache.qpid.pool.Job.run(Job.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: InvalidRequestException(why:Expected 8 or 0 byte long (9))
at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16477)
at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916)
at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:93)
... 25 more
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Expected 8 or 0 byte long (9))
at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:42)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:95)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:88)
at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:156)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:129)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:100)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:106)
at me.prettyprint.cassandra.model.MutatorImpl$2.doInKeyspace(MutatorImpl.java:172)
at me.prettyprint.cassandra.model.MutatorImpl$2.doInKeyspace(MutatorImpl.java:169)
at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:72)
at me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:169)
at org.apache.qpid.server.store.CassandraMessageStore.addMessageContent(CassandraMessageStore.java:267)
at org.apache.qpid.server.store.CassandraMessageStore$StoredCassandraMessage.addContent(CassandraMessageStore.java:620)
at org.apache.qpid.server.queue.IncomingMessage.addContentBodyFrame(IncomingMessage.java:144)
at org.apache.qpid.server.AMQChannel.publishContentBody(AMQChannel.java:391)
at org.apache.qpid.server.protocol.AMQProtocolEngine.contentBodyReceived(AMQProtocolEngine.java:477)
at org.apache.qpid.framing.ContentBody.handle(ContentBody.java:83)
at org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:336)
at org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:285)
at org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:256)
at org.apache.qpid.pool.Job.processAll(Job.java:110)
at org.apache.qpid.pool.Job.run(Job.java:149)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: InvalidRequestException(why:Expected 8 or 0 byte long (9))
at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16477)
at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916)
at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890)
at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:93)
... 25 more
Subscribe to:
Posts (Atom)