Hi Russell,
I was trying with REST API port (8098) instead of PB client port. Now I
am able to get it working.
Regards,
Vijayakumar.
On Wed, Aug 3, 2011 at 2:12 AM, Russell Brown-2 [via Riak Users] <
ml-node+3220159-944807713-419...@n3.nabble.com> wrote:
> Hi,
> A couple of preliminary questions: What version of riak-java-client and
> what version of Riak are you using?
>
> Also, your cut and paste has come out a little garbled, could you maybe
> paste it into a github gist or a paste bin so I can get a better read of the
> code, please?
>
> Also, do you have the riak log? Is there anything in that for the same
> call?
>
> Do you get the error consistently or is this as part of a load
> test/benchmark and it occurs under a certain load?
>
> I've never used YCSB so I'll have a look into that, also.
>
> Cheers
>
> Russell
>
> On 2 Aug 2011, at 20:20, vijayakumar wrote:
>
> > 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.
> >
> > _______________________________________________
> > riak-users mailing list
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=3220159&i=0>
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
> _______________________________________________
> riak-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3220159&i=1>
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://riak-users.197444.n3.nabble.com/Facing-java-net-broken-pipe-issue-while-benchmarking-java-PBClient-with-YCSB-tp3219935p3220159.html
> To unsubscribe from Facing java.net broken pipe issue while benchmarking
> java-PBClient with YCSB, click
> here<http://riak-users.197444.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3219935&code=Zm9yZ2V0dmlqYXlAZ21haWwuY29tfDMyMTk5MzV8MTkyMzYwOTM3>.
>
>
--
View this message in context:
http://riak-users.197444.n3.nabble.com/Facing-java-net-broken-pipe-issue-while-benchmarking-java-PBClient-with-YCSB-tp3219935p3245485.html
Sent from the Riak Users mailing list archive at Nabble.com.
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com