hadoop-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goutham patnaik <goutham.patn...@gmail.com>
Subject Re: TWO QUESTIONS ABOUT LOGS & DEBUGGING IN HADOOP
Date Tue, 03 Nov 2009 03:20:50 GMT
Alberto,

Are you looking to write some java code that prints the contents of a file
in HDFS ? If so, take a look at IOUtils.copyBytes (IOUtils is in the package
hadoop.io.IOUtils) As an output stream, you could just use System.out

heres documentation on IOUtils:

http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/io/IOUtils.html


hope that helps

Goutham

You can print the content of a file

On Sun, Nov 1, 2009 at 8:55 AM, Alberto Luengo Cabanillas <cabiwan@gmail.com
> wrote:

> Hi everyone! In a project involving Hadoop (0.20.1) I´m working, I´d need
> to
> know if I´m reading properly the content of a file located in the HDFS.
> Beside the try...catch block, is there any other option for printing values
> in the console (in a similar way standard IO Java mechanisms do, like
> System.out.println("the variable is ", var))?
> Another thing, is there a simply way to debug Hadoop applications?
> (actually
> I´m working in pseudo-distributed mode, for developing purposes).
> Thanks a lot in advance.
>
> --
> Alberto
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message