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 5A4FF9603 for ; Tue, 17 Apr 2012 12:50:13 +0000 (UTC) Received: (qmail 58249 invoked by uid 500); 17 Apr 2012 12:50:13 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 58211 invoked by uid 500); 17 Apr 2012 12:50:12 -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 58197 invoked by uid 99); 17 Apr 2012 12:50:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 12:50:12 +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 (athena.apache.org: domain of david.medinets@gmail.com designates 209.85.210.41 as permitted sender) Received: from [209.85.210.41] (HELO mail-pz0-f41.google.com) (209.85.210.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 12:50:06 +0000 Received: by dajx4 with SMTP id x4so9712846daj.0 for ; Tue, 17 Apr 2012 05:49:45 -0700 (PDT) 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=YNMy+Khe1Wj10AnyUuXRIIXSy/Z5uYrtzNHptCdobZw=; b=OpQDIBU3bYnEVeLHEgVoAJrxPvOsg7DwC0YzCLX//i2CAjrvDqclaB0EQpTsbYLpHg QJpdU9k0yzy67rKyRc0Rnkyh8yeBPhOIVrC65DKx1U9oBn9rRY3238gFqZ9uHJHE4c/+ IApUF08YJ6dmP4uovM7zmnCwYyzPNNWRRbnvdtL3bIBI4njcbX6rKoI3mj4QeVbqzQjj 3dNZFcL9aY6Pwbq5/E8powf/jwjzEbcF/d/xWqgZFth7pddutaj1kN6sK/6vnoxlPfoA fI3iK8fiTCCaVZmxphfyrvawT+swLjoZ92l75UADG1mQcMreirvz6gnFdDsep9vUR1FM ju8A== MIME-Version: 1.0 Received: by 10.68.219.4 with SMTP id pk4mr6990744pbc.133.1334666985684; Tue, 17 Apr 2012 05:49:45 -0700 (PDT) Received: by 10.68.63.73 with HTTP; Tue, 17 Apr 2012 05:49:45 -0700 (PDT) Date: Tue, 17 Apr 2012 08:49:45 -0400 Message-ID: Subject: Querying Accumulo From Inside Mapper From: David Medinets To: accumulo-user Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I am reading from a text file of linked IDs but I want to store the lookup values inside Accumulo. RDB FOO ------ FOO_ID <-- this is the autoincrement key ALT_ID <-- this is the natural key NAME AGE RDB BAR ------ BAR_ID <-- this is the autoincrement key TAG <-- zero or more person RDB LINK ------ FOO_ID BAR_ID * RDB is relational database table. Inside Accumulo, I want to use the ALT_ID as the row id because there is other data that uses it which will also be stored in the row. I will process the FOO text file first to result in: FOO ------- ALT_ID NAME XXX ALT_ID AGE XXX FOO_ID ALT_ID XXXX Can I write to two Accumulo tables using one mapper? If I can, then I can store the FOO_ID/ALT_ID record in a separate table. Processing the BAR text file provides: BAR ------ BAR_ID TAG XXXX Then when I process the LINK table, I can query the FOO table to find the ALT_ID. And query the BAR table to find the tag. Then combine the information for the mutation: FOO ------ ALT_ID TAG XXX Is there a best practice to query from inside a mapper? At the end of the work, I can delete the ALT_ID column (or table). I know that this work is trivial using SQL, but that's not an option.