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
