You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Puneet Agarwal <pu...@yahoo.com> on 2014/09/19 18:47:54 UTC

java.lang.OutOfMemoryError: Java heap space

Hi,
I wrote a code on Giraph 1.0.0 and using it with Hadoop 1.0.0

My program, uses an Aggregator to find the top-K vertices in some manner.
I am running this program only on 11 vertices.


I have written my own Aggregator class, which extends BasicAggregator<Text> 
I have declared two instance variables in this class, i.e., there are two ArrayLists inside the class and outside method bodies.

The logic is to keep adding the values received in these ArrayLists, until top-K values are found.
when I add second value in these ArrayLists, I get the error java.lang.OutOfMemoryError: Java heap space

I have tried to increase heap-size, to 4gb by modifying the mapred-site.xml, but no respite.

Please help.


Regards
Puneet Agarwal
IIT Delhi

Re: java.lang.OutOfMemoryError: Java heap space

Posted by Puneet Agarwal <pu...@yahoo.com>.
It got solved.

I was using the following api 

arrayListVar.add(i, new Float(newVal)) 

while there existed another value at i position in the ArrayList.
I then changed the logic to add the value after ith position, it stopped giving the out of memory error.

There seems to be some error message issue here, the error said out of memory error, but the error is not of memory but something else.

Few, I came out of this error for now.

Thanks anyway.

Regards
Puneet Agarwal
IIT Delhi


On Friday, September 19, 2014 10:17 PM, Puneet Agarwal <pu...@yahoo.com> wrote:
 


Hi,
I wrote a code on Giraph 1.0.0 and using it with Hadoop 1.0.0

My program, uses an Aggregator to find the top-K vertices in some manner.
I am running this program only on 11 vertices.


I have written my own Aggregator class, which extends BasicAggregator<Text> 
I have declared two instance variables in this class, i.e., there are two ArrayLists inside the class and outside method bodies.

The logic is to keep adding the values received in these ArrayLists, until top-K values are found.
when I add second value in these ArrayLists, I get the error java.lang.OutOfMemoryError: Java heap space

I have tried to increase heap-size, to 4gb by modifying the mapred-site.xml, but no respite.

Please help.


Regards
Puneet Agarwal
IIT Delhi