2009年3月15日星期日

分析hadoop运行的日志

我在MapReduce的过程中,用system.out.print打印了一条信息,本机测试中是能够看到的,但是在hadoop环境中运行时,要在logs/userlogs中才可看到。

logs/userlogs下的目录结构如下:
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0001_m_000000_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0001_m_000001_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0001_m_000002_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0001_r_000000_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0002_m_000000_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0002_m_000001_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0002_m_000002_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0002_m_000003_0
drwxr-xr-x 2 root root 4096 Mar 16 13:50 attempt_200903161347_0002_r_000000_0

其中每个part文件夹中都含有log.index, stderr,stdout,syslog日志文件,其中log.index是统计信息,stderr是错误信息,stdout是标准输出信息,syslog是log信息了。

也许有一种方法可以将stderr, stdout, syslog集成在hadoop运行时一起输出,方便查看。等待下次实验。

没有评论:

发表评论