Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-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 AFA6710714 for ; Sat, 31 Aug 2013 01:02:09 +0000 (UTC) Received: (qmail 27375 invoked by uid 500); 31 Aug 2013 01:02:04 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 27197 invoked by uid 500); 31 Aug 2013 01:02:04 -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 27190 invoked by uid 99); 31 Aug 2013 01:02:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Aug 2013 01:02:04 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chivas314159@gmail.com designates 209.85.192.178 as permitted sender) Received: from [209.85.192.178] (HELO mail-pd0-f178.google.com) (209.85.192.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Aug 2013 01:01:57 +0000 Received: by mail-pd0-f178.google.com with SMTP id w10so2513078pde.9 for ; Fri, 30 Aug 2013 18:01:36 -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=mCzSBx22s80MSi8yVgLHDzID0IBJnkpK4Pg7PhtD/0k=; b=ARpEnuuA/OwAds6RVoSvGhfjOYzQGy3XuEKr4TEduF056GVuP4HDm6dFlY/8Hr3Sc3 06dnZG4mIg8o4sb034qEPHdJ/VSFGh7OFXan+Ts4Gfrrk8rlvy5ntBCMlay084FtKNZO skJ+y2PAd+/hgG28ZQC9ro/u1Y/qBI4M1MVFgnoBoYw/S3jXuntKgwZd8l2ZDFR56TEj PwwYTbuXWqRxnahEMNKx/yIQQrKqLPdxjgkmANtdDlMiSfSc4iMdT1KNJJ+3cfe6ZLn0 d7oNXoj5AjNpP0PsHuMYbdFl+T9h+WgwDeX/MWa4A3TnMLMvnwpTMfRsenflGFOUTAUf ycVA== MIME-Version: 1.0 X-Received: by 10.68.254.42 with SMTP id af10mr12877618pbd.154.1377910896873; Fri, 30 Aug 2013 18:01:36 -0700 (PDT) Received: by 10.68.78.134 with HTTP; Fri, 30 Aug 2013 18:01:36 -0700 (PDT) Date: Sat, 31 Aug 2013 02:01:36 +0100 Message-ID: Subject: Job config before read fields From: Adrian CAPDEFIER To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7b2e0d838a576c04e533e160 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2e0d838a576c04e533e160 Content-Type: text/plain; charset=ISO-8859-1 Howdy, I apologise for the lack of code in this message, but the code is fairly convoluted and it would obscure my problem. That being said, I can put together some sample code if really needed. I am trying to pass some metadata between the map & reduce steps. This metadata is read and generated in the map step and stored in the job config. It also needs to be recreated on the reduce node before the key/ value fields can be read in the readFields function. I had assumed that I would be able to override the Reducer.setup() function and that would be it, but apparently the readFields function is called before the Reducer.setup() function. My question is what is any (the best) place on the reduce node where I can access the job configuration/ context before the readFields function is called? This is the stack trace: at org.apache.hadoop.io.WritableComparator.compare(WritableComparator.java:103) at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.compare(MapTask.java:1111) at org.apache.hadoop.util.QuickSort.sortInternal(QuickSort.java:70) at org.apache.hadoop.util.QuickSort.sort(QuickSort.java:59) at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1399) at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1298) at org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:699) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:766) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370) at org.apache.hadoop.mapred.Child$4.run(Child.java:255) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1149) at org.apache.hadoop.mapred.Child.main(Child.java:249) --047d7b2e0d838a576c04e533e160 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Howdy,

I apologise for th= e lack of code in this message, but the code is fairly convoluted and it wo= uld obscure my problem. That being said, I can put together some sample cod= e if really needed.

I am trying to pass some metadata between the map &= ; reduce steps. This metadata is read and generated in the map step and sto= red in the job config. It also needs to be recreated on the reduce node bef= ore the key/ value fields can be read in the readFields function.

I had assumed that I would be able to override the Reducer.setup() func= tion and that would be it, but apparently the readFields function is called= before the Reducer.setup() function.

My question is what is a= ny (the best) place on the reduce node where I can access the job configura= tion/ context before the readFields function is called?

This is the stack trace:

=A0=A0=A0=A0=A0=A0=A0 at org.apac= he.hadoop.io.WritableComparator.compare(WritableComparator.java:103)
=A0= =A0=A0=A0=A0=A0=A0 at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.comp= are(MapTask.java:1111)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.util.QuickSort.sortInternal(Quic= kSort.java:70)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.util.QuickSort= .sort(QuickSort.java:59)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.mapr= ed.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1399)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.f= lush(MapTask.java:1298)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.mapre= d.MapTask$NewOutputCollector.close(MapTask.java:699)
=A0=A0=A0=A0=A0=A0= =A0 at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:766)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.mapred.MapTask.run(MapTask.java:= 370)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.mapred.Child$4.run(Child= .java:255)
=A0=A0=A0=A0=A0=A0=A0 at java.security.AccessController.doPri= vileged(Native Method)
=A0=A0=A0=A0=A0=A0=A0 at javax.security.auth.Subj= ect.doAs(Subject.java:415)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.hadoop.security.UserGroupInformation.do= As(UserGroupInformation.java:1149)
=A0=A0=A0=A0=A0=A0=A0 at org.apache.h= adoop.mapred.Child.main(Child.java:249)

--047d7b2e0d838a576c04e533e160--