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 C6E06D66E for ; Thu, 1 Nov 2012 08:17:39 +0000 (UTC) Received: (qmail 29869 invoked by uid 500); 1 Nov 2012 08:17:39 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 29589 invoked by uid 500); 1 Nov 2012 08:17:38 -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 29519 invoked by uid 99); 1 Nov 2012 08:17:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 08:17:35 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [204.13.248.74] (HELO mho-02-ewr.mailhop.org) (204.13.248.74) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 08:17:27 +0000 Received: from c-174-61-147-86.hsd1.wa.comcast.net ([174.61.147.86] helo=mail.kuehns.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1TTpxa-000L5Y-1J; Thu, 01 Nov 2012 08:17:06 +0000 Received: by mail.kuehns.com (Postfix, from userid 5001) id 304987001E8; Thu, 1 Nov 2012 01:20:21 -0700 (PDT) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 174.61.147.86 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+W7OsiLH23lPBOotwwJwoM X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on sneaky1 X-Spam-Level: Received: from kuehns.com (localhost [127.0.0.1]) by mail.kuehns.com (Postfix) with ESMTP id 8EDB87000FC; Thu, 1 Nov 2012 01:20:20 -0700 (PDT) Received: from 72.234.129.253 (SquirrelMail authenticated user skuehn) by kuehns.com with HTTP; Thu, 1 Nov 2012 01:20:20 -0700 (PDT) Message-ID: <49268.72.234.129.253.1351758020.squirrel@kuehns.com> In-Reply-To: <6714-1351740929-272712@sneakemail.com> References: <6714-1351740929-272712@sneakemail.com> Date: Thu, 1 Nov 2012 01:20:20 -0700 (PDT) Subject: Re: Cost of scanner usage in a MapReduce mapper? From: skuehn@kuehns.com To: user@accumulo.apache.org Cc: accumulo-user@incubator.apache.org User-Agent: SquirrelMail/1.4.13 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-4.3 required=2.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 For clarification, are you trying to create DAO's from the Key/Value fed to a Mapper by AccumuloInputFormat, or are you trying to process a different data set while simultaneously querying your DAO's? > Today I had a really nice conversation with billie and vines on #accumu= lo. > This email is a followup to that conversation, and there's a little mor= e > context of my problem here. > > We have an application that we've developed independently from MapReduc= e. > To > get away from the low-level keys and values of Accumulo, we quickly mad= e a > series of DAOs that each take in an Accumulo Instance as a constructor > argument. These DAOs internally create the necessary scanners and retu= rn > domain-specific objects. I imagine this is a common practice. > > Now, we've got a feature that needs to operate on all the data, so we'r= e > doing > some MapReduce. I think I understand now the architecture of > AccumuloInputFormat from discussions on #accumulo. What I didn't discu= ss > was > whether it was reasonable (or not reasonable because of the performance > cost) > to try to use one of our DAOs within a mapper. > > The mappers need to operate per row, and our system has potentially > billions of > rows. With my DAOs, I can reuse the same Accumulo instance, but each c= all > will create a new scanner from my instance, so a MapReduce job using a = DAO > in > the mappers will potentially create billions of scanners over the cours= e > of > operation. However, the way we've designed these DAOs, it's easy to m= ake > sure > all accesses are tied to the row the mapper is tasked with (in an attem= pt > to > maintain data locality). > > By comparison. I feel the AccumuloInputFormat will create about as man= y > Accumulo scanners as there are tablet servers, so dramatically less. > > Our current thinking is that creating billions scanners with these DAO > accesses > might cost too much in performance, but we're not completely sure this = is > the > case with respect to the kind of caching Accumulo does with its clients= . > > If the performance cost is indeed too high, then we're going to have to > deal > with the abstraction challenge of trying to avoid code duplication betw= een > our > DAOs and our MapReduce jobs.