On Thu, Dec 8, 2011 at 1:57 PM, Kelly McLaughlin <[email protected]> wrote:
> Fisher,
>
> You need to call luwak_put_stream:close(Ps) to force the flush. That should
> get it for you. Cheers.
>
> Kelly

Hi, Kelly

  RiakNode = '[email protected]'.
  {ok, Riak} = riak:client_connect(RiakNode).
  {ok, RiakFile} = luwak_file:create(Riak, <<"testabc22yeah3">>, dict:new()).
  Ps = luwak_put_stream:start(Riak, RiakFile, 0, 1000000).
  luwak_put_stream:send(Ps, <<"1234">>).
  luwak_put_stream:flush(Ps).
  {ok, RiakFile2} = luwak_file:get(Riak, <<"testabc22yeah3">>).
  luwak_file:length(Riak, RiakFile2).      %% Length is 4
  luwak_put_stream:send(Ps, <<"56789">>).
  luwak_put_stream:close(Ps).
  {ok, RiakFile3} = luwak_file:get(Riak, <<"testabc22yeah3">>).
  luwak_file:length(Riak, RiakFile3).  %% Length still 13


   After i call close(), I still get the unexpected size(13bytes), is
this the expected behavior?  Can I not call flush() manually on a
stream?

  this is the version info:
  luwak-1.1.0
  riak_core-1.0.0          riak_kv-1.0.0            riak_pipe-1.0.0
  riak_search-1.0.0        riak_sysmon-1.0.0        riakc-1.2.0

Thanks,

Fisher


>
> On Dec 7, 2011, at 10:05 PM, vuleetu wrote:
>
> luwak_put_stream:send(Ps, <<"56789">>).
> luwak_put_stream:flush(Ps).
> {ok, RiakFile3} = luwak_file:get(Riak, <<"testabc22yeah3">>).
> luwak_file:length(Riak, RiakFile3).
>
>

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to