6

I'm trying to profile my application to see if I can reproduce this blogpost. I added -D mapred.task.profile=true to the command line and checked in the job configuration that it took.

Hadoop: The Definitive Guide says the profile info will appear in the Unix dir I ran the job from. The dir I started from has a file attempt_201305011806_0042_m_000002_0.profile, which is correct job ID but there wasn't a mapper #2 (only 1 mapper and it didn't fail). The output only has the header info in the profile file; there isn't any actual profiling info.

The Hadoop docs say the output will be in the user log directory but I can't find anything. If I go into the task logs for the mapper, there's profiling info under "profile.out logs" with legitimate info. My HDFS output dir doesn't have the profiling info at all. Shouldn't the profiling output be in HDFS somewhere?

Also, it only gives text-based output in the log but all of the tools I've found to visualize the profile assume binary hprof format. Any ideas for how I could get a binary profile or else load a text-based profile into an hprof tool?

4

1 回答 1

3

我注意到有一个空间

-D mapred.task.profile=true

那是错字吗?如果是,只需将其删除,看看会发生什么。此外,您应该能够在用户日志目录下看到分析器文件,这通常是您运行作业的位置。此外,hprof 是 hadoop 的默认设置,因此请检查您是否没有使用

-Dmapred.task.profile.params
于 2013-11-24T19:34:32.083 回答