Return-Path: Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: (qmail 44457 invoked from network); 23 Dec 2009 14:56:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Dec 2009 14:56:26 -0000 Received: (qmail 28433 invoked by uid 500); 23 Dec 2009 14:56:23 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 28363 invoked by uid 500); 23 Dec 2009 14:56:23 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 28353 invoked by uid 99); 23 Dec 2009 14:56:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2009 14:56:23 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jason.hadoop@gmail.com designates 209.85.160.50 as permitted sender) Received: from [209.85.160.50] (HELO mail-pw0-f50.google.com) (209.85.160.50) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Dec 2009 14:56:13 +0000 Received: by pwi20 with SMTP id 20so4838473pwi.29 for ; Wed, 23 Dec 2009 06:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=dWrZRQ1b7xX/1bAkZEgAIAbSMbXp1oxY0o9S/nAVOqI=; b=xy+7FJxiZmfS+yMrneVSLMmcVUH8woQRN0sQ8m7qYTBPNcYECKrnKfIdMcfGsPZ5iF JAXLUeuBOWcyUjgIAZ+sNlh0bwBknicQdBplI5hsBl20/Djs9DFCjcsjy0NvD8YNRhxh luD59EmnQQZV7BfDkI2maBkTCNvLwxP0wGQf4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=DXx70hBN9fMZMZdgYadHWW+Vf6aCVMtna0WfvmtWogGkNdJ/F1FNj4/S1jZqrsT21J g1y3suxuHXKMYUaYt/vwlMmdQrt+L1lXSbHOZOrG+Cj/laVJ1QzJvUIMXdzC4Wyxf52H UqSmcHvCxpMkqRF9gIWglUkVg1bwhQgfBxJxg= MIME-Version: 1.0 Received: by 10.140.57.14 with SMTP id f14mr7237323rva.154.1261580153317; Wed, 23 Dec 2009 06:55:53 -0800 (PST) In-Reply-To: <651686.3536.qm@web19001.mail.hk2.yahoo.com> References: <651686.3536.qm@web19001.mail.hk2.yahoo.com> Date: Wed, 23 Dec 2009 06:55:53 -0800 Message-ID: <314098690912230655j4d26433aj6a3f23cbcb8a9e19@mail.gmail.com> Subject: Re: sharing variables across chained jobs From: Jason Venner To: common-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001636920849e4e9fa047b668419 --001636920849e4e9fa047b668419 Content-Type: text/plain; charset=ISO-8859-1 If your jobs are launched by separate jvm instances, the only real persistence framework you have is hdfs. You have to basic choices: 1. Write a summary data to a persistent store, an hdfs file being a simple case, that your next job reads 2. Write the data you need as a job counter, via the Reporter object, and have the next job read the counters from the previous job via the JobClient.getJob(jobid) interface. Case 2 requires that the counters still exist, they are usually discarded with in 24 hours, and that you can determine the jobid of the job you need to interrogate. On Tue, Dec 22, 2009 at 11:51 PM, Himanshu wrote: > Hi everyone, > I run multiple map/reduce jobs which are > chained together. The output of one map/reduce is the input of another. > There are also some integer valued variables which are outputted from > one map/reduce job and used as input in the consequent one. These > variables are got by summing up integer valued data having a certain > key in the reduce step. > > My question was - what would be the > best way to share these several integer valued variables across > multiply map/reduce iterations? I don't want to write each of them to a > separate file in the reduce step and consequently read those files in > the next iteration of map/reduce. > > Looking forward to all the suggestions > > H > > Send instant messages to your online friends http://uk.messenger.yahoo.com > -- Pro Hadoop, a book to guide you from beginner to hadoop mastery, http://www.amazon.com/dp/1430219424?tag=jewlerymall www.prohadoopbook.com a community for Hadoop Professionals --001636920849e4e9fa047b668419--