How to write WHERE .. LIKE query ?

2010-05-10 Thread Shuge Lee
Hi all: How to write WHERE ... LIKE query ? For examples(described in Python): Schema: # columnfamily name resources = [ # key 'foo': { # columns and value 'url': 'foo.com', 'pushlier': 'foo', }, 'oof': { 'url': 'oof.com', 'pushlier': 'off',

UUIDs must be exactly 16 bytes ?

2010-05-05 Thread Shuge Lee
r/lib/python2.6/site-packages/cassandra/Cassandra.py", line 804, in recv_batch_mutate raise result.ire cassandra.ttypes.InvalidRequestException: InvalidRequestException(why='UUIDs must be exactly 16 bytes') What's going on ? -- Shuge Lee | Lee Li | 李蠡

Re: A simple Cassandra CLI in Python with readline support

2010-05-01 Thread Shuge Lee
Thanks for reply. Add GPLv3 license, github.com/shuge/shuge-cassandra/downloads. 2010/5/1 Jonathan Ellis > Nice work! > > Can you add license information, e.g., Apache license? > > On Sat, May 1, 2010 at 5:06 AM, Shuge Lee wrote: > > Hi all: > > > > I write

A simple Cassandra CLI in Python with readline support

2010-05-01 Thread Shuge Lee
Hi all: I write a simple Cassandra CLI in Python with readline support, FEATURES - inherited all standard Apache Cassandra CLI features - readline for more information, see http://github.com/shuge/shuge-cassandra . -- Shuge Lee | Lee Li

Re: How to generate 'unique' identifiers for use in Cassandra

2010-04-27 Thread Shuge Lee
still need keys for the > columns. > > A straightforward way of generating unique IDs for your objects is to add > an incrementing ID (managed locally) to the host name of the (client) node > where they were generated. But this is probably not helpful in most cases. > > Mark > -- Shuge Lee | Lee Li | 李蠡

Re: how to get apache cassandra version with thrift client ?

2010-04-26 Thread Shuge Lee
n't get the Cassandra release version, but you can get the > Thrift api version, which is more useful. It's compiled as a constant > VERSION string in your client library. See the comments in > interface/cassandra.thrift. > > On Mon, Apr 26, 2010 at 8:14 PM, Shuge Lee w

how to get apache cassandra version with thrift client ?

2010-04-26 Thread Shuge Lee
Hi all: How to get apache cassandra version with thrift client ? Thanks for reply. -- Shuge Lee | Lee Li | 李蠡

Re: how to store file in the cassandra?

2010-04-25 Thread Shuge Lee
the files? > > > > On Mon, Apr 26, 2010 at 8:57 AM, Shuge Lee wrote: > >> In Python: >> >> keyspace.columnfamily[key][column] = value >> >> files.video[uuid.uuid4()]['name'] = 'foo.flv' >> files.video[uuid.uuid4()

Re: how to store file in the cassandra?

2010-04-25 Thread Shuge Lee
27;, 'path' : '/var/files/foo.flv', } } if most of sizes >= 0.5MB, use sys-fs/reiser4progs, else use ext4. 2010/4/26 Bingbing Liu > any suggestion? > > 2010-04-26 > -- > Bingbing Liu > -- Shuge Lee | Lee Li | 李蠡

Re: how to store list data in Apache Cassndra ?

2010-04-06 Thread Shuge Lee
pickle > > client = pycassa.connect() > > cf = pycassa.ColumnFamily(client, 'mygame', 'user') > > > > key = '1234567890' > > value = { > > 'name': 'Lee Li', > > 'age'; '21

how to store list data in Apache Cassndra ?

2010-04-06 Thread Shuge Lee
va', 'actionscript', 'python'], } cf.insert(key, value) Oops, get error while save a `value` like above. So, how to store list data in Apache Cassndra ? Thanks for reply. -- Shuge Lee | Lee Li

how to store list ?

2010-04-02 Thread Shuge Lee
For example: user['lee'] = { 'name': 'lee', 'age'; '21', 'girls': ['java', 'actionscript', 'python'], } how to store above in Apache Cassndra ? -- Shuge Lee | Lee Li | 李蠡