cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yikes bigdata <yikes.bigd...@gmail.com>
Subject Unable to access column family in CLI after building CF in CQL
Date Thu, 16 Jun 2011 15:51:41 GMT
Hi,

I was following the CQL example on the DataStax website and was able to
create a new column family and query it. But when I viewed the column family
in the CLI, it gives me the following error.

# Unable to read column family created from CQL

[default@store] list users2;
*users2 not found in current keyspace.*

Also, when I try to query the user table from CQL, i'm unable to filter on a
key.  The user table was created in the CLI but accessible by CQL with a
simple select * from users;

cqlsh> select * from users where key='tyler';
*Bad Request: cannot parse 'tyler' as hex bytes*





# In the CLI, the store keyspaces displays two column families .

[default@store] show keyspaces;
Keyspace: store:
  Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
    Options: [replication_factor:1]
  Column Families:
    *ColumnFamily: users*
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator:
org.apache.cassandra.db.marshal.BytesType
      Columns sorted by: org.apache.cassandra.db.marshal.AsciiType
      Row cache size / save period in seconds: 0.0/0
      Key cache size / save period in seconds: 200000.0/14400
      Memtable thresholds: 0.26718749999999997/57/1440 (millions of
ops/MB/minutes)
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Replicate on write: false
      Built indexes: []
      Column Metadata:
        Column Name: email
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
        Column Name: userName
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
    *ColumnFamily: users2*
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator:
org.apache.cassandra.db.marshal.UTF8Type
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period in seconds: 0.0/0
      Key cache size / save period in seconds: 200000.0/14400
      Memtable thresholds: 0.26718749999999997/57/1440 (millions of
ops/MB/minutes)
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Replicate on write: true
      Built indexes: []
      Column Metadata:
        Column Name: session_token
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
        Column Name: state
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
        Column Name: password
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
        Column Name: birth_year
          Validation Class: org.apache.cassandra.db.marshal.LongType
        Column Name: gender
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Keyspace: system:

Able to see the list of keys generate within the CLI

[default@store] list users;
Using default limit of 100
-------------------
RowKey: foo
=> (column=age, value=3339, timestamp=1308182349595000)
=> (column=email, value=foo@email.com, timestamp=1308182349594000)
=> (column=userName, value=foo, timestamp=1308182349591000)
-------------------
RowKey: bar
=> (column=email, value=bar@email.com, timestamp=1308182355297000)
=> (column=gender, value=66, timestamp=1308182355299000)
=> (column=userName, value=bar, timestamp=1308182355295000)
-------------------
RowKey: tyler
=> (column=email, value=tyler@email.com, timestamp=1308182355303000)
=> (column=sports, value=6261736562616c6c, timestamp=1308182355309000)
=> (column=userName, value=tyler, timestamp=1308182355302000)

Mime
View raw message