Return-Path: X-Original-To: apmail-crunch-user-archive@www.apache.org Delivered-To: apmail-crunch-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 E2AF3185A2 for ; Mon, 23 Nov 2015 00:09:18 +0000 (UTC) Received: (qmail 70785 invoked by uid 500); 23 Nov 2015 00:09:14 -0000 Delivered-To: apmail-crunch-user-archive@crunch.apache.org Received: (qmail 70744 invoked by uid 500); 23 Nov 2015 00:09:14 -0000 Mailing-List: contact user-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@crunch.apache.org Delivered-To: mailing list user@crunch.apache.org Received: (qmail 70734 invoked by uid 99); 23 Nov 2015 00:09:14 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2015 00:09:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9D4F9C6627 for ; Mon, 23 Nov 2015 00:09:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.899 X-Spam-Level: *** X-Spam-Status: No, score=3.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vIbBcjuc9O-R for ; Mon, 23 Nov 2015 00:09:12 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 0E5DE2064F for ; Mon, 23 Nov 2015 00:09:12 +0000 (UTC) Received: by oies6 with SMTP id s6so106980430oie.1 for ; Sun, 22 Nov 2015 16:09:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fVXbxsS2SBW0ffBrUprxbxf7faP1CmyhkcYyV/yyLNI=; b=kLknxBRHSPu7hn/fMfCZTx8x23kZe+CyWDrc2S+XvMcJNbOn2HWuHT6Ncrg6riYoAC OEJA1XOiHUCsfUjx3GMuCgyVddzEEEV5HAh3fnw/HRYNzuJ+bLlXuD6z6HtjBQr0L0iU 0nrMEW7nvbANbSOo8RDS0drJZIiCRzl9wHTH/YyyDdgnvlH2MyyKcsA3SfrXQTEqHCK2 7kP75s03LstXRt+lHTQ0NrXhzxriizsQnHZekvq3K+NwgJduvkUh668ZQvTsQIqYd+JX NV/mXwKIvNr+S2HRMGw1yb1DAcL3taAt/U78Dd7pI8XeEgUIAskOy7GhdMHftD2z6M0B J6CA== MIME-Version: 1.0 X-Received: by 10.202.50.214 with SMTP id y205mr12954745oiy.16.1448237345196; Sun, 22 Nov 2015 16:09:05 -0800 (PST) Received: by 10.202.107.130 with HTTP; Sun, 22 Nov 2015 16:09:04 -0800 (PST) In-Reply-To: References: Date: Sun, 22 Nov 2015 18:09:04 -0600 Message-ID: Subject: Re: Custom Crunch Target and Counters From: Micah Whitacre To: user@crunch.apache.org Content-Type: multipart/alternative; boundary=001a113cfee682d0b205252a081d --001a113cfee682d0b205252a081d Content-Type: text/plain; charset=UTF-8 Logged this request here to track progress... https://issues.apache.org/jira/browse/CRUNCH-579 On Fri, Nov 20, 2015 at 12:44 PM, Josh Wills wrote: > Yeah, that does seem sort of crappy. Let me see what I can do. > > On Thu, Nov 19, 2015 at 10:39 PM, kulkarni.swarnim@gmail.com < > kulkarni.swarnim@gmail.com> wrote: > >> Hello, >> >> So we wrote a custom Crunch Target to write data to a particular location >> which included providing RecordWriters, OutputFormat, OutCommitters and >> such. Now we wanted to add Counters to get a count of how much data our >> reducers are writing. A most obvious design was to use the >> TaskAttemptContext that gets passed to the RecordWriter and use the >> getCounter() method on it to manipulate the counters. However, that did not >> work as expected and even though the counters were getting incremented, >> they did not show up on the Resource Manager UI. On further investigation I >> found that, cruch mangles this context object to add in a named output via >> the CrunchOutputs class[1] which basically makes the counters useless >> within the recordwriter class. >> >> Would it be a feasible enhancement for the CrunchOutputs to pass in the >> original base context object along with the modified one with named outputs >> so that it can be used for counters? Any other suggestions are most welcome >> as well. >> >> Thanks, >> Swarnim >> >> [1] >> https://github.com/cloudera/crunch/blob/cdh5.4.8-release/crunch-core/src/main/java/org/apache/crunch/io/CrunchOutputs.java#L210-L232 >> > > --001a113cfee682d0b205252a081d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logged this request here to track progress...
<= br>
On Fri, Nov 20, 2015 at 12:44 PM, Josh Wills = <josh.wills@gmail.com> wrote:
Yeah, that does seem sort of crappy. Let me see wha= t I can do.

On Thu, Nov 19, 2015 at 10:39 PM, <= a href=3D"mailto:kulkarni.swarnim@gmail.com" target=3D"_blank">kulkarni.swa= rnim@gmail.com <kulkarni.swarnim@gmail.com> wro= te:
Hello,

So we wrote a custom Crunch Target to write data to a particular loca= tion which included providing RecordWriters, OutputFormat, OutCommitters an= d such. Now we =C2=A0wanted to add Counters to get a count of how much data= our reducers are writing. A most obvious design was to use the TaskAttempt= Context that gets passed to the RecordWriter and use the getCounter() metho= d on it to manipulate the counters. However, that did not work as expected = and even though the counters were getting incremented, they did not show up= on the Resource Manager UI. On further investigation I found that, cruch m= angles this context object to add in a named output via the CrunchOutputs c= lass[1] which basically makes the counters useless within the recordwriter = class.=C2=A0

Would it be a feasible enhancement fo= r the CrunchOutputs to pass in the original base context object along with = the modified one with named outputs so that it can be used for counters? An= y other suggestions are most welcome as well.

Than= ks,
Swarnim



--001a113cfee682d0b205252a081d--