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 B7DB5DB3A for ; Sat, 1 Dec 2012 02:05:08 +0000 (UTC) Received: (qmail 19872 invoked by uid 500); 1 Dec 2012 02:05:06 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 19845 invoked by uid 500); 1 Dec 2012 02:05:06 -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 19835 invoked by uid 99); 1 Dec 2012 02:05:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Dec 2012 02:05:06 +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 jamie.rothfeder@gmail.com designates 209.85.217.172 as permitted sender) Received: from [209.85.217.172] (HELO mail-lb0-f172.google.com) (209.85.217.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Dec 2012 02:04:58 +0000 Received: by mail-lb0-f172.google.com with SMTP id y2so1027868lbk.31 for ; Fri, 30 Nov 2012 18:04:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=IQH79T9jTWBVvkneFsrNjb3D0h+CeMSqyVskvbJdQMc=; b=ptW/VELjCHmqLNXnnxIdV5v1L9axwplTpmSUhY6swjt+x+Ph/7f8CRE7WgDOT0USGN tQRjH+IJg1CBQS4xps9SjtB9s4w2TPkrYlA3u3MQG8NUFYfNRLu1KzKcJMzsjTot8h0C GHUKlrBxQhf+dByaNEHz34NbvKHTgGL8OVGkfO2TamkLDATTTUEy2OAnjJR1nZ1U946j UoqpwWLBCwqnqKSp8oSXtZ8/faNxqPV7kYtGT+DpSeY9IP5h3X6RME2jAKyyFfjbvRG7 bE1cAiXSQLKk4R7QzlC3mU2j+2ZPlmCJkfRT6EaBjeYrcq3KspN4KsMOja972xYk0dNG oGsg== MIME-Version: 1.0 Received: by 10.152.145.169 with SMTP id sv9mr3167858lab.2.1354327477970; Fri, 30 Nov 2012 18:04:37 -0800 (PST) Received: by 10.112.29.68 with HTTP; Fri, 30 Nov 2012 18:04:37 -0800 (PST) Date: Fri, 30 Nov 2012 21:04:37 -0500 Message-ID: Subject: Hadoop Integration: Limiting scan to a range of keys From: Jamie Rothfeder To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=e89a8f2350973be7ed04cfc0f0b8 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f2350973be7ed04cfc0f0b8 Content-Type: text/plain; charset=ISO-8859-1 Hey All, I have a bunch of time-series data stored in a cluster using a ByteOrderedPartitioner. My keys are time buckets representing events that occurred in an hour. I've been trying to write a mapreduce job that considers only events with in a certain time range by specifying an input range, but this doesn't seem to be working. I expect the following code to scan data for a single key (1353456000), but it is scanning all keys. int key = 1353456000; IPartitioner part = ConfigHelper.getInputPartitioner(job.getConfiguration()); Token token = part.getToken(ByteBufferUtil.bytes(key)); ConfigHelper.setInputRange(job.getConfiguration(), part.getTokenFactory().toString(token), part.getTokenFactory().toString(token)); Any idea what I'm doing wrong? Thanks, Jamie --e89a8f2350973be7ed04cfc0f0b8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey All,

I have a bunch of time-series data stored in a = cluster using a ByteOrderedPartitioner. My keys are time buckets representi= ng events that occurred in an hour. I've been trying to write a mapredu= ce job that considers only events with in a certain time range by specifyin= g an input range, but this doesn't seem to be working.

I expect the following code to scan data for a single k= ey (1353456000), but it is scanning all keys.

int key =3D 1353456= 000;
IPartitioner part =3D ConfigHel= per.getInputPartitioner(job.getConfiguration());
Token token =3D =A0part= .getToken(ByteBufferUtil.bytes(key));
ConfigHelper.setInputRange(job.get= Configuration(), part.getTokenFactory().toString(token), part.getTokenFacto= ry().toString(token));

Any idea what I'm doing wrong?

= Thanks,
Jamie
--e89a8f2350973be7ed04cfc0f0b8--