Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-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 561824352 for ; Wed, 25 May 2011 04:04:33 +0000 (UTC) Received: (qmail 54563 invoked by uid 500); 25 May 2011 04:04:32 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 54496 invoked by uid 500); 25 May 2011 04:04:30 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 54487 invoked by uid 99); 25 May 2011 04:04:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2011 04:04:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of saint.ack@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qy0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2011 04:04:22 +0000 Received: by qyk2 with SMTP id 2so2304346qyk.14 for ; Tue, 24 May 2011 21:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=cykc1OMdGjaMzky96ooZ30EFGrbdgJpI2fEWCPWJQl4=; b=XO1SsUjelk51Q7t5TCEq5CaiYKKiLOV9jqhic/NGD0WAIX6kGSm4cEkGRaMtQG7DWA RNMjoS8Ei+DksWoupK6mv3KC0BcfalXB4E2r0raj6ljowY5J5YtY6kI4CsBjf0e5NcDY LVXPhoAhy3uEMvZq717zis/VFE93p1Qre7XBA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=wLvcaytCjjfojAFArIcbsSOwf7B3aRO4sCD81SzPO5GtFz3bIgkvb4YCTlkTaMaIZo /V28+XFlubqgnLrVDdcisXXbr66xzV4P61/M2lDA8UP0mV6gWS4mQnwyxwI+tq+tehp8 y8k968YCMSg7MmcGStXe8tKxsExxUw82e0I0k= MIME-Version: 1.0 Received: by 10.224.214.5 with SMTP id gy5mr3265723qab.386.1306296241256; Tue, 24 May 2011 21:04:01 -0700 (PDT) Sender: saint.ack@gmail.com Received: by 10.224.19.208 with HTTP; Tue, 24 May 2011 21:04:01 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 May 2011 21:04:01 -0700 X-Google-Sender-Auth: oSl5YuHdQlXbbxM_B2ACJrjHMMQ Message-ID: Subject: Re: One map task to two HFiles From: Stack To: user@hbase.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, May 24, 2011 at 2:26 PM, Jon Stewart wrote: > I have enough control over the keys for the primary table that the map > task could write rows to the primary table in order, making it > map-side only (assuming one HFile per task). The map task could then > emit KeyValue objects for the secondary hash table and let > HFileOutpuFormat/KeyValueSortReducer do its thing. > > The question is, how do I write an HFile from a map task? > HFile.Writer? What are the gotchas? > Nothing fancier than open on map task init, append, append, append, inside in the map, and then be sure to close it in the map close. Study HFileOutputFormat I'd say. St.Ack