Facing java.net broken pipe issue while benchmarking java-PBClient with YCSB

vijayakumar forgetvijay at gmail.com
Tue Aug 2 15:20:08 EDT 2011


I am trying to benchmark riak client with YCSB and I am getting the following
exception while
trying to fetch from riak client. Am I missing any tunable parameters in
server or client settings?

Code snippet (method implementation for YCSB-DB):

public int read(String table, String key, Set<String> fields,
HashMap<String, String> result) {
    	ObjectInputStream ois = null;
    	int status = Error;
    	try {
    		RiakObject[] riakObjects = *riakclient.fetch(table, key,1)*;
            ois = new ObjectInputStream(new
ByteArrayInputStream(riakObjects[0].getValue().toByteArray()));
            HashMap<String, String> values = (HashMap<String,
String>) ois.readObject();
            result.putAll(values);
            status = Ok;
        } catch (IOException e) {
        	e.printStackTrace(System.out);  
            return status;
        } catch (ClassNotFoundException e) {
        	e.printStackTrace(System.out);
            return status;
        } finally{
        	if(ois!=null){
        		try{
        			ois.close();
        		}catch(Exception excep){
        			excep.printStackTrace();
        		}
        	}
        }
        return status;
    }

Exception thrown while running YCSB setup:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at com.basho.riak.pbc.RiakConnection.send(RiakConnection.java:68)
at com.basho.riak.pbc.RiakClient.fetch(RiakClient.java:221)
at com.basho.riak.pbc.RiakClient.fetch(RiakClient.java:210)
at com.yahoo.ycsb.db.riak.RiakPBClient.read(RiakPBClient.java:63)
at com.yahoo.ycsb.DBWrapper.read(DBWrapper.java:87)
at
com.apigee.kms.RequestTokenWorkLoad.doTransactionRead(RequestTokenWorkLoad.java:81)
at
com.yahoo.ycsb.workloads.CoreWorkload.doTransaction(CoreWorkload.java:372)
at com.yahoo.ycsb.ClientThread.run(Client.java:235)
java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:180)
at java.io.DataInputStream.readFully(DataInputStream.java:152)
at com.basho.riak.pbc.RiakConnection.receive(RiakConnection.java:89)
at com.basho.riak.pbc.RiakClient.process_fetch_reply(RiakClient.java:251)
at com.basho.riak.pbc.RiakClient.fetch(RiakClient.java:222)
at com.basho.riak.pbc.RiakClient.fetch(RiakClient.java:210)
at com.yahoo.ycsb.db.riak.RiakPBClient.read(RiakPBClient.java:63)
at com.yahoo.ycsb.DBWrapper.read(DBWrapper.java:87)
at
com.apigee.kms.RequestTokenWorkLoad.doTransactionRead(RequestTokenWorkLoad.java:81)
at
com.yahoo.ycsb.workloads.CoreWorkload.doTransaction(CoreWorkload.java:372)
at com.yahoo.ycsb.ClientThread.run(Client.java:235)

--
View this message in context: http://riak-users.197444.n3.nabble.com/Facing-java-net-broken-pipe-issue-while-benchmarking-java-PBClient-with-YCSB-tp3219935p3219935.html
Sent from the Riak Users mailing list archive at Nabble.com.




More information about the riak-users mailing list