这是代码:
Selector selector = Pelops.createSelector(CASSANDRA_POOL);
Column column = selector.getSubColumnFromRow("Neighbours", user, neighbour, "Link_ID", CL_ONE);
String linkID = new String(column.getValue());
Mutator mutator = Pelops.createMutator(CASSANDRA_POOL);
System.out.println(linkID);
System.out.println(topic);
mutator.deleteSubColumns("Links",linkID,topic);
mutator.execute(CL_ONE);
结果如下:
ERROR - Exception being returned to browser when processing /ajax_request/F314921638127GLWWRG/: Message: java.lang.NullPointerException
org.scale7.cassandra.pelops.Validation.validateColumnNames(Validation.java:60)
org.scale7.cassandra.pelops.Mutator.deleteSubColumns(Mutator.java:724)
org.scale7.cassandra.pelops.Mutator.deleteSubColumns(Mutator.java:698)
但我不明白为什么它给了我异常,linkID 和主题字符串具有正确的值。
PS:cassandra的版本是1.0.0,pelops的版本是1.3-1.0.x-20111021.060203-2
有人能帮我吗 ?