Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F2DB10BCE for ; Thu, 6 Jun 2013 02:21:50 +0000 (UTC) Received: (qmail 92038 invoked by uid 500); 6 Jun 2013 02:21:47 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 91987 invoked by uid 500); 6 Jun 2013 02:21:47 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 91979 invoked by uid 99); 6 Jun 2013 02:21:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 02:21:47 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of jrf@mit.edu does not designate 69.164.218.4 as permitted sender) Received: from [69.164.218.4] (HELO computableinsights.com) (69.164.218.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 02:21:42 +0000 Received: by computableinsights.com (Postfix, from userid 1000) id D09A5306C67; Wed, 5 Jun 2013 22:21:21 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by computableinsights.com (Postfix) with ESMTP id 87E7D31D091 for ; Wed, 5 Jun 2013 22:21:21 -0400 (EDT) Date: Wed, 5 Jun 2013 22:21:21 -0400 (EDT) From: "John R. Frank" X-X-Sender: jrf@computableinsights.com To: user@cassandra.apache.org Subject: smallest/largest UUIDs for LexicalUUIDType Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org C*, I'm trying to use composite column names to organize 10**8 records. Each record has a unique pair of UUIDs. The first UUID is often repeated, so I want to use column_start and column_finish to find all the records that have a given UUID as the first UUID in the pair. I thought a simple way to get *all* of the columns would be to use start = uuid.UUID(int=0) -> 00000000-0000-0000-0000-000000000000 finish = uuid.UUID(int=2**128-1) -> ffffffff-ffff-ffff-ffff-ffffffffffff But strangely, this fails to find *any* of the columns, and it requires that column_reversed=True -- otherwise it raises an error about range finish not coming after start. If I use ints that are much larger/smaller than these extremes, then reversed is not required! Can anyone explain why LexicalUUIDType() does not treat these extremal UUIDs like other UUIDs? Using pycassa v1.9: sm = SystemManager(chosen_server) sm.create_keyspace(namespace, SIMPLE_STRATEGY, {'replication_factor': '1'}) family = 'test' sm.create_column_family( namespace, family, super=False, key_validation_class = ASCII_TYPE, default_validation_class = BYTES_TYPE, comparator_type=CompositeType(LexicalUUIDType(), LexicalUUIDType()), #column_name_class = LEXICAL_UUID_TYPE ) pool = ConnectionPool(namespace, config['storage_addresses'], max_retries=1000, pool_timeout=10, pool_size=2, timeout=120) cf = pycassa.ColumnFamily(pool, family) u1, u2, u3, u4 = uuid.uuid1(), uuid.uuid1(), uuid.uuid1(), uuid.uuid1() cf.insert('inbound', {(u3, u3): b'43'}) start = uuid.UUID(int=0) finish = uuid.UUID(int=2**128-1) print start print finish assert start < u3 < finish print cf.get('inbound', column_start=(start,), column_finish=(finish,), column_reversed=True).items() sm.close() Raises: if len(list_col_or_super) == 0: > raise NotFoundException() E NotFoundException: NotFoundException(_message=None) ../../ve/local/lib/python2.7/site-packages/pycassa/columnfamily.py:663: NotFoundException jrf