Why do I get an error when inserting rows with Net::Cassandra::Easy and Cassandra 0.5x?
Posted
by knorv
on Stack Overflow
See other posts from Stack Overflow
or by knorv
Published on 2010-03-21T21:26:26Z
Indexed on
2010/03/27
10:53 UTC
Read the original article
Hit count: 343
When using the Perl module Net::Cassandra::Easy to interface with Cassandra I use the following code to read colums col[123]
from rows row[123]
in the column-family 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']);
This works as expected.
However, when trying to insert row row1
with ..
$result = $cassandra->mutate(['row1'], family => 'Standard1', insertions => { "col1" => "Value to set." });
.. I get the error message Can't use string ("0") as a SCALAR ref while "strict refs" in use at .../Net/GenThrift/Thrift/BinaryProtocol.pm line 376
.
What am I doing wrong?
© Stack Overflow or respective owner