FAQ
Hello,

On Wed, Feb 9, 2011 at 6:33 AM, Adam Pridgen
wrote:
Hello,

I am trying to setup my Mapper class before it is set-up to run as a
task.  Specifically, I am trying to override the method
Mapper.setup(Mapper.Context).  When I run the MapReduce program I am
expecting an output to stdout of about about 6 lines along with the
configuration information read out of the Context.  I have two
questions:

--- Am I correctly setting up the mapper set task?
Yes, @Overriding the setup method is the right way to do this with the
new Mapper API.
--- Do I need to print/debug messages through an API of some sort, or
is printing output to stdout OK?
While stdout is okay to use, and the outputs of that do get stored in
stdout/stderr files of the Task on the TaskTracker machine, it makes
more sense to use a logger API instead for debugging purposes for
automatic time-stamps, levels of severity, classnames, etc.. Much more
easier to replay logger outputs in mind than stdouts while debugging.

Hadoop comes with commons-logging and log4j libraries for use out-of-the-box.

--
Harsh J
www.harshj.com

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupcommon-user @
categorieshadoop
postedFeb 9, '11 at 1:03a
activeFeb 9, '11 at 5:46a
posts3
users2
websitehadoop.apache.org...
irc#hadoop

2 users in discussion

Adam Pridgen: 2 posts Harsh J: 1 post

People

Translate

site design / logo © 2022 Grokbase