hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: Read key and values from HDFS
Date Fri, 30 Mar 2012 19:56:24 GMT
Hi,

Just use "hadoop fs -text <file>". It would read most of these files
without breaking a sweat :)

You can look at its implementation inside FsShell.java if you want to
implement/reuse things in Java.

On Fri, Mar 30, 2012 at 11:01 PM, kasi subrahmanyam
<kasisubbu440@gmail.com> wrote:
> Hi Pedro i am not sure we have a single method for reading the data in
> output files for different otutput formats.
> But for sequence files we can use SequenceFile.Reader class in the API to
> read the sequence files.
>
>
> On Fri, Mar 30, 2012 at 10:49 PM, Pedro Costa <psdc1978@gmail.com> wrote:
>>
>>
>> The ReduceTask can save the file using several output format:
>> InternalFileOutputFormant, SequenceFileOutputFormat, TeraOuputFormat, etc...
>>
>> How can I read the keys and the values from the output file? Can anyone
>> give me an example? Is there a way to create just one method that can read
>> all different outputformat?
>>
>>
>> Thanks,
>>
>> --
>> Best regards,
>>
>



-- 
Harsh J

Mime
View raw message