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 4F3A11178F for ; Sun, 31 Aug 2014 00:59:41 +0000 (UTC) Received: (qmail 20043 invoked by uid 500); 31 Aug 2014 00:59:38 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 20000 invoked by uid 500); 31 Aug 2014 00:59:38 -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 19989 invoked by uid 99); 31 Aug 2014 00:59:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Aug 2014 00:59:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of todd.nine@gmail.com designates 209.85.160.177 as permitted sender) Received: from [209.85.160.177] (HELO mail-yk0-f177.google.com) (209.85.160.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Aug 2014 00:59:11 +0000 Received: by mail-yk0-f177.google.com with SMTP id 200so2378108ykr.8 for ; Sat, 30 Aug 2014 17:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=eHZyoeyKJq+M6kNGmWD8gTrqLDPuq+tRJ5ac1K9Pffw=; b=eFzW1R33dzqPWeT6CYvrKpOIT7/6oUQ1KPTQOhFEeazLRMNDxbAkfThwJdoSS8M4Fa pjXsauLnKutcYtr3vnI9amxsChcXVjdBr9lgF7CEOWY8TGy00IhjVRETN6bs/8gPyRox +8pV7UAB6BqS4QzOT1+/9cs9SfgLaJ3/2AXjy7Btraek2e72Zie+V8QxFjrg8jjV6jGz kjwcSGBBiL4oJCaSUjoyhM84i5ANzg1yN3LdCmzFrLc30YOP4mVOHZrlmE+T7e09z9xJ UEh73nyXcedyPd1Q2/k+8XdI8RwBaXuGccoeldojeFWhBl8WsmJpnz7riMHPw2N+1+WY V8NQ== MIME-Version: 1.0 X-Received: by 10.236.4.2 with SMTP id 2mr29789010yhi.20.1409446750589; Sat, 30 Aug 2014 17:59:10 -0700 (PDT) Sender: todd.nine@gmail.com Received: by 10.170.145.136 with HTTP; Sat, 30 Aug 2014 17:59:10 -0700 (PDT) Date: Sat, 30 Aug 2014 18:59:10 -0600 X-Google-Sender-Auth: tjRv47ClSI0wDurefvbWQZ41Hjk Message-ID: Subject: Help with migration from Thrift to CQL3 on Cassandra 2.0.10 From: Todd Nine To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001a11c20d3ce61bc60501e26454 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c20d3ce61bc60501e26454 Content-Type: text/plain; charset=UTF-8 Hi all, I'm working on transferring our thrift DAOs over to CQL. It's going well, except for 2 cases that both use multi get. The use case is very simple. It is a narrow row, by design, with only a few columns. When I perform a multiget, I need to get up to 1k rows at a time. I do not want to turn these into a wide row using scopeId and scopeType as the row key. On the physical level, my Column Family needs something similar to the following format. scopeId, scopeType, nodeId, nodeType :{ timestamp: 0x00 } I've defined by table with the following CQL. CREATE TABLE IF NOT EXISTS Graph_Marked_Nodes ( scopeId uuid, scopeType varchar, nodeId uuid, nodeType varchar, timestamp bigint, PRIMARY KEY ((scopeId , scopeType, nodeId, nodeType)) )WITH caching = 'all' This works well for inserts deletes and single reads. I always know the scopeId, scopeType, nodeId, and nodeType, so I want to return the timestamp columns. I thought I could use the IN operation and specify the pairs of nodeId and nodeTypes I have as input, however this doesn't work. Can anyone give me a suggestion on how to perform a multiget when I have several values for the nodeId and the nodeType? This read occurs on every read of edges so making 1k trips is not going to work from a performance perspective. Below is the query I've tried. SELECT timestamp FROM Graph_Marked_Nodes WHERE scopeId = ? AND scopeType = ? AND nodeId IN (uuid1, uuid2, uuid3) AND nodeType IN ('foo','bar') I've found this issue, which looks like it's a solution to my problem. https://issues.apache.org/jira/browse/CASSANDRA-6875 However, I'm not able to get the syntax in the issue description to work either. Any input would be appreciated! Cassandra: 2.0.10 Datastax Driver: 2.1.0 Thanks, Todd --001a11c20d3ce61bc60501e26454 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,
=C2=A0 I'm working on transferring our thr= ift DAOs over to CQL. =C2=A0It's going well, except for 2 cases that bo= th use multi get. =C2=A0The use case is very simple. =C2=A0It is a narrow r= ow, by design, with only a few columns. =C2=A0When I perform a multiget, I = need to get up to 1k rows at a time. =C2=A0I do not want to turn these into= a wide row using scopeId and scopeType as the row key.


On the physical level, my Column Family = needs something similar to the following format.

<= br>
scopeId, scopeType, nodeId, nodeType :{ timestamp: 0x00 }


I've defined by table with the follo= wing CQL.


CREATE TABLE IF NOT = EXISTS Graph_Marked_Nodes=C2=A0
( scopeId uuid, scopeType varchar= , nodeId uuid, nodeType varchar, timestamp bigint, =C2=A0
PRIMARY KEY ((scopeId , scopeType, nodeId, nodeType))=C2=A0
= )WITH caching =3D 'all'


This works well for inserts deletes and single reads. =C2=A0I always kno= w the scopeId, scopeType, nodeId, and nodeType, so I want to return the tim= estamp columns. =C2=A0I thought I could use the IN operation and specify th= e pairs of nodeId and nodeTypes I have as input, however this doesn't w= ork. =C2=A0

Can anyone give me a suggestion on how to perform a mul= tiget when I have several values for the nodeId and the nodeType? =C2=A0Thi= s read occurs on every read of edges so making 1k trips is not going to wor= k from a performance perspective.

Below is the query I've tried.

=
SELECT timestamp FROM =C2=A0Graph_Marked_Nodes WHERE scopeId =3D ? AND= scopeType =3D ? AND nodeId IN (uuid1, uuid2, uuid3) AND nodeType IN ('= foo','bar')

I've found this issue, which looks like it's a = solution to my problem.


However, I'm not able to get the syntax in th= e issue description to work either. =C2=A0Any input would be appreciated!

Cassandra: 2.0.10
Datastax Driver: 2.1.0<= /div>

Thanks,
Todd




--001a11c20d3ce61bc60501e26454--