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 B25F3D23E for ; Wed, 8 Aug 2012 00:39:00 +0000 (UTC) Received: (qmail 73736 invoked by uid 500); 8 Aug 2012 00:38:58 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 73713 invoked by uid 500); 8 Aug 2012 00:38:58 -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 73698 invoked by uid 99); 8 Aug 2012 00:38:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2012 00:38:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.172] (HELO mail-gg0-f172.google.com) (209.85.161.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2012 00:38:51 +0000 Received: by ggnc4 with SMTP id c4so243613ggn.31 for ; Tue, 07 Aug 2012 17:38:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=8dbBvYT1oshEcP8UIuXqPbNewv1GMntG9VcayAUVOo8=; b=gnX6VMX4I8h22Hcbc9Dd+bhVn9S5/zNwJ2fHnepHuVxRSFevH9GLFgFyWw6z0iFJAA 1Zy44RiisOceHYFKFJ4daihIY8A0IfUHiFT6Bxgv0nBSKh645qjrx6Zs4spji4OZxpw0 AUnBRabPOHrcLuZgvxWm9qrgeLsJ8K2nIM+zxNq4WHmVy+CLxYvdNwqA3E5V7kLeS5HN si/4jAVq8X3mw6RKw+nrrOhZ44RjsloUOouUjnXvI14EJYhL4MORJfQBqJu+SAIZ0Jsv 8cCI2q897q1/C/gAFA5NenR/3aRX8nh44FnhI+Vt2wDliKmYrZxh7/c4Aw1kxvWVRW0d I5YA== MIME-Version: 1.0 Received: by 10.50.222.162 with SMTP id qn2mr267785igc.46.1344386310399; Tue, 07 Aug 2012 17:38:30 -0700 (PDT) Received: by 10.64.46.193 with HTTP; Tue, 7 Aug 2012 17:38:30 -0700 (PDT) X-Originating-IP: [72.163.0.129] Date: Tue, 7 Aug 2012 19:38:30 -0500 Message-ID: Subject: CQL / cli question From: Greg Fausak To: user Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQlUQFHqZOnPZPejjbh75dfsBuB335KTWWrv7Z6XgKw+nwhjkV4GIfLIqluR2stRk+ooA88R X-Virus-Checked: Checked by ClamAV on apache.org I think I'm having a major brain fart here, I am just not getting something. I have the following CF declared in CQL -3 create columnfamily testCQL5( ac_event_id int, ac_c text, ac_mtcreation bigint, ac_action text , ac_id text, PRIMARY KEY (ac_c, ac_mtcreation)); I can do this: cqlsh:op2> select * from testCQL5 where ac_c = '2099.t4.l1.cisco.com'; ac_c | ac_mtcreation | ac_action | ac_event_id | ac_id ----------------------+---------------+-----------+-------------+---------------- 2099.t4.l1.cisco.com | 767473 | Suspense | 101 | a common comme 2099.t4.l1.cisco.com | 987987987 | UP | 123 | ThisIsMe and this... cqlsh:op2> select * from testCQL5 where ac_mtcreation > 600000 and ac_mtcreation < 800000; ac_c | ac_mtcreation | ac_action | ac_event_id | ac_id ----------------------+---------------+-----------+-------------+---------------- 2099.t4.l1.cisco.com | 767473 | Suspense | 101 | a common comme 1171.t4.l1.cisco.com | 757473 | JACKSON | 100 | this is the ID I can do this: cqlsh:op2> select * from testCQL5 where ac_c = '2099.t4.l1.cisco.com' and ac_mtcreation > 600000 and ac_mtcreation < 800000; ac_c | ac_mtcreation | ac_action | ac_event_id | ac_id ----------------------+---------------+-----------+-------------+---------------- 2099.t4.l1.cisco.com | 767473 | Suspense | 101 | a common comme I can do the former query in the cli, using this statement: [default@op2] get testCQL5['2099.t4.l1.cisco.com']; => (column=767473:ac_action, value=Suspense, timestamp=1344354369232000) => (column=767473:ac_event_id, value=e, timestamp=1344354369232001) => (column=767473:ac_id, value=a common comme, timestamp=1344354369232002) => (column=987987987:ac_action, value=UP, timestamp=1344354733386000) => (column=987987987:ac_event_id, value={, timestamp=1344355513787000) => (column=987987987:ac_id, value=ThisIsMe, timestamp=1344354749195000) Returned 6 results. How can I do the next two CQL queries using the cli? Or even a query that tells me the ac_mtcreation time of 767473? create column family testcql5 with column_type = 'Standard' and comparator = 'CompositeType(org.apache.cassandra.db.marshal.LongType,org.apache.cassandra.db.marshal.UTF8Type)' and default_validation_class = 'UTF8Type' and key_validation_class = 'UTF8Type' and read_repair_chance = 0.1 and dclocal_read_repair_chance = 0.0 and gc_grace = 864000 and min_compaction_threshold = 4 and max_compaction_threshold = 32 and replicate_on_write = true and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' and caching = 'KEYS_ONLY' and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'}; I am really pulling my hair out over this. Any help would be appreciated! Thanks, -greg