Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D2EDD00D for ; Tue, 30 Oct 2012 04:51:56 +0000 (UTC) Received: (qmail 30612 invoked by uid 500); 30 Oct 2012 04:51:51 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 30491 invoked by uid 500); 30 Oct 2012 04:51:50 -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 30451 invoked by uid 99); 30 Oct 2012 04:51:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 04:51:48 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-ia0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 04:51:42 +0000 Received: by mail-ia0-f176.google.com with SMTP id h11so5145239iae.35 for ; Mon, 29 Oct 2012 21:51:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=VJwXqD9sVwuQbHK4cWyJqO4zjM2gDN2IyNNjvoFrKo0=; b=Lda7nttfTh/vyvNiiBaZwcWZwxGsmmAlEXkruNQAaIOAexcdr+6oNAZBetKyip6uQu aJAG1Ddm+9Do5H95zKGSHtA3tPUtjpIKpct7twJseLb+GEJL0r7qI3Wr9nK5XB7wKGeB z0roMsJ03KT95BM/zC/A2kd69T7V3PXFxQ5Cc8oQ9P4FUdxUxK6Ad9K1vFgE8Ffp2l5I uIgMQ53DMKIe9OFgsalQ3i2Qmsask6ReAwZXXn01rSjVHlh3TWjD223fFSsxIxWNOnwU ZMBP2uq8H/K47ydvyjM9qTjziK9egZ3xUfvOhlU6XPXv/Zn5a80ScDHtFJfvWm8iVL/0 BwkA== Received: by 10.50.190.230 with SMTP id gt6mr363953igc.49.1351572682067; Mon, 29 Oct 2012 21:51:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.27.8 with HTTP; Mon, 29 Oct 2012 21:51:01 -0700 (PDT) In-Reply-To: <53A5F06D3333408BBB3A650928DDD905@gmail.com> References: <53A5F06D3333408BBB3A650928DDD905@gmail.com> From: Harsh J Date: Tue, 30 Oct 2012 10:21:01 +0530 Message-ID: Subject: Re: Access Hadoop Counters To: user@hadoop.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkbwUAkdDQ/GmWOtqlrRYqVJ9XrPTczobKwImS7NbTdvfm4pfGTwJIuBLvfF6u33MoCXI9z X-Virus-Checked: Checked by ClamAV on apache.org Hi, Are you attempting to modify MR sources? JobInProgress is a system class, not to be used by users directly. If you seek MR project-side development help, its better to reach the mapreduce-dev@ lists instead. That said, if you want the file/hdfs bytes counters, you can access them via the RunningJob or Job APIs directly (just give the group and counter names). On Tue, Oct 30, 2012 at 9:19 AM, Nan Zhu wrote: > Hi, all > > I noticed that in FileInputFormat and FileOutputFormat classes, there are > counters(Counter's name?) for input and output data size, > > my question is that given a JobInProgress object, e.g. jip, after I get the > corresponding object by > > FileInputFormat fif = (FileInputFormat) jip.getConf().getInputFormat(); > FileOutputFormat fof = (FileOutputFormat) > jip.getConf().getOutputputFormat(); > > How can I access the values of the counters? > > Best, > > -- > Nan Zhu > School of Computer Science, > McGill University > > -- Harsh J