reducing n_val

2013-07-16 Thread Simon Effenberg
Hi @list,

is it possible to reduce the n_val? I mean you can change it but what
happens then?

- is old data removed or is it laying around? (or maybe deleted after
  some time thanks to AAE?)

- is it causing problems like:
  - reducing n_val from 3 to 2
  - update data
  - sleep 10minutes
  - read data but second primary is borked => is the first fallback
vnode on the place where the 3rd n_val vnode was before? So is this
reading old crappy data (maybe the vclock is rescuing there but
that's only one edge case I can think off right now)?

Cheers
Simon

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


Re: reducing n_val

2013-07-16 Thread Christopher Meiklejohn
On Tuesday, July 16, 2013 at 8:32 AM, Simon Effenberg wrote:
> is it possible to reduce the n_val? I mean you can change it but what
> happens then?
> 
> - is old data removed or is it laying around? (or maybe deleted after
> some time thanks to AAE?)

Changing the n_val setting in the default bucket properties will only affect 
new PUT operations moving forward. Older replicas will not be removed, and the 
AAE process will not purge older, unneeded replicas.

> 
> - is it causing problems like:
> - reducing n_val from 3 to 2
> - update data
> - sleep 10minutes
> - read data but second primary is borked => is the first fallback
> vnode on the place where the 3rd n_val vnode was before? So is this
> reading old crappy data (maybe the vclock is rescuing there but
> that's only one edge case I can think off right now)?

It's possible that the fallback virtual node will be started on the same 
physical node that originally hosted the third primary, however, it will be a 
different virtual node and backend directory as these are parameterized based 
on partition identifier and node.

- Chris

-- 
Christopher Meiklejohn
Software Engineer

Basho Technologies, Inc. 


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


Re: reducing n_val

2013-07-16 Thread Chris Meiklejohn
On Tue, Jul 16, 2013 at 10:02 AM, Simon Effenberg  wrote:

> Changing the n_val setting in the default bucket properties will only
> affect new PUT operations moving forward. Older replicas will not be
> removed, and the AAE process will not purge older, unneeded replicas.
>
> Is there a way to get rid of this? Or only by
> decommissioning/re-commissioning a node?


There isn't a good solution for doing this.  Can I ask why you are changing
the default n_val for this particular bucket?

- Chris
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Quickly deleting + recreating item in Riak deletes new item

2013-07-16 Thread Gabriel Littman
Please correct me if I'm wrong, but I think the right answer is doing a GET
first so you have a vector clock that is after the delete.  Then you should
be able to be sure your new write wins in any sibling resolution.

Gabe



On Mon, Jul 15, 2013 at 8:59 PM, Matthew Dawson wrote:

> On July 15, 2013 02:16:47 PM Gabriel Littman wrote:
> > Hi,
> >
> > Another posibility is to create a new bucket for each test run.
> >
> > Gabe
> >
> Also a good idea, but not easily implemented against my current library.
>  I've
> got a solution in using random addition to keys that works for now.
>
> My only problem is that this doesn't solve my underlying issues regarding
> keys
> disappearing.  Is the only way to ensure keys don't disappear is to never
> reuse a key?  I'd understand if this was caused by two random processes
> interacting, but in this case there is a significant (>1s) time between two
> runs where keys overlap.
>
> Thanks for all the help,
> --
> Matthew
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Does Riak support Range Queries over binary safe strings?

2013-07-16 Thread gbrits
First, hello all!

Coming from Redis, I love that you can just put any binary blob in Redis
which is just treated as a string. This is possible because Redis strings
are what they call 'binary safe'. This makes it possible to return slices of
string-encoded binary data, which is super useful for bitset-operations,
etc.

I'm investigating Riak and I like it a lot so far. Riak seems to have range
queries (on values, as it seems I must make that distinction with
column-stores), but I'm not sure if strings in Riak are "Binary safe" in the
above sense. If not, is there another way to store binary data in Riak and
still do range queries over them quickly?

To be exact: I want to do multi-key lookups in Riak, where each returned
result should be of format: 

Thanks, 
Geert-Jan



--
View this message in context: 
http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356.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


Re: Does Riak support Range Queries over binary safe strings?

2013-07-16 Thread Alexander Sicular
I would say no. Riak is generally oblivious as to the content of your data. Any 
ranges or other method you would use to query needs to be explicitly indexed 
via riak search or secondary indexes. Once you have found your data you could 
operate over that data in a map reduce, but I can't speak to "binary safe" blob 
operations in either erlang or JavaScript although I'm inclined to say yes, you 
would be able to operate over it in m/r. 

So searching for keys with certain data in the binblob is probably not gonna 
happen but once you have a key to feed an m/r you could get a slice of that 
value. 

Make sense? 
-Alexander

@siculars
http://siculars.posthaven.com

Sent from my iRotaryPhone

On Jul 16, 2013, at 18:17, gbrits  wrote:

> First, hello all!
> 
> Coming from Redis, I love that you can just put any binary blob in Redis
> which is just treated as a string. This is possible because Redis strings
> are what they call 'binary safe'. This makes it possible to return slices of
> string-encoded binary data, which is super useful for bitset-operations,
> etc.
> 
> I'm investigating Riak and I like it a lot so far. Riak seems to have range
> queries (on values, as it seems I must make that distinction with
> column-stores), but I'm not sure if strings in Riak are "Binary safe" in the
> above sense. If not, is there another way to store binary data in Riak and
> still do range queries over them quickly?
> 
> To be exact: I want to do multi-key lookups in Riak, where each returned
> result should be of format: 
> 
> Thanks, 
> Geert-Jan
> 
> 
> 
> --
> View this message in context: 
> http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356.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

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


Expire feature doesn't seem to work in Riak 1.4.0

2013-07-16 Thread Shrikar archak
Hi All,


I am looking at the auto expire feature in Riak and it seems that it
doesn't work.
Am I missing something here??

Here is the app config for the bitcask section

 {bitcask, [
 %% Configure how Bitcask writes data to disk.
 %%   erlang: Erlang's built-in file API
 %%  nif: Direct calls to the POSIX C API
 %%
 %% The NIF mode provides higher throughput for certain
 %% workloads, but has the potential to negatively impact
 %% the Erlang VM, leading to higher worst-case latencies
 %% and possible throughput collapse.
 {io_mode, erlang},

 {data_root, "/var/lib/riak/bitcask"},
* {expire_secs, 30},*
* {expire_grace_time, 3600},*
* {merge_window, {0, 6}}*
   ]},

Also my backend is bitcask.


Test :

curl -XPOST http://192.168.8.61:8098/riak/test/hello -d '{"shrikar":"test"}'

wait for more than 30 seconds in my case I waited for upto a minute.

Shrikars-MacBook-Pro:~ shrikar$ curl -v
http://192.168.8.61:8098/riak/test/hello
* About to connect() to 192.168.8.61 port 8098 (#0)
*   Trying 192.168.8.61...
* connected
* Connected to 192.168.8.61 (192.168.8.61) port 8098 (#0)
> GET /riak/test/hello HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
OpenSSL/0.9.8x zlib/1.2.5
> Host: 192.168.8.61:8098
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Riak-Vclock: a85hYGBgzGDKBVIcHpu2/Al8euxyBlMiax4rQ7Jn1Gm+LAA=
< Vary: Accept-Encoding
< Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
< Link: ; rel="up"
< Last-Modified: Tue, 16 Jul 2013 22:46:59 GMT
< ETag: "7ZFMTDwc4re4Z7v3RIaDFE"
< Date: Tue, 16 Jul 2013 22:52:13 GMT
< Content-Type: application/x-www-form-urlencoded
< Content-Length: 18
<
* Connection #0 to host 192.168.8.61 left intact
*{"shrikar":"test"}** Closing connection #0

Am I missing something here??


Thanks,
Shrikar
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Does Riak support Range Queries over binary safe strings?

2013-07-16 Thread Jeremiah Peschka
Following up on Alex's comments -

If you know which bytes you need to slice, you can store this in a
secondary index. You can perform range queries across secondary indices (as
well as keys).

As long as you're storing your data in a way that allows it to be read by
either Erlang or JavaScript, you should be able to query over it in
MapReduce. This is typically regarded as a Bad Idea™ since an MR query will
need to scan all keys in a bucket (which effectively means scanning the
entire cluster) and is best done as an infrequent activity to transform
data.

---
Jeremiah Peschka - Founder, Brent Ozar Unlimited
MCITP: SQL Server 2008, MVP
Cloudera Certified Developer for Apache Hadoop


On Tue, Jul 16, 2013 at 3:45 PM, Alexander Sicular wrote:

> I would say no. Riak is generally oblivious as to the content of your
> data. Any ranges or other method you would use to query needs to be
> explicitly indexed via riak search or secondary indexes. Once you have
> found your data you could operate over that data in a map reduce, but I
> can't speak to "binary safe" blob operations in either erlang or JavaScript
> although I'm inclined to say yes, you would be able to operate over it in
> m/r.
>
> So searching for keys with certain data in the binblob is probably not
> gonna happen but once you have a key to feed an m/r you could get a slice
> of that value.
>
> Make sense?
> -Alexander
>
> @siculars
> http://siculars.posthaven.com
>
> Sent from my iRotaryPhone
>
> On Jul 16, 2013, at 18:17, gbrits  wrote:
>
> > First, hello all!
> >
> > Coming from Redis, I love that you can just put any binary blob in Redis
> > which is just treated as a string. This is possible because Redis strings
> > are what they call 'binary safe'. This makes it possible to return
> slices of
> > string-encoded binary data, which is super useful for bitset-operations,
> > etc.
> >
> > I'm investigating Riak and I like it a lot so far. Riak seems to have
> range
> > queries (on values, as it seems I must make that distinction with
> > column-stores), but I'm not sure if strings in Riak are "Binary safe" in
> the
> > above sense. If not, is there another way to store binary data in Riak
> and
> > still do range queries over them quickly?
> >
> > To be exact: I want to do multi-key lookups in Riak, where each returned
> > result should be of format: 
> >
> > Thanks,
> > Geert-Jan
> >
> >
> >
> > --
> > View this message in context:
> http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356.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
>
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Does Riak support Range Queries over binary safe strings?

2013-07-16 Thread gbrits
Wow, high speed on this list!

I wanted it for near realtime anyway so Map/reduce is out of the question.
Thought somehow it could be done through Riak Search or directly on
secondary indices instead of map/reduce.
Guess not. Oh well, can't have it all.

Thanks


2013/7/17 Jeremiah Peschka [via Riak Users] <
ml-node+s197444n4028359...@n3.nabble.com>

> Following up on Alex's comments -
>
> If you know which bytes you need to slice, you can store this in a
> secondary index. You can perform range queries across secondary indices (as
> well as keys).
>
> As long as you're storing your data in a way that allows it to be read by
> either Erlang or JavaScript, you should be able to query over it in
> MapReduce. This is typically regarded as a Bad Idea™ since an MR query will
> need to scan all keys in a bucket (which effectively means scanning the
> entire cluster) and is best done as an infrequent activity to transform
> data.
>
> ---
> Jeremiah Peschka - Founder, Brent Ozar Unlimited
>  MCITP: SQL Server 2008, MVP
> Cloudera Certified Developer for Apache Hadoop
>
>
> On Tue, Jul 16, 2013 at 3:45 PM, Alexander Sicular <[hidden 
> email]
> > wrote:
>
>> I would say no. Riak is generally oblivious as to the content of your
>> data. Any ranges or other method you would use to query needs to be
>> explicitly indexed via riak search or secondary indexes. Once you have
>> found your data you could operate over that data in a map reduce, but I
>> can't speak to "binary safe" blob operations in either erlang or JavaScript
>> although I'm inclined to say yes, you would be able to operate over it in
>> m/r.
>>
>> So searching for keys with certain data in the binblob is probably not
>> gonna happen but once you have a key to feed an m/r you could get a slice
>> of that value.
>>
>> Make sense?
>> -Alexander
>>
>> @siculars
>> http://siculars.posthaven.com
>>
>> Sent from my iRotaryPhone
>>
>> On Jul 16, 2013, at 18:17, gbrits <[hidden 
>> email]>
>> wrote:
>>
>> > First, hello all!
>> >
>> > Coming from Redis, I love that you can just put any binary blob in Redis
>> > which is just treated as a string. This is possible because Redis
>> strings
>> > are what they call 'binary safe'. This makes it possible to return
>> slices of
>> > string-encoded binary data, which is super useful for bitset-operations,
>> > etc.
>> >
>> > I'm investigating Riak and I like it a lot so far. Riak seems to have
>> range
>> > queries (on values, as it seems I must make that distinction with
>> > column-stores), but I'm not sure if strings in Riak are "Binary safe"
>> in the
>> > above sense. If not, is there another way to store binary data in Riak
>> and
>> > still do range queries over them quickly?
>> >
>> > To be exact: I want to do multi-key lookups in Riak, where each returned
>> > result should be of format: 
>> >
>> > Thanks,
>> > Geert-Jan
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356.html
>> > Sent from the Riak Users mailing list archive at Nabble.com.
>> >
>> > ___
>> > riak-users mailing list
>> > [hidden email] 
>>
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>> ___
>> riak-users mailing list
>> [hidden email] 
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>
>
> ___
> riak-users mailing list
> [hidden email] 
> 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/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356p4028359.html
>  To unsubscribe from Does Riak support Range Queries over binary safe
> strings?, click 
> here
> .
> NAML
>




--
View this message in context: 
http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-string

Re: Expire feature doesn't seem to work in Riak 1.4.0

2013-07-16 Thread Hector Castro
Hi Shrikar,

It appears that you may be using incorrect expiry settings. You want
`expiry_secs` and `expiry_grace_time`, not `expire_secs` and
`expire_grace_time`. [0]

--
Hector

[0] http://docs.basho.com/riak/latest/tutorials/choosing-a-backend/Bitcask/

On Tue, Jul 16, 2013 at 6:52 PM, Shrikar archak  wrote:
> Hi All,
>
>
> I am looking at the auto expire feature in Riak and it seems that it doesn't
> work.
> Am I missing something here??
>
> Here is the app config for the bitcask section
>
>  {bitcask, [
>  %% Configure how Bitcask writes data to disk.
>  %%   erlang: Erlang's built-in file API
>  %%  nif: Direct calls to the POSIX C API
>  %%
>  %% The NIF mode provides higher throughput for certain
>  %% workloads, but has the potential to negatively impact
>  %% the Erlang VM, leading to higher worst-case latencies
>  %% and possible throughput collapse.
>  {io_mode, erlang},
>
>  {data_root, "/var/lib/riak/bitcask"},
>  {expire_secs, 30},
>  {expire_grace_time, 3600},
>  {merge_window, {0, 6}}
>]},
>
> Also my backend is bitcask.
>
>
> Test :
>
> curl -XPOST http://192.168.8.61:8098/riak/test/hello -d '{"shrikar":"test"}'
>
> wait for more than 30 seconds in my case I waited for upto a minute.
>
> Shrikars-MacBook-Pro:~ shrikar$ curl -v
> http://192.168.8.61:8098/riak/test/hello
> * About to connect() to 192.168.8.61 port 8098 (#0)
> *   Trying 192.168.8.61...
> * connected
> * Connected to 192.168.8.61 (192.168.8.61) port 8098 (#0)
>> GET /riak/test/hello HTTP/1.1
>> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
>> OpenSSL/0.9.8x zlib/1.2.5
>> Host: 192.168.8.61:8098
>> Accept: */*
>>
> < HTTP/1.1 200 OK
> < X-Riak-Vclock: a85hYGBgzGDKBVIcHpu2/Al8euxyBlMiax4rQ7Jn1Gm+LAA=
> < Vary: Accept-Encoding
> < Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
> < Link: ; rel="up"
> < Last-Modified: Tue, 16 Jul 2013 22:46:59 GMT
> < ETag: "7ZFMTDwc4re4Z7v3RIaDFE"
> < Date: Tue, 16 Jul 2013 22:52:13 GMT
> < Content-Type: application/x-www-form-urlencoded
> < Content-Length: 18
> <
> * Connection #0 to host 192.168.8.61 left intact
> {"shrikar":"test"}* Closing connection #0
>
> Am I missing something here??
>
>
> Thanks,
> Shrikar
>
>
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>

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


Re: Expire feature doesn't seem to work in Riak 1.4.0

2013-07-16 Thread Shrikar archak
Hi Hector,
My bad..Thanks for the quick response it helped.

Thanks,
Shrikar


On Tue, Jul 16, 2013 at 4:14 PM, Hector Castro  wrote:

> Hi Shrikar,
>
> It appears that you may be using incorrect expiry settings. You want
> `expiry_secs` and `expiry_grace_time`, not `expire_secs` and
> `expire_grace_time`. [0]
>
> --
> Hector
>
> [0]
> http://docs.basho.com/riak/latest/tutorials/choosing-a-backend/Bitcask/
>
> On Tue, Jul 16, 2013 at 6:52 PM, Shrikar archak 
> wrote:
> > Hi All,
> >
> >
> > I am looking at the auto expire feature in Riak and it seems that it
> doesn't
> > work.
> > Am I missing something here??
> >
> > Here is the app config for the bitcask section
> >
> >  {bitcask, [
> >  %% Configure how Bitcask writes data to disk.
> >  %%   erlang: Erlang's built-in file API
> >  %%  nif: Direct calls to the POSIX C API
> >  %%
> >  %% The NIF mode provides higher throughput for certain
> >  %% workloads, but has the potential to negatively impact
> >  %% the Erlang VM, leading to higher worst-case latencies
> >  %% and possible throughput collapse.
> >  {io_mode, erlang},
> >
> >  {data_root, "/var/lib/riak/bitcask"},
> >  {expire_secs, 30},
> >  {expire_grace_time, 3600},
> >  {merge_window, {0, 6}}
> >]},
> >
> > Also my backend is bitcask.
> >
> >
> > Test :
> >
> > curl -XPOST http://192.168.8.61:8098/riak/test/hello -d
> '{"shrikar":"test"}'
> >
> > wait for more than 30 seconds in my case I waited for upto a minute.
> >
> > Shrikars-MacBook-Pro:~ shrikar$ curl -v
> > http://192.168.8.61:8098/riak/test/hello
> > * About to connect() to 192.168.8.61 port 8098 (#0)
> > *   Trying 192.168.8.61...
> > * connected
> > * Connected to 192.168.8.61 (192.168.8.61) port 8098 (#0)
> >> GET /riak/test/hello HTTP/1.1
> >> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
> >> OpenSSL/0.9.8x zlib/1.2.5
> >> Host: 192.168.8.61:8098
> >> Accept: */*
> >>
> > < HTTP/1.1 200 OK
> > < X-Riak-Vclock: a85hYGBgzGDKBVIcHpu2/Al8euxyBlMiax4rQ7Jn1Gm+LAA=
> > < Vary: Accept-Encoding
> > < Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
> > < Link: ; rel="up"
> > < Last-Modified: Tue, 16 Jul 2013 22:46:59 GMT
> > < ETag: "7ZFMTDwc4re4Z7v3RIaDFE"
> > < Date: Tue, 16 Jul 2013 22:52:13 GMT
> > < Content-Type: application/x-www-form-urlencoded
> > < Content-Length: 18
> > <
> > * Connection #0 to host 192.168.8.61 left intact
> > {"shrikar":"test"}* Closing connection #0
> >
> > Am I missing something here??
> >
> >
> > Thanks,
> > Shrikar
> >
> >
> > ___
> > riak-users mailing list
> > riak-users@lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> >
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Does Riak support Range Queries over binary safe strings?

2013-07-16 Thread Jeremiah Peschka
Not a problem.

MapReduce across an entire keyspace is slow.

MapReduce when provided with a few bucket/key pairs is the same as a
multi-get + processing.

You can combine 2i + MR to get quick processing of data. Although, at that
point, you might as well just process your data on the client side.
Especially if you're just pulling out a slice of bytes.

---
Jeremiah Peschka - Founder, Brent Ozar Unlimited
MCITP: SQL Server 2008, MVP
Cloudera Certified Developer for Apache Hadoop


On Tue, Jul 16, 2013 at 4:13 PM, gbrits  wrote:

> Wow, high speed on this list!
>
> I wanted it for near realtime anyway so Map/reduce is out of the question.
> Thought somehow it could be done through Riak Search or directly on
> secondary indices instead of map/reduce.
> Guess not. Oh well, can't have it all.
>
> Thanks
>
>
> 2013/7/17 Jeremiah Peschka [via Riak Users] <[hidden 
> email]
> >
>
>> Following up on Alex's comments -
>>
>> If you know which bytes you need to slice, you can store this in a
>> secondary index. You can perform range queries across secondary indices (as
>> well as keys).
>>
>> As long as you're storing your data in a way that allows it to be read by
>> either Erlang or JavaScript, you should be able to query over it in
>> MapReduce. This is typically regarded as a Bad Idea™ since an MR query will
>> need to scan all keys in a bucket (which effectively means scanning the
>> entire cluster) and is best done as an infrequent activity to transform
>> data.
>>
>> ---
>> Jeremiah Peschka - Founder, Brent Ozar Unlimited
>>  MCITP: SQL Server 2008, MVP
>> Cloudera Certified Developer for Apache Hadoop
>>
>>
>> On Tue, Jul 16, 2013 at 3:45 PM, Alexander Sicular <[hidden 
>> email]
>> > wrote:
>>
>>> I would say no. Riak is generally oblivious as to the content of your
>>> data. Any ranges or other method you would use to query needs to be
>>> explicitly indexed via riak search or secondary indexes. Once you have
>>> found your data you could operate over that data in a map reduce, but I
>>> can't speak to "binary safe" blob operations in either erlang or JavaScript
>>> although I'm inclined to say yes, you would be able to operate over it in
>>> m/r.
>>>
>>> So searching for keys with certain data in the binblob is probably not
>>> gonna happen but once you have a key to feed an m/r you could get a slice
>>> of that value.
>>>
>>> Make sense?
>>> -Alexander
>>>
>>> @siculars
>>> http://siculars.posthaven.com
>>>
>>> Sent from my iRotaryPhone
>>>
>>> On Jul 16, 2013, at 18:17, gbrits <[hidden 
>>> email]>
>>> wrote:
>>>
>>> > First, hello all!
>>> >
>>> > Coming from Redis, I love that you can just put any binary blob in
>>> Redis
>>> > which is just treated as a string. This is possible because Redis
>>> strings
>>> > are what they call 'binary safe'. This makes it possible to return
>>> slices of
>>> > string-encoded binary data, which is super useful for
>>> bitset-operations,
>>> > etc.
>>> >
>>> > I'm investigating Riak and I like it a lot so far. Riak seems to have
>>> range
>>> > queries (on values, as it seems I must make that distinction with
>>> > column-stores), but I'm not sure if strings in Riak are "Binary safe"
>>> in the
>>> > above sense. If not, is there another way to store binary data in Riak
>>> and
>>> > still do range queries over them quickly?
>>> >
>>> > To be exact: I want to do multi-key lookups in Riak, where each
>>> returned
>>> > result should be of format: 
>>> >
>>> > Thanks,
>>> > Geert-Jan
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context:
>>> http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356.html
>>> > Sent from the Riak Users mailing list archive at Nabble.com.
>>> >
>>> > ___
>>> > riak-users mailing list
>>> > [hidden email] 
>>>
>>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>> ___
>>> riak-users mailing list
>>> [hidden email] 
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>
>>
>> ___
>> riak-users mailing list
>> [hidden email] 
>> 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/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356p4028359.html
>>  To unsubscribe from Does Riak support Range Queries over binary safe
>> strings?, click here.
>> NAML

Re: Quickly deleting + recreating item in Riak deletes new item

2013-07-16 Thread Matthew Dawson
On July 16, 2013 12:00:36 PM Gabriel Littman wrote:
> Please correct me if I'm wrong, but I think the right answer is doing a GET
> first so you have a vector clock that is after the delete.  Then you should
> be able to be sure your new write wins in any sibling resolution.
> 
> Gabe
> 
I would assume this to be the case.  I've even made sure my delete requests 
all have vclocks attached (by doing a GET first).  However I still see missing 
keys every so often.

By making each key unique across runs of the test suite seems to solve things, 
but I don't like that as a solution.  And I'm not sure if this is an actual 
bug or not.  If this behaviour is considered a bug, I can try making a minimal 
reproducible test case and file a bug using that.
-- 
Matthew

signature.asc
Description: This is a digitally signed message part.
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Does Riak support Range Queries over binary safe strings?

2013-07-16 Thread Alexander Sicular
To the extent you limit your sliced data via an m/r you will reap those savings 
on the wire when transferring back to the client

You can feed an m/r from riak search, 2i or enumerated keys thereby skipping a 
costly bucket scan. 


@siculars
http://siculars.posthaven.com

Sent from my iRotaryPhone

On Jul 16, 2013, at 19:46, Jeremiah Peschka  wrote:

> Not a problem.
> 
> MapReduce across an entire keyspace is slow.
> 
> MapReduce when provided with a few bucket/key pairs is the same as a 
> multi-get + processing.
> 
> You can combine 2i + MR to get quick processing of data. Although, at that 
> point, you might as well just process your data on the client side. 
> Especially if you're just pulling out a slice of bytes.
> 
> ---
> Jeremiah Peschka - Founder, Brent Ozar Unlimited
> MCITP: SQL Server 2008, MVP
> Cloudera Certified Developer for Apache Hadoop
> 
> 
> On Tue, Jul 16, 2013 at 4:13 PM, gbrits  wrote:
>> Wow, high speed on this list!
>> 
>> I wanted it for near realtime anyway so Map/reduce is out of the question. 
>> Thought somehow it could be done through Riak Search or directly on 
>> secondary indices instead of map/reduce. 
>> Guess not. Oh well, can't have it all. 
>> 
>> Thanks
>> 
>> 
>> 2013/7/17 Jeremiah Peschka [via Riak Users] <[hidden email]>
>>> Following up on Alex's comments -
>>> 
>>> If you know which bytes you need to slice, you can store this in a 
>>> secondary index. You can perform range queries across secondary indices (as 
>>> well as keys).
>>> 
>>> As long as you're storing your data in a way that allows it to be read by 
>>> either Erlang or JavaScript, you should be able to query over it in 
>>> MapReduce. This is typically regarded as a Bad Idea™ since an MR query will 
>>> need to scan all keys in a bucket (which effectively means scanning the 
>>> entire cluster) and is best done as an infrequent activity to transform 
>>> data.
>>> 
>>> ---
>>> Jeremiah Peschka - Founder, Brent Ozar Unlimited
>>> MCITP: SQL Server 2008, MVP
>>> Cloudera Certified Developer for Apache Hadoop
>>> 
>>> 
>>> On Tue, Jul 16, 2013 at 3:45 PM, Alexander Sicular <[hidden email]> wrote:
 I would say no. Riak is generally oblivious as to the content of your 
 data. Any ranges or other method you would use to query needs to be 
 explicitly indexed via riak search or secondary indexes. Once you have 
 found your data you could operate over that data in a map reduce, but I 
 can't speak to "binary safe" blob operations in either erlang or 
 JavaScript although I'm inclined to say yes, you would be able to operate 
 over it in m/r.
 
 So searching for keys with certain data in the binblob is probably not 
 gonna happen but once you have a key to feed an m/r you could get a slice 
 of that value.
 
 Make sense?
 -Alexander
 
 @siculars
 http://siculars.posthaven.com
 
 Sent from my iRotaryPhone
 
 On Jul 16, 2013, at 18:17, gbrits <[hidden email]> wrote:
 
 > First, hello all!
 >
 > Coming from Redis, I love that you can just put any binary blob in Redis
 > which is just treated as a string. This is possible because Redis strings
 > are what they call 'binary safe'. This makes it possible to return 
 > slices of
 > string-encoded binary data, which is super useful for bitset-operations,
 > etc.
 >
 > I'm investigating Riak and I like it a lot so far. Riak seems to have 
 > range
 > queries (on values, as it seems I must make that distinction with
 > column-stores), but I'm not sure if strings in Riak are "Binary safe" in 
 > the
 > above sense. If not, is there another way to store binary data in Riak 
 > and
 > still do range queries over them quickly?
 >
 > To be exact: I want to do multi-key lookups in Riak, where each returned
 > result should be of format: 
 >
 > Thanks,
 > Geert-Jan
 >
 >
 >
 > --
 > View this message in context: 
 > http://riak-users.197444.n3.nabble.com/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356.html
 > Sent from the Riak Users mailing list archive at Nabble.com.
 >
 > ___
 > riak-users mailing list
 > [hidden email]
 
 > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
 
 ___
 riak-users mailing list
 [hidden email]
 http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>> 
>>> 
>>> ___ 
>>> riak-users mailing list 
>>> [hidden email] 
>>> 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/Does-Riak-support-Range-Queries-over-binary-safe-strings-tp4028356p4028359.html
>>> To unsu