You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by 张茂森 <ma...@alibaba-inc.com> on 2006/11/01 11:51:52 UTC
How to Display LOG on Console
Hi all:
I have encountered one problem about displaying log info on Console.
This is the detailed sentence, in order to show it more clearly, I will use
the code of wordcount:
public class WordCount {
private static final Log LOG =
LogFactory.getLog(WordCount.class.getName()); // added by me
public static class MapClass extends MapReduceBase implements Mapper {
private final static IntWritable one = new IntWritable(1);
private Text word = new Text();
public void map(WritableComparable key, Writable value,
OutputCollector output,
Reporter reporter) throws IOException {
String line = ((Text)value).toString();
StringTokenizer itr = new StringTokenizer(line);
while (itr.hasMoreTokens()) {
word.set(itr.nextToken());
output.collect(word, one);
LOG.info("printlog");
// added by me
}
}
}
Then I submit the job of wordcount, but I can’t see any information
“printlog” on my Console. Do you have some suggestions?
Thank you very much!
RE: How to Display LOG on Console
Posted by Runping Qi <ru...@yahoo-inc.com>.
Hadoop currently does not log user's logging messages.
All the user's logging messages are ignored. Hadoop-489 is to address this
issue.
Runping
> -----Original Message-----
> From: 张茂森 [mailto:maosen.zhang@alibaba-inc.com]
> Sent: Wednesday, November 01, 2006 2:52 AM
> To: hadoop-user@lucene.apache.org
> Subject: How to Display LOG on Console
>
> Hi all:
>
> I have encountered one problem about displaying log info on Console.
>
> This is the detailed sentence, in order to show it more clearly, I will
> use
> the code of wordcount:
>
> public class WordCount {
>
> private static final Log LOG =
> LogFactory.getLog(WordCount.class.getName()); // added by me
>
> public static class MapClass extends MapReduceBase implements Mapper {
>
>
>
> private final static IntWritable one = new IntWritable(1);
>
> private Text word = new Text();
>
>
>
> public void map(WritableComparable key, Writable value,
>
> OutputCollector output,
>
> Reporter reporter) throws IOException {
>
> String line = ((Text)value).toString();
>
> StringTokenizer itr = new StringTokenizer(line);
>
> while (itr.hasMoreTokens()) {
>
> word.set(itr.nextToken());
>
> output.collect(word, one);
>
> LOG.info("printlog");
> // added by me
>
> }
>
> }
>
> }
>
> Then I submit the job of wordcount, but I can’t see any information
> “printlog” on my Console. Do you have some suggestions?
>
>
>
> Thank you very much!
Query on the Hadoop storage
Posted by Jagadeesh <ja...@gmail.com>.
Hi,
I have a cluster of more than 25 servers which primararily serves the
purpose for storage. However I was wondering what will happen if the master
node gets exhausted of disk space.
Thanks
Jugs