From cassandra-user-return-1347-apmail-incubator-cassandra-user-archive=incubator.apache.org@incubator.apache.org Mon Nov 16 17:27:39 2009 Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 2751 invoked from network); 16 Nov 2009 17:27:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Nov 2009 17:27:39 -0000 Received: (qmail 1827 invoked by uid 500); 16 Nov 2009 17:27:39 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 1788 invoked by uid 500); 16 Nov 2009 17:27:39 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 1779 invoked by uid 99); 16 Nov 2009 17:27:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 17:27:39 +0000 X-ASF-Spam-Status: No, hits=-6.6 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [15.216.28.34] (HELO g1t0027.austin.hp.com) (15.216.28.34) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 17:27:37 +0000 Received: from G6W0640.americas.hpqcorp.net (g6w0640.atlanta.hp.com [16.230.34.76]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by g1t0027.austin.hp.com (Postfix) with ESMTPS id 20BC438363 for ; Mon, 16 Nov 2009 17:27:16 +0000 (UTC) Received: from G4W0659.americas.hpqcorp.net (16.234.40.187) by G6W0640.americas.hpqcorp.net (16.230.34.76) with Microsoft SMTP Server (TLS) id 8.2.176.0; Mon, 16 Nov 2009 17:27:06 +0000 Received: from GVW0432EXB.americas.hpqcorp.net ([16.234.32.145]) by G4W0659.americas.hpqcorp.net ([16.234.40.187]) with mapi; Mon, 16 Nov 2009 17:27:05 +0000 From: "Freeman, Tim" To: "cassandra-user@incubator.apache.org" Date: Mon, 16 Nov 2009 17:27:04 +0000 Subject: RE: Is the remove api working ?? Thread-Topic: Is the remove api working ?? Thread-Index: Acpm4P0hrDMYyPGfQ3m7htzRafWHvAAAJqFA Message-ID: <59DD1BA8FD3C0F4C90771C18F2B5B53A4C842D4DF8@GVW0432EXB.americas.hpqcorp.net> References: <468b21170911160919p79982a9bx682550e57d01427b@mail.gmail.com> In-Reply-To: <468b21170911160919p79982a9bx682550e57d01427b@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_59DD1BA8FD3C0F4C90771C18F2B5B53A4C842D4DF8GVW0432EXBame_" MIME-Version: 1.0 --_000_59DD1BA8FD3C0F4C90771C18F2B5B53A4C842D4DF8GVW0432EXBame_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable You might want to try ConsistencyLevel.QUORUM instead of ConsistencyLevel.O= NE if you're having issues with consistency. If you're running only one node, that shouldn't matter. Tim Freeman Email: tim.freeman@hp.com Desk in Palo Alto: (650) 857-2581 Home: (408) 774-1298 Cell: (408) 348-7536 (No reception business hours Monday, Tuesday, and Thur= sday; call my desk instead.) From: Richard grossman [mailto:richiesgr@gmail.com] Sent: Monday, November 16, 2009 9:19 AM To: cassandra-user@incubator.apache.org Subject: Is the remove api working ?? Hi I try to delete a CF from List of keys that I get from get_key_range. Because I don't want to get all the key I just build bunch of 1000 key and = delete them. All seems but the column are never removed If I run exactly the same code t= wice I get the key like never deleted. Could you help me ?? here is the code I use: List keys =3D cassandraClient.get_key_range("Keyspace1", "c= hannelShow", String.valueOf(start.getTimeInMillis()), stopKey, 1, Consisten= cyLevel.ONE); if (keys !=3D null && keys.size() =3D=3D 1) { String startKey =3D keys.get(0); do { keys =3D cassandraClient.get_key_range("Keyspace1", "channe= lShow", startKey, stopKey, 1000, ConsistencyLevel.ONE); long time =3D System.currentTimeMillis(); for (String key : keys) { long timestamp =3D System.currentTimeMillis(); cassandraClient.remove("Keyspace1", key, columnPath, ti= mestamp, ConsistencyLevel.ONE); } if (keys.size() < 1000) { keys =3D null; } else { startKey =3D keys.get(keys.size() - 1); } } while (keys !=3D null && keys.size() > 0); } All --_000_59DD1BA8FD3C0F4C90771C18F2B5B53A4C842D4DF8GVW0432EXBame_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

You might want to try ConsistencyLevel.QUORUM instead of Con= sistencyLevel.ONE if you're having issues with consistency.

 

If you're running only one node, that shouldn't matter.=

 

Tim Fre= eman
Email: tim= .freeman@hp.com
Desk in Palo Alto: (650) 857-2581
Home: (408) 774-1298
Cell: (408) 348-7536 (No reception business hours Monday, Tuesday, and Thursday; call my desk instead.)

 

From: Richard gross= man [mailto:richiesgr@gmail.com]
Sent: Monday, November 16, 2009 9:19 AM
To: cassandra-user@incubator.apache.org
Subject: Is the remove api working ??

 

Hi

I try to delete a CF from List of keys that I get from get_key_range.
Because I don't want to get all the key I just build bunch of 1000 key and delete them.
All seems but the column are never removed If I run exactly the same code t= wice I get the key like never deleted.

Could you help me ??

here is the code I use:
        List<String> keys =3D cassandraClient.get_key_range("Keyspace1", "channelShow"= ;, String.valueOf(start.getTimeInMillis()), stopKey, 1, ConsistencyLevel.ONE);=
        if (keys !=3D null && keys.si= ze() =3D=3D 1) {
            String startKey = =3D keys.get(0);
            do {
                keys =3D cassandraClient.get_key_range("Keyspace1", "channelShow", startKey, stopKey, 1000, ConsistencyLevel.ONE);
                long time =3D System.currentTimeMillis();
               = for (String key : keys) {
                    long timestamp =3D System.currentTimeMillis();
                    cassandraClient.remove("Keyspace1", key, columnPath, timestamp, ConsistencyLevel.ONE);
               = }

               = if (keys.size() < 1000) {
                    keys =3D null;
               = } else {
                    startKey =3D keys.get(keys.size() - 1);
               = }
            } while (keys !=3D= null && keys.size() > 0);
        }

All

--_000_59DD1BA8FD3C0F4C90771C18F2B5B53A4C842D4DF8GVW0432EXBame_--