Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5B7E19C19 for ; Tue, 19 Apr 2016 19:37:25 +0000 (UTC) Received: (qmail 13779 invoked by uid 500); 19 Apr 2016 19:37:25 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 13724 invoked by uid 500); 19 Apr 2016 19:37:25 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 13697 invoked by uid 500); 19 Apr 2016 19:37:25 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 13693 invoked by uid 99); 19 Apr 2016 19:37:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 19:37:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7C9412C1F5D for ; Tue, 19 Apr 2016 19:37:25 +0000 (UTC) Date: Tue, 19 Apr 2016 19:37:25 +0000 (UTC) From: =?utf-8?Q?Cl=C3=A9ment_MATHIEU_=28JIRA=29?= To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CRUNCH-579) Support Counters from Custom RecordWriters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CRUNCH-579?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1524= 8468#comment-15248468 ]=20 Cl=C3=A9ment MATHIEU commented on CRUNCH-579: ---------------------------------------- I was facing the same issue last week. Downloaded the patch, back-ported it= to crunch-0.11.0-cdh5.4.2 / Hadoop 2. It works fine and we are now using i= t in production. It would be great if this patch could be merged. I don't see why it would n= ot work on master, but can give it a try if really needed. > Support Counters from Custom RecordWriters > ------------------------------------------ > > Key: CRUNCH-579 > URL: https://issues.apache.org/jira/browse/CRUNCH-579 > Project: Crunch > Issue Type: Improvement > Components: Core > Reporter: Micah Whitacre > Assignee: Josh Wills > Attachments: CRUNCH-579.patch > > > A consumer mentioned this on the mailing list: > {quote} > So we wrote a custom Crunch Target to write data to a particular location= which included providing RecordWriters, OutputFormat, OutCommitters and su= ch. Now we wanted to add Counters to get a count of how much data our redu= cers are writing. A most obvious design was to use the TaskAttemptContext t= hat gets passed to the RecordWriter and use the getCounter() method on it t= o 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 R= esource Manager UI. On further investigation I found that, cruch mangles th= is context object to add in a named output via the CrunchOutputs class[1] w= hich basically makes the counters useless within the recordwriter class.=20 > Would it be a feasible enhancement for the CrunchOutputs to pass in the o= riginal 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. > {quote} > http://mail-archives.apache.org/mod_mbox/crunch-user/201511.mbox/%3CCAHnp= etQpcSqFhWFZ9ZJg6DkN02jeC%3DLpvJ0%2BVSP%2BoA%2B8c0DK%2Bw%40mail.gmail.com%3= E -- This message was sent by Atlassian JIRA (v6.3.4#6332)