当我尝试使用 pelops api 将数据插入 cassandra 时出现以下错误
java.lang.NoSuchMethodError: org.apache.cassandra.thrift.Column.<init>(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;J)V
我正在使用以下罐子
- scale7-core-1.3.0.jar
- scale7-pelops-0.912-0.7.0-rc4-1.jar
- cassandra-1.0.5的lib目录下的所有jar
调用以下函数会导致异常
public void writeToBatch(String columnFamily, String rowKey, String colmName,String value, int ttl)
{
this.mutator.writeColumn(columnFamily, rowKey,
mutator.newColumn(colmName, value, ttl));
}
错误堆栈如下:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.cassandra.thrift.Column.<init>(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;J)V
at org.scale7.cassandra.pelops.Mutator.newColumn(Mutator.java:625)
at org.scale7.cassandra.pelops.Mutator.newColumn(Mutator.java:562)
at com.audienceadnetwork.cassandra.sstablewriter.utils.PelopsClient.writeToBatch(Unknown Source)