【发布时间】:2011-01-30 03:13:21
【问题描述】:
当使用 Perl 模块 Net::Cassandra::Easy 与 Cassandra 交互时,我使用以下代码从列族 row[123] 中的行 col[123] 中读取列 Standard1:
my $cassandra = Net::Cassandra::Easy->new(keyspace => 'Keyspace1', server => 'localhost');
$cassandra->connect();
my $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byname => ['col1', 'col2', 'col3']);
这按预期工作。
但是,当尝试使用 .. 插入行 row1 时
$result = $cassandra->mutate(['row1'], family => 'Standard1', insertions => { "col1" => "Value to set." });
.. 我收到错误消息Can't use string ("0") as a SCALAR ref while "strict refs" in use at .../Net/GenThrift/Thrift/BinaryProtocol.pm line 376。
我做错了什么?
【问题讨论】:
标签: perl nosql cassandra thrift