Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 18861 invoked from network); 15 May 2008 07:00:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 07:00:27 -0000 Received: (qmail 21580 invoked by uid 500); 15 May 2008 07:00:27 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 21537 invoked by uid 500); 15 May 2008 07:00:27 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 21526 invoked by uid 99); 15 May 2008 07:00:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 00:00:27 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 06:59:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ECE7B234C117 for ; Wed, 14 May 2008 23:59:55 -0700 (PDT) Message-ID: <1497437533.1210834795969.JavaMail.jira@brutus> Date: Wed, 14 May 2008 23:59:55 -0700 (PDT) From: "Amareshwari Sriramadasu (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Issue Comment Edited: (HADOOP-3221) Need a "LineBasedTextInputFormat" In-Reply-To: <882436340.1207774208091.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597018#action_12597018 ] amareshwari edited comment on HADOOP-3221 at 5/14/08 11:58 PM: --------------------------------------------------------------------------- Here is patch adding org.apache.hadoop.mapred.lib.NLineInputFormat, which splits N lines of input file as one split. N is specifed using config variable "mapred.line.input.format.linespermap", defaults to 1. In files with a number of lines not evenly divided by N, the last split constructed from that file would have number lines lines less than N. NLineInputFormat constructs FileSplits containing N lines in each split. And Uses LineRecordReader to read the lines from the split. was (Author: amareshwari): Here is patch adding org.apache.hadoop.mapred.lib.NLineInputFormat, which splits N lines of input file as one split. N is specifed using config variable "mapred.line.input.format.linespermap", defaults to 1. In files with a number of lines not evenly divided by N, the last split constructed from that file would have number lines lines less than N. NLineInputFormat constructs FileSplits containing N lines in each map. And Uses LineRecordReader to read the lines from the split. > Need a "LineBasedTextInputFormat" > --------------------------------- > > Key: HADOOP-3221 > URL: https://issues.apache.org/jira/browse/HADOOP-3221 > Project: Hadoop Core > Issue Type: New Feature > Components: mapred > Affects Versions: 0.16.2 > Environment: All > Reporter: Milind Bhandarkar > Assignee: Amareshwari Sriramadasu > Fix For: 0.18.0 > > Attachments: patch-3221-1.txt, patch-3221-2.txt, patch-3221.txt > > > In many "pleasantly" parallel applications, each process/mapper processes the same input file (s), but with computations are controlled by different parameters. > (Referred to as "parameter sweeps"). > One way to achieve this, is to specify a set of parameters (one set per line) as input in a control file (which is the input path to the map-reduce application, where as the input dataset is specified via a config variable in JobConf.). > It would be great to have an InputFormat, that splits the input file such that by default, one line is fed as a value to one map task, and key could be line number. i.e. (k,v) is (LongWritable, Text). > If user specifies the number of maps explicitly, each mapper should get a contiguous chunk of lines (so as to load balance between the mappers.) > The location hints for the splits should not be derived from the input file, but rather, should span the whole mapred cluster. > (Is there a way to do this without having to return an array of nSplits*nTaskTrackers ?) > Increasing the replication of the "real" input dataset (since it will be fetched by all the nodes) is orthogonal, and one can use DistributedCache for that. > (P.S. Please chose a better name for this InputFormat. I am not in love with "LineBasedText" name.) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.