Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Re: Child JVM memory allocation / Usage


Copy link to this message
-
Re: Child JVM memory allocation / Usage
Hi,

>> "Dumping heap to ./heapdump.hprof"

>> File myheapdump.hprof does not exist.

The file names don't match - can you check your script / command line args.

Thanks
hemanth
On Wed, Mar 27, 2013 at 3:21 PM, nagarjuna kanamarlapudi <
[EMAIL PROTECTED]> wrote:

> Hi Hemanth,
>
> Nice to see this. I didnot know about this till now.
>
> But few one more issue.. the dump file did not get created..   The
> following are the logs
>
>
>
> ttempt_201302211510_81218_m_000000_0:
> /data/1/mapred/local/taskTracker/distcache/8776089957260881514_-363500746_715125253/cmp111wcd/user/ims-b/nagarjuna/AddressId_Extractor/Numbers
> attempt_201302211510_81218_m_000000_0: java.lang.OutOfMemoryError: Java
> heap space
> attempt_201302211510_81218_m_000000_0: Dumping heap to ./heapdump.hprof ...
> attempt_201302211510_81218_m_000000_0: Heap dump file created [210641441
> bytes in 3.778 secs]
> attempt_201302211510_81218_m_000000_0: #
> attempt_201302211510_81218_m_000000_0: # java.lang.OutOfMemoryError: Java
> heap space
> attempt_201302211510_81218_m_000000_0: # -XX:OnOutOfMemoryError="./dump.sh"
> attempt_201302211510_81218_m_000000_0: #   Executing /bin/sh -c
> "./dump.sh"...
> attempt_201302211510_81218_m_000000_0: put: File myheapdump.hprof does not
> exist.
> attempt_201302211510_81218_m_000000_0: log4j:WARN No appenders could be
> found for logger (org.apache.hadoop.hdfs.DFSClient).
>
>
>
>
>
> On Wed, Mar 27, 2013 at 2:29 PM, Hemanth Yamijala <
> [EMAIL PROTECTED]> wrote:
>
>> Couple of things to check:
>>
>> Does your class com.hadoop.publicationMrPOC.Launcher implement the Tool
>> interface ? You can look at an example at (
>> http://hadoop.apache.org/docs/r1.0.4/mapred_tutorial.html#Source+Code-N110D0).
>> That's what accepts the -D params on command line. Alternatively, you can
>> also set the same in the configuration object like this, in your launcher
>> code:
>>
>> Configuration conf = new Configuration()
>>
>> conf.set("mapred.create.symlink", "yes");
>>
>>
>> conf.set("mapred.cache.files", "hdfs:///user/hemanty/scripts/copy_dump.sh#copy_dump.sh");
>>
>>
>> conf.set("mapred.child.java.opts",
>>
>>
>>   "-Xmx200m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./heapdump.hprof -XX:OnOutOfMemoryError=./copy_dump.sh");
>>
>>
>> Second, the position of the arguments matters. I think the command should
>> be
>>
>> hadoop jar -Dmapred.create.symlink=yes -Dmapred.cache.files=hdfs:///user/ims-b/dump.sh#dump.sh
>> -Dmapred.reduce.child.java.opts='-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError
>> -XX:HeapDumpPath=./myheapdump.hprof -XX:OnOutOfMemoryError=./dump.sh'
>> com.hadoop.publicationMrPOC.Launcher  Fudan\ Univ
>>
>> Thanks
>> Hemanth
>>
>>
>> On Wed, Mar 27, 2013 at 1:58 PM, nagarjuna kanamarlapudi <
>> [EMAIL PROTECTED]> wrote:
>>
>>> Hi Hemanth/Koji,
>>>
>>> Seems the above script doesn't work for me.  Can u look into the
>>> following and suggest what more can I do
>>>
>>>
>>>  hadoop fs -cat /user/ims-b/dump.sh
>>> #!/bin/sh
>>> hadoop dfs -put myheapdump.hprof /tmp/myheapdump_ims/${PWD//\//_}.hprof
>>>
>>>
>>> hadoop jar LL.jar com.hadoop.publicationMrPOC.Launcher  Fudan\ Univ
>>>  -Dmapred.create.symlink=yes
>>> -Dmapred.cache.files=hdfs:///user/ims-b/dump.sh#dump.sh
>>> -Dmapred.reduce.child.java.opts='-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError
>>> -XX:HeapDumpPath=./myheapdump.hprof -XX:OnOutOfMemoryError=./dump.sh'
>>>
>>>
>>> I am not able to see the heap dump at  /tmp/myheapdump_ims
>>>
>>>
>>>
>>> Erorr in the mapper :
>>>
>>> Caused by: java.lang.reflect.InvocationTargetException
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
>>> ... 17 more
>>> Caused by: java.lang.OutOfMemoryError: Java heap space