Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 0E0E31053E for ; Sat, 16 May 2015 15:19:10 +0000 (UTC) Received: (qmail 89012 invoked by uid 500); 16 May 2015 15:19:04 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 88898 invoked by uid 500); 16 May 2015 15:19:04 -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 88888 invoked by uid 99); 16 May 2015 15:19:04 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 May 2015 15:19:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A1AA5C0B1C for ; Sat, 16 May 2015 15:19:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id B5LqMknIP7Fj for ; Sat, 16 May 2015 15:19:02 +0000 (UTC) Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id D9D1020D7C for ; Sat, 16 May 2015 15:19:01 +0000 (UTC) Received: by obfe9 with SMTP id e9so97078334obf.1 for ; Sat, 16 May 2015 08:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WEXQDOsmvRNQUejnsQRq8emwVkt2i8YZJ4XitSWntwc=; b=lrjbbX36wuxUfXh/UYuRz3Ok4Zu5fCuplN9+Ye/NhAiUipFNafvpra6VYBfBJUPC1C 5AMkLJsuweWywgQsM9XtuVcKqE8oMtsxYvJv1hB8tBMcUQk0lyO6gcmgokGO/pSdBsYU R9xdAtUZfjN1iA62o+zQs3tT07+3AGI0AD7m+dhMGZzKAZWl99+O8HkJZ/MsRbUCBgen odNUCC8vfhcUuhQXsAbk+9LDEngqmO4b1hg3oU1Epn5sIiM2rtwuYAPDELZD/2NjTqKY oTZ4E5yAVwXyoanpEXXcbH622XBxRB2LaVa62jPx21E7U2a/sdC6MjyhefYc6G0h5oFq //Pw== MIME-Version: 1.0 X-Received: by 10.60.33.74 with SMTP id p10mr13039325oei.62.1431789534625; Sat, 16 May 2015 08:18:54 -0700 (PDT) Received: by 10.76.34.8 with HTTP; Sat, 16 May 2015 08:18:54 -0700 (PDT) In-Reply-To: References: Date: Sat, 16 May 2015 11:18:54 -0400 Message-ID: Subject: Re: How to set mapreduce.input.fileinputformat.split.maxsize for a specific job From: Shahab Yunus To: "user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=089e0115eef89ac4810516347a24 --089e0115eef89ac4810516347a24 Content-Type: text/plain; charset=UTF-8 You can either pass them on as command line argument using -D option. Assuming your job is implementing the standard Tool interface: https://hadoop.apache.org/docs/current/api/org/apache/hadoop/util/Tool.html Or you can set them in the code using the various 'set' methods to set key/value values in the configuration object. ... Job job = Job.getInstance(getConf()); job.setJarByClass(MyJob.class); job.getConfiguration().set("",); .... Docs for Configuration class: https://hadoop.apache.org/docs/current/api/org/apache/hadoop/conf/Configuration.html This will work as long as the property is not marked final Regards, Shahab On Sat, May 16, 2015 at 10:49 AM, Answer Agrawal wrote: > Hi, > > In xmls configuration file of Hadoop-2.x, > "mapreduce.input.fileinputformat.split.minsize" is given which can be set > but how to set "mapreduce.input.fileinputformat.split.maxsize" in xml file. > I need to set it in my mapreduce code. > > Thanks, > --089e0115eef89ac4810516347a24 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You can either pass them on as command line argument using= -D option. Assuming your job is implementing the standard Tool interface:<= div>https://hadoop.apache.org/docs/current/api/org/apache/hado= op/util/Tool.html

Or you can set them in the cod= e using the various 'set' methods to set key/value values in the co= nfiguration object.

...
Job job =3D= Job.getInstance(getConf());
job.setJarByClass(MyJob.class);

job.getConfiguration().set("<property-name>= ",<value>);
....


This will work as long as the property is not marked final

Regards,
Shahab

=

On Sat, May= 16, 2015 at 10:49 AM, Answer Agrawal <yrsna.tset01@gmail.com>= wrote:
Hi,=C2=A0
<= br>
In xmls configuration f= ile of Hadoop-2.x, "mapreduce.input.fileinputformat.split.minsize"= ; is given which can be set but how to set "mapreduce.input.fileinputf= ormat.split.maxsize" in xml file. I need to set it in my mapreduce cod= e.

Thanks,

--089e0115eef89ac4810516347a24--