Sorry Chanan, I don't seem to be able to reproduce it (I've tried it on a
cluster of two VirtualBox machines. CentOS, cassandra20. Works well).
What's the query you're running? (I've tried $dbh->execute("SELECT * FROM
users")). Have you tried changing the read_consistency_level to ONE?


On Mon, Jun 16, 2014 at 10:10 AM, Chanan Berler <[email protected]> wrote:

> Hi Uri,
>
> I correct myself as I have downloaded the version found on GitHub:
> https://github.com/mkjellman/perlcassa
> and not from MetaCPan.
>
> Anyway I have tried both version (one found in MetaCPAN and the one found
> on GitHub) both gave me same issues on different line.
>
> Cassandra is installed on 6 CentOS machines running under Amazon (AWS),
> all machines were updated (yum update) and all are running perl 5.10
> All connected under same private network, all can do ping/ssh and when
> calling nodetool I can see all nodes are up and running.
> Doing cqlsh (without port/IP) on any of the nodes and then do
>
> use tests;
> select * from users;
>
> I can see the same data found on all the nodes.
> But when trying to do a simple get using perlcassa i see the error message
> :(
> Also I have run Dumper on the connection and it looks like it was
> established as some data were retrieved from Cassandra directly.
>
>
> Thanks
> Chanan
>
>
> On Sun, Jun 15, 2014 at 11:38 PM, Uri Hartmann <[email protected]> wrote:
>
>> Chanan,
>>
>> I did my tests with perlcassa 0.041 (installed using cpanm) and it worked
>> flawlessly, perhaps you should give it a try.
>>
>> I'm not quite sure how to install v0.06 via MetaCPan as it seems to
>> contain only version 0.041 ( https://metacpan.org/release/perlcassa ).
>>
>> Just to cover the basics - when you're trying it with cqlsh, you're
>> running "cqlsh" without any IP/Port, right?
>>
>> - HU
>>
>>
>> On Sun, Jun 15, 2014 at 11:43 AM, Chanan Berler <[email protected]>
>> wrote:
>>
>>> Currently am using perlcassa ver0.6 (downloaded from MetaCPan) and CQL
>>> ver 3.1.1
>>>
>>> Changing same as you said replacing seed_nodes with hosts =>
>>> ['127.0.0.1']
>>> if do_not_discover_peers set to 0 then I receive this error message:
>>> Can't call method "execute_cql3_query" on an undefined value at
>>> /usr/local/share/perl5/perlcassa/Client.pm line 65
>>> if do_not_discover_peers set to 1 then I receive this error message:
>>> Unable to find the column family users in test at /usr/local/share/perl5/
>>> perlcassa.pm line 510
>>>
>>> Chanan
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Jun 15, 2014 at 11:33 AM, Uri Hartmann <[email protected]>
>>> wrote:
>>>
>>>> Hi Chanan,
>>>>
>>>> I've commented out the 'seed_nodes' line (it gave me "Use of
>>>> uninitialized value in split"), and added 'hosts' => ['127.0.0.1'], to the
>>>> %connect_params - and it seems to work just fine with the same
>>>> keyspace/columnfamily as you've stated above.
>>>>
>>>> Perhaps your issue is related to
>>>> https://github.com/mkjellman/perlcassa/issues/46 ?
>>>>
>>>> - HU
>>>>
>>>>
>>>>  On Sun, Jun 15, 2014 at 11:30 AM, Chanan Berler <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi Uri,
>>>>>
>>>>> Found the problem, as I forgot to use test before calling describe
>>>>> columnfamily:
>>>>>
>>>>> DESCRIBE COLUMNFAMILY users;
>>>>>
>>>>>
>>>>> CREATE TABLE users (
>>>>>   user_id bigint,
>>>>>   birth_year bigint,
>>>>>   gender text,
>>>>>   password text,
>>>>>   session_token text,
>>>>>   state text,
>>>>>   user_name text,
>>>>>   PRIMARY KEY (user_id)
>>>>> ) WITH
>>>>>   bloom_filter_fp_chance=0.010000 AND
>>>>>   caching='KEYS_ONLY' AND
>>>>>   comment='' AND
>>>>>   dclocal_read_repair_chance=0.000000 AND
>>>>>   gc_grace_seconds=864000 AND
>>>>>   index_interval=128 AND
>>>>>   read_repair_chance=0.100000 AND
>>>>>   replicate_on_write='true' AND
>>>>>   populate_io_cache_on_flush='false' AND
>>>>>   default_time_to_live=0 AND
>>>>>   speculative_retry='99.0PERCENTILE' AND
>>>>>   memtable_flush_period_in_ms=0 AND
>>>>>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>>>>>   compression={'sstable_compression': 'LZ4Compressor'};
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Jun 15, 2014 at 11:21 AM, Chanan Berler <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Uri,
>>>>>>
>>>>>> I wonder why I receive this error message? doing simple select works
>>>>>> perfect
>>>>>> Chanan
>>>>>>
>>>>>>
>>>>>> DESCRIBE COLUMNFAMILY users
>>>>>>
>>>>>> Bad Request: line 2:44 no viable alternative at input 'and'
>>>>>> DESCRIBE KEYSPACE test;
>>>>>>
>>>>>>
>>>>>>
>>>>>> =========================================================
>>>>>>
>>>>>> CREATE KEYSPACE test WITH replication = {
>>>>>>   'class': 'SimpleStrategy',
>>>>>>   'replication_factor': '1'
>>>>>> };
>>>>>>
>>>>>> USE test;
>>>>>>
>>>>>> CREATE TABLE users (
>>>>>>   user_id bigint,
>>>>>>   birth_year bigint,
>>>>>>   gender text,
>>>>>>   password text,
>>>>>>   session_token text,
>>>>>>   state text,
>>>>>>   user_name text,
>>>>>>   PRIMARY KEY (user_id)
>>>>>> ) WITH
>>>>>>   bloom_filter_fp_chance=0.010000 AND
>>>>>>   caching='KEYS_ONLY' AND
>>>>>>   comment='' AND
>>>>>>   dclocal_read_repair_chance=0.000000 AND
>>>>>>   gc_grace_seconds=864000 AND
>>>>>>   index_interval=128 AND
>>>>>>   read_repair_chance=0.100000 AND
>>>>>>   replicate_on_write='true' AND
>>>>>>   populate_io_cache_on_flush='false' AND
>>>>>>   default_time_to_live=0 AND
>>>>>>   speculative_retry='99.0PERCENTILE' AND
>>>>>>   memtable_flush_period_in_ms=0 AND
>>>>>>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>>>>>>   compression={'sstable_compression': 'LZ4Compressor'};
>>>>>>
>>>>>> cqlsh>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jun 13, 2014 at 12:38 PM, Uri Hartmann <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Chanan,
>>>>>>>
>>>>>>> Can you please post the output of:
>>>>>>>
>>>>>>> DESCRIBE KEYSPACE test;
>>>>>>> DESCRIBE COLUMNFAMILY users;
>>>>>>>
>>>>>>> Thanks,
>>>>>>> - HU
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 11, 2014 at 2:13 PM, Chanan Berler <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> Has anyone had some experience connecting to Cassandra DB using
>>>>>>>> perl?
>>>>>>>> I have tried using perlcassa but failed :(
>>>>>>>>
>>>>>>>> Following is a small test I used to connect to Cassandra:
>>>>>>>>
>>>>>>>> #!/usr/bin/perl
>>>>>>>> use warnings;
>>>>>>>> use strict;
>>>>>>>> use Data::Dumper qw/Dumper/;
>>>>>>>> use perlcassa;
>>>>>>>>
>>>>>>>> my $self = {
>>>>>>>> };
>>>>>>>>
>>>>>>>> my %connect_params = (
>>>>>>>>         'columnfamily'                  => 'users',
>>>>>>>>         'keyspace'                      => 'test',
>>>>>>>>         'seed_nodes'                    => [split(/,/,
>>>>>>>> $self->{'_SEEDSNODES'})],
>>>>>>>>         'read_consistency_level'        =>
>>>>>>>> Cassandra::ConsistencyLevel::ALL,
>>>>>>>>         'write_consistency_level'       =>
>>>>>>>> Cassandra::ConsistencyLevel::ONE,
>>>>>>>>         'port'                          => 9160,
>>>>>>>> );
>>>>>>>>
>>>>>>>> my $dbh = new perlcassa(%connect_params);
>>>>>>>>
>>>>>>>> the error message I receive is:
>>>>>>>> Unable to find the column family users in test at
>>>>>>>> /usr/local/share/perl5/perlcassa.pm line 510.
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> ===================
>>>>>>>> ----     Chanan Berler    ----
>>>>>>>> ===================
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Perl mailing list
>>>>>>>> [email protected]
>>>>>>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Perl mailing list
>>>>>>> [email protected]
>>>>>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ===================
>>>>>> ----     Chanan Berler    ----
>>>>>> ===================
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ===================
>>>>> ----     Chanan Berler    ----
>>>>> ===================
>>>>>
>>>>> _______________________________________________
>>>>> Perl mailing list
>>>>> [email protected]
>>>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Perl mailing list
>>>> [email protected]
>>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>>
>>>
>>>
>>>
>>> --
>>> ===================
>>> ----     Chanan Berler    ----
>>> ===================
>>>
>>> _______________________________________________
>>> Perl mailing list
>>> [email protected]
>>> http://mail.perl.org.il/mailman/listinfo/perl
>>>
>>
>>
>> _______________________________________________
>> Perl mailing list
>> [email protected]
>> http://mail.perl.org.il/mailman/listinfo/perl
>>
>
>
>
> --
> ===================
> ----     Chanan Berler    ----
> ===================
>
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to