java client out of memory

Andrea Campolonghi acampolonghi at gmail.com
Wed Nov 3 15:50:01 EDT 2010


Hi,

I am trying to use the riak-java-pb-client.
Sample very very basic code

public static void main(String[] args) {
 try{
RiakClient rc = new RiakClient("localhost",8098);
 String bucket = "bucket";
String key = "key";
 String val = "test";
RiakObject ro = new RiakObject(bucket,key,val);
 rc.store(ro);

RiakObject[] ros = rc.fetch(bucket, key);
 for(RiakObject r : ros){
System.out.println(r.toString());
 }

}catch(IOException e){
 e.printStackTrace();
}


Running this simple test code form eclipse rerquire at least 1.5 GB ram.
Lower than this I get an out of memory exception.

While If I run the code with that huge memory I get this error:

   java.io.EOFException

at java.io.DataInputStream.readFully(DataInputStream.java:180)

at java.io.DataInputStream.readFully(DataInputStream.java:152)

at com.trifork.riak.RiakConnection.receive(RiakConnection.java:89)

at com.trifork.riak.RiakClient.store(RiakClient.java:384)

at com.trifork.riak.RiakClient.store(RiakClient.java:363)

at Runner.main(Runner.java:22)



Any suggestion???


Andrea



-- 
Andrea Campolonghi

Cell : +39 347 2298435
andrea at andreacfm.com
http://www.andreacfm.com

Railo Team
andrea at getrailo.org
http://getrailo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20101103/34c5296c/attachment.html>


More information about the riak-users mailing list