Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3912AD74E for ; Sat, 13 Oct 2012 17:54:11 +0000 (UTC) Received: (qmail 34250 invoked by uid 500); 13 Oct 2012 17:54:06 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 34163 invoked by uid 500); 13 Oct 2012 17:54:06 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 34155 invoked by uid 99); 13 Oct 2012 17:54:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2012 17:54:06 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michael_segel@hotmail.com designates 65.55.111.107 as permitted sender) Received: from [65.55.111.107] (HELO blu0-omc2-s32.blu0.hotmail.com) (65.55.111.107) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2012 17:53:57 +0000 Received: from BLU0-SMTP160 ([65.55.111.73]) by blu0-omc2-s32.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 13 Oct 2012 10:53:36 -0700 X-Originating-IP: [173.15.87.37] X-EIP: [BjqU4N7wh8wGPT3v/SXIH2CTYaS/QkpZ] X-Originating-Email: [michael_segel@hotmail.com] Message-ID: Received: from [192.168.0.104] ([173.15.87.37]) by BLU0-SMTP160.blu0.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 13 Oct 2012 10:53:34 -0700 From: Michael Segel Content-Type: multipart/alternative; boundary="Apple-Mail=_2B059174-793E-48BE-8D00-FED668C1316F" MIME-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Subject: Re: Distributed Cache For 100MB+ Data Structure Date: Sat, 13 Oct 2012 12:53:32 -0500 References: <5076FE16.5040001@cs.duke.edu> <50797ED6.2040209@cs.duke.edu> To: user@hadoop.apache.org In-Reply-To: <50797ED6.2040209@cs.duke.edu> X-Mailer: Apple Mail (2.1498) X-OriginalArrivalTime: 13 Oct 2012 17:53:34.0667 (UTC) FILETIME=[AA4229B0:01CDA96B] X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_2B059174-793E-48BE-8D00-FED668C1316F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Build and store the tree in some sort of globally accessible space?=20 Like HBase, or HDFS? On Oct 13, 2012, at 9:46 AM, Kyle Moses wrote: > Chris, > Thanks for the suggestion on serializing the radix tree and your = thoughts on the memory issue. I'm planning to test a few different = solutions and will post another reply if the results prove interesting. >=20 > Kyle >=20 > On 10/11/2012 1:52 PM, Chris Nauroth wrote: >> Hello Kyle, >>=20 >> Regarding the setup time of the radix tree, is it possible to = precompute the radix tree before job submission time, then create a = serialized representation (perhaps just Java object serialization), and = send the serialized form through distributed cache? Then, each reducer = would just need to deserialize during setup() instead of recomputing the = full radix tree for every reducer task. That might save time. >>=20 >> Regarding the memory consumption, when I've run into a situation like = this, I've generally solved it by caching the data in a separate process = and using some kind of IPC from the reducers to access it. memcache is = one example, though that's probably not an ideal fit for this data = structure. I'm aware of no equivalent solution directly in Hadoop and = would be curious to hear from others on the topic. >>=20 >> Thanks, >> --Chris >>=20 >> On Thu, Oct 11, 2012 at 10:12 AM, Kyle Moses = wrote: >> Problem Background: >> I have a Hadoop MapReduce program that uses a IPv6 radix tree to = provide auxiliary input during the reduce phase of the second job in = it's workflow, but doesn't need the data at any other point. >> It seems pretty straight forward to use the distributed cache to = build this data structure inside each reducer in the setup() method. >> This solution is functional, but ends up using a large amount of = memory if I have 3 or more reducers running on the same node and the = setup time of the radix tree is non-trivial. >> Additionally, the IPv6 version of the structure is quite a bit larger = in memory. >>=20 >> Question: >> Is there a "good" way to share this data structure across all = reducers on the same node within the Hadoop framework? >>=20 >> Initial Thoughts: >> It seems like this might be possible by altering the Task JVM Reuse = parameters, but from what I have read this would also affect map tasks = and I'm concerned about drawbacks/side-effects. >>=20 >> Thanks for your help! >>=20 >=20 --Apple-Mail=_2B059174-793E-48BE-8D00-FED668C1316F Content-Transfer-Encoding: 7bit Content-Type: text/html; charset="iso-8859-1" Build and store the tree in some sort of globally accessible space? 

Like HBase, or HDFS?

On Oct 13, 2012, at 9:46 AM, Kyle Moses <kmoses@cs.duke.edu> wrote:

Chris,
Thanks for the suggestion on serializing the radix tree and your thoughts on the memory issue.  I'm planning to test a few different solutions and will post another reply if the results prove interesting.

Kyle

On 10/11/2012 1:52 PM, Chris Nauroth wrote:
Hello Kyle,

Regarding the setup time of the radix tree, is it possible to precompute the radix tree before job submission time, then create a serialized representation (perhaps just Java object serialization), and send the serialized form through distributed cache?  Then, each reducer would just need to deserialize during setup() instead of recomputing the full radix tree for every reducer task.  That might save time.

Regarding the memory consumption, when I've run into a situation like this, I've generally solved it by caching the data in a separate process and using some kind of IPC from the reducers to access it.  memcache is one example, though that's probably not an ideal fit for this data structure.  I'm aware of no equivalent solution directly in Hadoop and would be curious to hear from others on the topic.

Thanks,
--Chris

On Thu, Oct 11, 2012 at 10:12 AM, Kyle Moses <kmoses@cs.duke.edu> wrote:
Problem Background:
I have a Hadoop MapReduce program that uses a IPv6 radix tree to provide auxiliary input during the reduce phase of the second job in it's workflow, but doesn't need the data at any other point.
It seems pretty straight forward to use the distributed cache to build this data structure inside each reducer in the setup() method.
This solution is functional, but ends up using a large amount of memory if I have 3 or more reducers running on the same node and the setup time of the radix tree is non-trivial.
Additionally, the IPv6 version of the structure is quite a bit larger in memory.

Question:
Is there a "good" way to share this data structure across all reducers on the same node within the Hadoop framework?

Initial Thoughts:
It seems like this might be possible by altering the Task JVM Reuse parameters, but from what I have read this would also affect map tasks and I'm concerned about drawbacks/side-effects.

Thanks for your help!



--Apple-Mail=_2B059174-793E-48BE-8D00-FED668C1316F--