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

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


+
Nagarjuna Kanamarlapudi 2013-03-25, 13:13
+
Hemanth Yamijala 2013-03-27, 04:46
+
Hemanth Yamijala 2013-03-26, 06:07
+
nagarjuna kanamarlapudi 2013-03-27, 09:51
+
Hemanth Yamijala 2013-03-27, 09:55
Copy link to this message
-
Re: Child JVM memory allocation / Usage
Awesome,

Working good .. need to start analysing why only 300MB is free out of
configured 1.9GB heap for mappers and reducers.
On Wed, Mar 27, 2013 at 3:25 PM, Hemanth Yamijala <[EMAIL PROTECTED]
> wrote:

> 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)