Text writer = new Text(); FSDataOutputStream fsData = fileSys.create(file, true); writer.writeString(fsData, "String");
The above works. Thanks, Gaurav On Mon, Jun 9, 2008 at 9:52 AM, Gaurav Veda <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to Hadoop / HDFS, and am having trouble getting started. I am > trying to create a few files before launching a Map job (I want to read > these files inside each Map job). I want the files to be in text format. I > tried to modify the example program PiEstimator to achieve this. However, I > could not find the 'Text' equivalent of SequenceFile.createWriter. The > following doesn't work: > > Path file = new Path(inDir, "currentVector.txt"); > TextOutputFormat.LineRecordWriter writer = new > TextOutputFormat.LineRecordWriter(new FileOutputStream(file.toString())); > > Any pointers? > > Thanks, > Gaurav > -- > Share what you know, learn what you don't ! -- Share what you know, learn what you don't !
