From user-return-891-apmail-hama-user-archive=hama.apache.org@hama.apache.org Tue May 21 14:27:45 2013 Return-Path: X-Original-To: apmail-hama-user-archive@www.apache.org Delivered-To: apmail-hama-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 708D39B84 for ; Tue, 21 May 2013 14:27:45 +0000 (UTC) Received: (qmail 7160 invoked by uid 500); 21 May 2013 14:27:45 -0000 Delivered-To: apmail-hama-user-archive@hama.apache.org Received: (qmail 6947 invoked by uid 500); 21 May 2013 14:27:43 -0000 Mailing-List: contact user-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hama.apache.org Delivered-To: mailing list user@hama.apache.org Received: (qmail 6896 invoked by uid 99); 21 May 2013 14:27:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 14:27:42 +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 (nike.apache.org: domain of clin4j@googlemail.com designates 209.85.160.46 as permitted sender) Received: from [209.85.160.46] (HELO mail-pb0-f46.google.com) (209.85.160.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 14:27:36 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so671373pbb.5 for ; Tue, 21 May 2013 07:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=vBU/+rT6019oJx3lqL6quOGQJI8MrPrgSuBpXDJxT6k=; b=f5Ynt9PzW/eKoMad2UOALI9415gQ+f5ii206gBwI3PzFQAPY3odaQrAL0xT/dQODht cebha0fTC5sBERUawzeWhk24bQZvUz58OzzFxlNxzbQIYFFr3c6wjfxQZQeA4wNXgAMB HFuYn7IX4bUe/v0f3vd8CRUSrBEVNAwl88Y6DvStA7F9EKEie18qmeTfYSGJJ1WapL4L 07sO2LnGW2t25b5wJiYjWxksd9+O0HUFQHkeQKb0aUiEdjqfN4foFbMbKrliHCaDFbe8 oh+o1+kv9Q6OOjShegLAKUx0OxN0CAV+wcoWEh1BXuMoMkRpMeZa+MtkNZ897Ga6eO5d F3YA== MIME-Version: 1.0 X-Received: by 10.66.255.41 with SMTP id an9mr3521151pad.44.1369146435383; Tue, 21 May 2013 07:27:15 -0700 (PDT) Received: by 10.70.41.139 with HTTP; Tue, 21 May 2013 07:27:15 -0700 (PDT) In-Reply-To: References: Date: Tue, 21 May 2013 22:27:15 +0800 Message-ID: Subject: Re: BSP Task Input/InputSplit Filename From: Chia-Hung Lin To: user@hama.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org My understanding is that you can configure path during constructing a job. HamaConfiguration conf = new HamaConfiguration(); conf.set("my.path","/path/to/file") BSPJob bsp = new BSPJob(conf, MyBSP.class); And wihtin customized BSP class e.g. MyBSP calls BSPPeer.getConfiguration(); to retrieve the file name. Or FileInputFormat makes use of Configuration set input path with the key "bsp.input.dir". Path should be able to obtain using conf.get("bsp.input.dir") when performing computation. On 21 May 2013 18:04, Steven van Beelen wrote: > Hi all, > > The title says it: is there a way to retrieve the filename of the > input/inputsplit a BSP Task is working on? I've been looking for some time > in the docs and source files, but cannot seem to find if one is able to > retrieve the filename/pathname from the input used. > > Cheers