Hey Scott,
I see nothing wrong offhand; have you tried to run in "local" mode?
It'd be quicker to debug logging problems that way, as any bad
misconfigurations (I think) should get printed out to stderr.
Brian
On Nov 23, 2008, at 9:01 PM, Scott Whitecross wrote:
Thanks Brian. I've played w/ the log4j.properties a bit, and
haven't had any luck. Can you share how youve setup log4j? I am
probably missing the obvious, but here is what I setup:
log4j.logger.com.mycompany.hadoop=DEBUG,DX,console
log4j.appender.DX=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DX.File=/opt/hadoop/myLogs/test.log
log4j.appender.DX.layout=org.apache.log4j.PatternLayout
log4j.appender.DX.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
Within my map class:
private static final Logger logger = Logger.getLogger(MyMap.class);
and to log:
logger.info("entering map");
I also tried creating a logger in the code and attaching appenders w/
out luck.
Thanks.
On Nov 23, 2008, at 9:15 PM, Brian Bockelman wrote:
Hey Scott,
Have you tried configuring things from
$HADOOP_HOME/conf/log4j.properties
?
I'd just use my own logger and set up a separate syslog server.
It's not an extremely elaborate setup (certainly, would quickly
become a headache on a large cluster...), but it should be pretty
easy to set up.
Brian
On Nov 23, 2008, at 7:58 PM, Scott Whitecross wrote:
I've looked around for a while, but it seems there isn't a way to
log from Hadoop, without going through the logs/userlogs/ and the
'attempt' directories? That would mean that for logging I'm
restricted to writing to System.out and System.err, then
collecting via scripts?
Thanks.
On Nov 11, 2008, at 9:53 PM, Alex Loddengaard wrote:
Have you seen this:
<http://wiki.apache.org/hadoop/HowToDebugMapReducePrograms>
Alex
On Tue, Nov 11, 2008 at 6:03 PM, ZhiHong Fu <[EMAIL PROTECTED]>
wrote:
Hello,
I'm very sorry to trouble you, I'm developing a MapReduce
Application, And I can get Log.INFO in InputFormat ,but In
Mapper or
Reducer
, I can't get anything
. And Now an error occured in the reduce stage. Because the code
is a
little
complicated, I can't find where is the mistake just form the
thrown
exception. I want to use
log4j to log the intermediate info. But I have tried a whole
day , Now I
can't still get anything. who can help me? Thanks very much.
ddream.