From user-return-27373-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Tue Jul 3 00:04:11 2012 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 B72A6D0FE for ; Tue, 3 Jul 2012 00:04:11 +0000 (UTC) Received: (qmail 69767 invoked by uid 500); 3 Jul 2012 00:04:09 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 69747 invoked by uid 500); 3 Jul 2012 00:04:09 -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 69737 invoked by uid 99); 3 Jul 2012 00:04:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 00:04:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a51.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 00:04:04 +0000 Received: from homiemail-a51.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTP id 79B612E8062 for ; Mon, 2 Jul 2012 17:03:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=N2i0y+Fp6o oqMhSnduNDGsfDjMZBHuMCqjul2mOpNQeCZKycY0FQXpvHAr0/Z3zAs0SEtsn9L0 bKPBkvJzVIqmUalYykS3toFX16DTp7suWuSSaVciXwzR/9uL6pOd8f0Zh8rnzriu Fo/ZFdToGxtBXiy41prIMFfIqTW8jjwbw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=qa81Fi5/6x46VzFi Xbne27zASTE=; b=mOPFlaCwYbcYPtvb7QvnPfcv9dF+MTLe7QYqQhZNDuwIQojB Y+LFGopSy4LchcI6s+EsV9JCoTrZfEhMj2HMs8wLrLqT6glceuYrIeMCfl3rjO1/ jDBijlVs9il9kGQ7eaYkMsgLkuB+Ps2rl9H8Sl34fuwHxPNHKUBix8xWCzE= Received: from [192.168.2.189] (unknown [116.90.132.105]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a51.g.dreamhost.com (Postfix) with ESMTPSA id 053632E8057 for ; Mon, 2 Jul 2012 17:03:41 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/alternative; boundary="Apple-Mail=_46AA6C7B-DCA0-4FD6-A66E-A4047F317CFA" Subject: Re: CQL / ASSUME for keys Date: Tue, 3 Jul 2012 12:03:39 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: <76969A99-B7E5-44C7-9CAE-9CB77E179CCA@thelastpickle.com> X-Mailer: Apple Mail (2.1278) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_46AA6C7B-DCA0-4FD6-A66E-A4047F317CFA Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 > I'm trying to do the following : update keyspace.CF set '2' = '2' + 12 > WHERE KEY = 'mykey'; CQL does not support expressions in the SET clause. http://www.datastax.com/docs/1.0/references/cql/UPDATE Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 28/06/2012, at 2:08 AM, Alain RODRIGUEZ wrote: > Hi, > > I'm trying to do the following : update keyspace.CF set '2' = '2' + 12 > WHERE KEY = 'mykey'; > And got this answer : "Bad Request: cannot parse 'mykey' as > hex bytes" > > Using this doesn't help : "assume keyspace.CF(KEY) VALUES ARE > text; (Found here > http://www.datastax.com/docs/1.0/references/cql/ASSUME and I'm using > C* 1.0.9) > > Show schema in cli gives : > > create column family CF > with column_type = 'Standard' > and comparator = 'UTF8Type' > and default_validation_class = 'CounterColumnType' > and key_validation_class = 'BytesType' > and rows_cached = 0.0 > and row_cache_save_period = 0 > and row_cache_keys_to_save = 2147483647 > and keys_cached = 2000.0 > and key_cache_save_period = 14400 > and read_repair_chance = 1.0 > and gc_grace = 864000 > and min_compaction_threshold = 4 > and max_compaction_threshold = 32 > and replicate_on_write = true > and row_cache_provider = 'ConcurrentLinkedHashCacheProvider' > and compaction_strategy = > 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'; > > What would be the consequences of changing the key_validation_class > from 'BytesType' to 'UTF8Type' (in production)? > > Shouldn't my assume command allow me to update my data even if I don't > give the key as Bytes ? > > Alain --Apple-Mail=_46AA6C7B-DCA0-4FD6-A66E-A4047F317CFA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
I'm trying to do the following : = update keyspace.CF set '2' =3D '2' + 12
WHERE KEY =3D = 'mykey';
CQL does not support expressions in the = SET clause. 


= Cheers


http://www.thelastpickle.com

On 28/06/2012, at 2:08 AM, Alain RODRIGUEZ wrote:

Hi,

I'm trying to do the following : update = keyspace.CF set '2' =3D '2' + 12
WHERE KEY =3D 'mykey';
And got = this answer =            : "Bad = Request: cannot parse 'mykey' as
hex bytes"

Using this doesn't = help        : "assume = keyspace.CF(KEY) VALUES ARE
text; (Found here
http://www= .datastax.com/docs/1.0/references/cql/ASSUME and I'm using
C* = 1.0.9)

Show schema in cli gives :

create column family = CF
 with column_type =3D 'Standard'
 and comparator =3D = 'UTF8Type'
 and default_validation_class =3D = 'CounterColumnType'
 and key_validation_class =3D = 'BytesType'
 and rows_cached =3D 0.0
 and = row_cache_save_period =3D 0
 and row_cache_keys_to_save =3D = 2147483647
 and keys_cached =3D 2000.0
 and = key_cache_save_period =3D 14400
 and read_repair_chance =3D = 1.0
 and gc_grace =3D 864000
 and = min_compaction_threshold =3D 4
 and max_compaction_threshold =3D = 32
 and replicate_on_write =3D true
 and = row_cache_provider =3D 'ConcurrentLinkedHashCacheProvider'
 and = compaction_strategy = =3D
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy';<= br>
What would be the consequences of changing the = key_validation_class
from 'BytesType' to 'UTF8Type'  (in = production)?

Shouldn't my assume command allow me to update my = data even if I don't
give the key as Bytes = ?

Alain

= --Apple-Mail=_46AA6C7B-DCA0-4FD6-A66E-A4047F317CFA--