I have setup Riak on a Ubuntu machine, and it seam to work if I do riak ping
.
Now I would like to use the Riak Java client to store an object, but it doesn't work. I get com.basho.riak.client.response.RiakIORuntimeException
when I try to store an object. What am I doing wrong? Is there a way to test if I can access riak from my java client? Do I have to create a Bucket first? how?
import com.basho.riak.client.RiakClient;
import com.basho.riak.client.RiakObject;
import com.basho.riak.client.response.FetchResponse;
public class RiakTest {
public static void main(String[] args) {
// connect
RiakClient riak = new RiakClient("http://192.168.1.107:8098/riak");
// create object
RiakObject o = new RiakObject("mybucket", "mykey", "myvalue");
// store
riak.store(o);
}
}