我正在使用 hector-core 0.8.0-1 和 Cassandra 0.8.0 来测试 addCounter 操作,但我发现我的代码无法将任何数据插入 CF,谁能告诉我原因?
StringSerializer ser = StringSerializer.get();
Mutator<String> mutator = HFactory.createMutator(keyspace, ser);
List<HCounterColumn<String>> counterColumns = Arrays.asList(
HFactory.createCounterColumn("1", 30L, ser),
HFactory.createCounterColumn("2", 20L, ser)
);
for (HCounterColumn c : counterColumns)
{
mutator.addCounter("testKey1", "CounterColumn", c);
mutator.addCounter("testKey2", "CounterColumn", c);
}
mutator.execute();
我在我的日志中发现了以下信息:
> 2011-06-21 17:17:00,025 [Thread-3]
> INFO me.prettyprint.cassandra.hector.TimingLogger
> - Tag Avg(ms)
> Min Max Std Dev 95th Count 2011-06-21 17:17:00,030
> [Thread-3] INFO me.prettyprint.cassandra.hector.TimingLogger
> - WRITE.fail_ 4.84
> 4.84 4.84 0.00 4.84 1 2011-06-21 17:17:00,031 [Thread-3]
> INFO me.prettyprint.cassandra.hector.TimingLogger
> - META_WRITE.fail_ 17.20
> 11.31 23.09 5.89 23.09 2 2011-06-21 17:17:00,031 [Thread-3]
> INFO me.prettyprint.cassandra.hector.TimingLogger
> -
执行 mutator.execute(); 时似乎有问题;
提前致谢!