Return-Path: Delivered-To: apmail-hadoop-general-archive@minotaur.apache.org Received: (qmail 25458 invoked from network); 27 Jun 2010 18:18:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Jun 2010 18:18:22 -0000 Received: (qmail 71556 invoked by uid 500); 27 Jun 2010 18:18:22 -0000 Delivered-To: apmail-hadoop-general-archive@hadoop.apache.org Received: (qmail 71330 invoked by uid 500); 27 Jun 2010 18:18:21 -0000 Mailing-List: contact general-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@hadoop.apache.org Delivered-To: mailing list general@hadoop.apache.org Received: (qmail 71322 invoked by uid 99); 27 Jun 2010 18:18:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jun 2010 18:18:21 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.212.48 as permitted sender) Received: from [209.85.212.48] (HELO mail-vw0-f48.google.com) (209.85.212.48) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jun 2010 18:18:13 +0000 Received: by vws15 with SMTP id 15so5347142vws.35 for ; Sun, 27 Jun 2010 11:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=VGBgwuJ5DiTDTNPOCIW1qi0xhSlWqdsYsGnyj5e6v5o=; b=R4xBKrDtzy5I0UnbxZyJbKzaNh997feJXP0bZSe3Heb717wYK6fja2oyVWsFeM0FsB LKODubOWkt8dX3qUeBF6FMY+VIVwihZrXOF1IGwUPp3K4EnPJ2Ioz7hwdnvPYuKHgKFg 5vouPgatmu7YgNYtZ/oxoB+CdbskM3D/8cOlU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=C5bSM8YuJ9BNoiIjhK8kLzyBz9YmJKD7w31Ja9xH/0soX17M/uPm/CrY8lZr98mnGX zEREOOjvg04ZsU/Slb34fEB80GPxJfxNmORY9TABMB5o2yA09VAn++WkdMFtpZ/tqm/S gg9WXKKQtlz1ABruDgf91YcGpKgk+Qp87N6+U= MIME-Version: 1.0 Received: by 10.229.249.138 with SMTP id mk10mr1985810qcb.229.1277662672427; Sun, 27 Jun 2010 11:17:52 -0700 (PDT) Received: by 10.229.212.209 with HTTP; Sun, 27 Jun 2010 11:17:52 -0700 (PDT) In-Reply-To: References: Date: Sun, 27 Jun 2010 11:17:52 -0700 Message-ID: Subject: Re: how to get the current input file in a Mapper From: Ted Yu To: general@hadoop.apache.org Content-Type: multipart/alternative; boundary=0016364d3017bb9abb048a07058b X-Virus-Checked: Checked by ClamAV on apache.org --0016364d3017bb9abb048a07058b Content-Type: text/plain; charset=ISO-8859-1 How about: FileSplit fileSplit = (FileSplit) context.getInputSplit(); String sFileName = fileSplit.getPath().getName(); On Sun, Jun 27, 2010 at 7:59 AM, zhangguoping zhangguoping < zhangguoping96@gmail.com> wrote: > Hi, > > how to get the current input file in a Mapper in 0.20.2 ? > > Thanks, > --0016364d3017bb9abb048a07058b--