Return-Path: Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: (qmail 32187 invoked from network); 12 May 2010 22:07:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 May 2010 22:07:37 -0000 Received: (qmail 43935 invoked by uid 500); 12 May 2010 22:07:37 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 43879 invoked by uid 500); 12 May 2010 22:07:37 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 43871 invoked by uid 99); 12 May 2010 22:07:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 22:07:37 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [81.169.146.162] (HELO mo-p00-ob.rzone.de) (81.169.146.162) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 May 2010 22:07:29 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1273702028; l=3901; s=domk; d=squareplanet.de; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=MxYRSU2Vk4ZCrmTFDHvtUY0shVg=; b=IRA6R1LfFzpd8bL76vKXQDTaDZNfM8WjR8wJtbc5WxWJVEi/pfyJBLK0s3719V1tqlL JNM25kf1IFJ086P4jsdzfC7HzvBpCmwU7zCu0dbV2cNRs6l4RcGffNPyXQRKUiwG7TJVa EcUDsHZ4Kc8bQ0TyAbTnKFDKumV2MUyZrrc= X-RZG-AUTH: :P2MJcEKnf+ao57yibrdPXWuwCloRPnhJTPbGbO+coQcHwyiAcR1vyK/y2bpEC/BrfT7BiQ== X-RZG-CLASS-ID: mo00 Received: from [192.168.100.101] (95-91-99-157-dynip.superkabel.de [95.91.99.157]) by post.strato.de (jimi mo56) (RZmta 23.2) with ESMTP id 5073fdm4CLK1IK for ; Thu, 13 May 2010 00:07:08 +0200 (MEST) Message-ID: <4BEB25EF.8030502@squareplanet.de> Date: Thu, 13 May 2010 00:04:31 +0200 From: Alan Miller User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4 MIME-Version: 1.0 To: mapreduce-user@hadoop.apache.org Subject: Re: tab-delimited output References: <4BEB188A.6050202@squareplanet.de> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070703010901050508040607" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------070703010901050508040607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Alex, The tab isn't the issue (yet). I guess it's really 2 questions I have. Using the reducer inputs already mentioned. 1. How do I generate multiple output files named YYYY-MM-DD.txt 2. Each file should contain a. one line per host b. each line with host avg1 avg2 avg3 .... Alan On 05/12/2010 11:50 PM, Alex Kozlov wrote: > Hi Alan, > > Is the problem that you want your 'value' vals to be tab separated? > This is entirely under control of your reducer. > > Alex K > > On Wed, May 12, 2010 at 2:07 PM, Alan Miller > wrote: > > Hi all, > > How can I write tab-delimited output files from my reducer? > > My reducer gets Text/Text key/vals like: > > hostX_2010-05-01 varA=valA1,varB=valB1,varC=valC1 > hostX_2010-05-01 varA=valA2,varB=valB2,varC=valC2 > hostX_2010-05-01 varA=valA3,varB=valB3,varC=valC3 > ... > hostY_2010-05-01 varA=valA1,varB=valB1,varC=valC1 > hostY_2010-05-01 varA=valA2,varB=valB2,varC=valC2 > hostY_2010-05-01 varA=valA3,varB=valB3,varC=valC3 > ... > > After my reducer calcs the daily averages of varA,B,C > I want to write a tab-delimited file with lines like: > > hostX varA-Avg varB-Avg varC-Avg .... > hostY varA-Avg varB-Avg varC-Avg .... > > > Thanks, > Alan > > --------------070703010901050508040607 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Alex,

The tab isn't the issue (yet). I guess it's really 2 questions I have.
Using the reducer inputs already mentioned.

1. How do I generate multiple output files named YYYY-MM-DD.txt
2. Each file should contain
     a. one line per host
     b. each line with host avg1 avg2 avg3 ....

Alan

On 05/12/2010 11:50 PM, Alex Kozlov wrote:
Hi Alan,

Is the problem that you want your 'value' vals to be tab separated?   This is entirely under control of your reducer.

Alex K

On Wed, May 12, 2010 at 2:07 PM, Alan Miller <somebody@squareplanet.de> wrote:
Hi all,

How can I write tab-delimited output files from my reducer?

My reducer gets Text/Text key/vals like:

hostX_2010-05-01 varA=valA1,varB=valB1,varC=valC1
hostX_2010-05-01 varA=valA2,varB=valB2,varC=valC2
hostX_2010-05-01 varA=valA3,varB=valB3,varC=valC3
...
hostY_2010-05-01 varA=valA1,varB=valB1,varC=valC1
hostY_2010-05-01 varA=valA2,varB=valB2,varC=valC2
hostY_2010-05-01 varA=valA3,varB=valB3,varC=valC3
...

After my reducer calcs the daily averages of varA,B,C
I  want to write a tab-delimited file with lines like:

hostX    varA-Avg    varB-Avg    varC-Avg    ....
hostY    varA-Avg    varB-Avg    varC-Avg    ....


Thanks,
Alan


--------------070703010901050508040607--