Netflix의 Astyanax cassandra API Test Case를  cassandra-unit(https://github.com/jsevellec/cassandra-unit)을 이용해서 진행하던 차에 byte 단위 통신에서 실패가 발생한다. 그러나 Cassandra 서버와의 통신은 잘 된다.... (이건 머지? Cassandra Unit의 구현체?)


2일 동안 고생한 결과, 궁합이 맞지 않는 것으로 생각된다.  Astyatnax 의 com.netflix.astyanax.util.SingletonEmbeddedCassandra, com.netflix.astyanax.util.EmbeddedCassandra써서 유닛테스트 코드를 개발해야 한다.  


아래와 같은 Exception 발생시 고민해봐야할 것이다. 


1)

 [Native-Transport-Requests:102] ERROR transport.messages.ErrorMessage - Unexpected exception during request

java.lang.ArrayIndexOutOfBoundsException: 68

at org.apache.cassandra.transport.Message$Type.fromOpcode(Message.java:106)

at org.apache.cassandra.transport.Frame$Decoder.decode(Frame.java:168)

at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)

at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)

at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)

at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)

at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)

at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)

at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)

at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)

at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)


2014-05-14 18:14:30,141 [main] DEBUG astyanax.thrift.ThriftConverter - Read a negative frame size (-2113929216)!


2) 

 [Native-Transport-Requests:95] ERROR transport.messages.ErrorMessage - Unexpected exception during request

java.lang.ArrayIndexOutOfBoundsException: 55

at org.apache.cassandra.transport.Message$Type.fromOpcode(Message.java:106)

at org.apache.cassandra.transport.Frame$Decoder.decode(Frame.java:168)

at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)

at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)

at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)

at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)

at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)

at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)

at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)

at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)

at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722)



Posted by '김용환'
,