Hi,

I am trying out 2.0 w/ just one local node, created a strongly consistent
bucket type.  But keep getting below exception.  If I just use the default
bucket type, everything works fine.  Here is the bucket type detail with
consistency bit on.

young_vclock: 20
w: quorum
small_vclock: 50
rw: quorum
r: quorum
pw: 0
precommit: []
pr: 0
postcommit: []
old_vclock: 86400
notfound_ok: true
n_val: 1
linkfun: {modfun,riak_kv_wm_link_walker,mapreduce_linkfun}
last_write_wins: false
dw: quorum
dvv_enabled: true
chash_keyfun: {riak_core_util,chash_std_keyfun}
big_vclock: 50
basic_quorum: false
allow_mult: true
consistent: true
active: true
claimant: 'riak@0.0.0.0'

Here is the java code

List<String> addresses = new LinkedList<String>();

 addresses.add("172.16.0.254");

RiakClient  riakClient = RiakClient.newClient(addresses);

try {

   Location wildeGeniusQuote = new Location(new Namespace(
"strongly_consistent2", "sample"), emp.getId());

     BinaryValue text = BinaryValue.create(objectMapper.writeValueAsBytes(
sampleObj));

 RiakObject obj = new RiakObject()

         .setContentType("text/plain")

         .setValue(text);

     StoreValue store = new StoreValue.Builder(obj).withLocation(
wildeGeniusQuote)

  .withOption(Option.ASIS, true)

  .withOption(Option.DW, new Quorum(1))

  .withOption(Option.IF_NONE_MATCH, true)

  .withOption(Option.IF_NOT_MODIFIED, true)

  .withOption(Option.PW, new Quorum(1))

  .withOption(Option.N_VAL, 1)

  .withOption(Option.RETURN_BODY, true)

  .withOption(Option.RETURN_HEAD, true)

  .withOption(Option.SLOPPY_QUORUM, true)

  .withOption(Option.TIMEOUT, 1000)

  .withOption(Option.W, new Quorum(1))

     .build();

 riakClient.execute(store);

   } catch (Exception e) {

 e.printStackTrace();

 return null;

 }

Am I still missing something? Thanks.



Caused by: com.basho.riak.client.core.netty.RiakResponseException:
unavailable

at com.basho.riak.client.core.netty.RiakResponseHandler.channelRead(
RiakResponseHandler.java:52)

at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(
DefaultChannelHandlerContext.java:340)

at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(
DefaultChannelHandlerContext.java:326)

at io.netty.handler.codec.ByteToMessageDecoder.channelRead(
ByteToMessageDecoder.java:155)

at io.netty.handler.codec.ByteToMessageCodec.channelRead(
ByteToMessageCodec.java:108)

at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(
DefaultChannelHandlerContext.java:340)

at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(
DefaultChannelHandlerContext.java:326)

at io.netty.channel.DefaultChannelPipeline.fireChannelRead(
DefaultChannelPipeline.java:785)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(
AbstractNioByteChannel.java:116)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(
NioEventLoop.java:494)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(
NioEventLoop.java:461)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(
NioEventLoop.java:378)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)

at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(
SingleThreadEventExecutor.java:101)

... 1 more
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to