Per Jacobsson wrote:
Hi all.
I've got a beginner question: Are there any best practices for how to do
logging from a task? Essentially I want to log warning messages under
certain conditions in my map and reduce tasks, and be able to review them
later.

stdout, stderr and the logs using commons-logging from the task are stored in userlogs directory i.e. ${hadoop.log.dir}/userlogs/<taskid> . They are also available on the web UI.
Is good old commons-logging using the TaskLogAppender the best way to solve
this?
I think using commons-logging is good.
I assume I'd have to configure it to log to StdErr to be able to see
the log messages in the jobtracker webapp. The Reporter would be useful to
track statistics but not for something like this. And the JobHistory class
and history logs are intended for internal use only?

JobHistory class is for internal use only. But the history logs can be viewed from the web UI and HistoryViewer.
Thanks a lot,
Per


Thanks
Amareshwari

Reply via email to