Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-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 DCA9E10224 for ; Tue, 14 Jan 2014 10:48:05 +0000 (UTC) Received: (qmail 80131 invoked by uid 500); 14 Jan 2014 09:40:01 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 79786 invoked by uid 500); 14 Jan 2014 09:39:16 -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 79577 invoked by uid 99); 14 Jan 2014 09:38:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jan 2014 09:38:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of unmeshabiju@gmail.com designates 209.85.212.50 as permitted sender) Received: from [209.85.212.50] (HELO mail-vb0-f50.google.com) (209.85.212.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jan 2014 09:38:24 +0000 Received: by mail-vb0-f50.google.com with SMTP id w18so5469082vbj.37 for ; Tue, 14 Jan 2014 01:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=GQ0vPIfHwKnFivdmCUH8oVE9j21uiEk1T1AnN9FmvIU=; b=y5+aHJATolEkq/0IksZV2JHc/WhI4AcGTdKgIlcDG27jBAOU8xrttf7r1i2zIZucYy +X6KSNuT9IoAHdb6du+jWDi6LllbFSNKLos998HfiQcOmgcpyPnSqlLGS4VXpikWFElZ xXMzcnKV7Cimt9TuH/Knj6FVtwgDzdVvIOxbdMVzO7VWSdS5dvGKWF7HrzdZZTheb74a TXKHNF4wdpL8ZMT8yxG/FLCaI3c5zmpCu4d1ZtJoUrR9XTsyFVfsLniMo0EIigs3pvG2 dfUGfvSvUydeLm1fEkAhgbaFSNjS+zooflAOQ4G6yS3ni3PzLBcUE+YwCs5h1xtcb9j7 CUIA== X-Received: by 10.52.117.176 with SMTP id kf16mr17120460vdb.6.1389692283586; Tue, 14 Jan 2014 01:38:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.59.8.2 with HTTP; Tue, 14 Jan 2014 01:37:23 -0800 (PST) In-Reply-To: References: From: unmesha sreeveni Date: Tue, 14 Jan 2014 15:07:23 +0530 Message-ID: Subject: Re: Adding file to HDFs To: User Hadoop Content-Type: multipart/alternative; boundary=bcaec5469147e90c9504efeaf23c X-Virus-Checked: Checked by ClamAV on apache.org --bcaec5469147e90c9504efeaf23c Content-Type: text/plain; charset=ISO-8859-1 Thank you sudhakar On Tue, Jan 14, 2014 at 2:51 PM, sudhakara st wrote: > > Read file from local file system and write to file in HDFS using > *FSDataOutputStream* > > FSDataOutputStream outStream = fs.create(new > Path("demo.csv");); > outStream.writeUTF(stream); > outStream.close(); > > > On Tue, Jan 14, 2014 at 2:04 PM, unmesha sreeveni wrote: > >> How to add a *csv* file to hdfs using Mapreduce Code >> Using hadoop fs -copyFromLocal /local/path /hdfs/location i am able to do >> . >> BUt i would like to write mapreduce code. >> >> -- >> *Thanks & Regards* >> >> Unmesha Sreeveni U.B >> Junior Developer >> >> http://www.unmeshasreeveni.blogspot.in/ >> >> >> > > > -- > > Regards, > ...Sudhakara.st > > -- *Thanks & Regards* Unmesha Sreeveni U.B Junior Developer http://www.unmeshasreeveni.blogspot.in/ --bcaec5469147e90c9504efeaf23c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you sudhakar

On Tue, Jan 14, 2014 at 2:51 PM, sudhakara st = <sudhakara.st@gmail.com> wrote:

Read file fr= om local file system and write to file in HDFS using FSDataOutputStream<= /b>

=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 FSDataOutputStream outStream =3D fs.create(new Path("d= emo.csv"););
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 outStream.writeUTF(stream);
=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 outStream.close();



On Tue, Jan 14, 2014 at 2:04 PM, unmesha sreeveni <unmeshabiju@gmail.= com> wrote:
How to add a csv file to = hdfs using Mapreduce Code
Using= hadoop fs -copyFromLocal /local/path /hdfs/location i am able to do .
BUt i= would like to write mapreduce code.

--
Thanks = & Regards

Unmesha Sreeveni U.B
Junior Developer

http:= //www.unmeshasreeveni.blogspot.in/





--
=A0 =A0 =A0=A0
Regards,
...Sudhakara.st
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0



--
Thanks & Regards

Unmesha Sreeveni U.B
Junior Developer

http:= //www.unmeshasreeveni.blogspot.in/


--bcaec5469147e90c9504efeaf23c--