Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-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 8E4E59C92 for ; Wed, 11 Apr 2012 02:36:54 +0000 (UTC) Received: (qmail 68665 invoked by uid 500); 11 Apr 2012 02:36:54 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 68558 invoked by uid 500); 11 Apr 2012 02:36:54 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 68446 invoked by uid 99); 11 Apr 2012 02:36:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 02:36:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of josh.elser@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qc0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 02:36:44 +0000 Received: by qcsd16 with SMTP id d16so327203qcs.0 for ; Tue, 10 Apr 2012 19:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=iNf73DZKqHVkGNciKU2taWiVTk9g5MSNLjoW9RA1Hj4=; b=rlQVEOe57ddSBayWeyM4r5EJPq5w6f5tmPFlC8uOu3cotqZRsi5ceywjBSbB7XOdLP bYejBNwg14sYAIi+i7XThBZcyPGOQXtFko1W6R59gLulUoqbg/YLPwjP5PJzg16YfFgy SqHQhIlDGajEQCF8CYE0ofAFRyHolyblX3l7jK4ClGNH2n8yEq3A7+kH0EI2+i52rcNO GZHu93zMgq7ypmGTkKSEwbwdcReIaCcXCmzb9QXSbknJKxBc93XqYZgMVBbNtEUer3ZE 0m37SJUsO+tT2PcYRSAEgg3bwsdH059eqASObycq+dr07VeE74K9CVg9+2QFjBiWEbUN lRiw== Received: by 10.224.180.206 with SMTP id bv14mr17591329qab.56.1334111783946; Tue, 10 Apr 2012 19:36:23 -0700 (PDT) Received: from [192.168.2.19] (pool-71-166-54-36.bltmmd.fios.verizon.net. [71.166.54.36]) by mx.google.com with ESMTPS id i8sm3253268qah.4.2012.04.10.19.36.22 (version=SSLv3 cipher=OTHER); Tue, 10 Apr 2012 19:36:23 -0700 (PDT) Message-ID: <4F84EE29.4000703@gmail.com> Date: Tue, 10 Apr 2012 22:36:25 -0400 From: Josh Elser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: user@accumulo.apache.org Subject: Re: Using maxVersions=7 but rows disappear References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David, I'd venture a guess that because you only set the scan maxVersions, when Accumulo minor compacted your 'rolling' table to flush those K/V pairs to disk, it deleted your first 6 versions that you saw when performing the scan. You can determine if this is actually what happened by running your inserts below, and calling 'compact' on the table before performing the scan. To fix this, try setting the same option with the minc and majc scope. Most likely (but don't quote me): config -t rolling -s table.iterator.minc.vers.opt.maxVersions=7 config -t rolling -s table.iterator.majc.vers.opt.maxVersions=7 - Josh On 4/10/2012 10:16 PM, David Medinets wrote: > I'm still thinking about how to use accumulo to calculate weekly > moving averages. I thought that using the maxVersions settings might > work to maintain the last 7 values. Then a program could simply sum > the values of a given row. So this is what I did: > > bin/accumulo shell -u root -p password >> createtable rolling > rolling> config -t rolling -s table.iterator.scan.vers.opt.maxVersions=7 > rolling> insert row cf cq 1 > rolling> insert row cf cq 2 > rolling> insert row cf cq 3 > rolling> insert row cf cq 4 > rolling> insert row cf cq 5 > rolling> insert row cf cq 6 > rolling> insert row cf cq 7 > rolling> insert row cf cq 8 > rolling> scan > row cf:cq [] 8 > row cf:cq [] 7 > row cf:cq [] 6 > row cf:cq [] 5 > row cf:cq [] 4 > row cf:cq [] 3 > row cf:cq [] 2 > > This is exactly what I wanted to see. So I wrote a simple scanner > program to read the table. Then I did another scan: > > rolling> scan > row cf:cq [] 8 > > Where did the rest of the records go?