Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Getting a value: get vs map
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mikhail Sobolev  
View profile  
 More options Jul 28 2011, 3:43 pm
From: m...@mawhrin.net (Mikhail Sobolev)
Date: Thu, 28 Jul 2011 23:43:06 +0400
Local: Thurs, Jul 28 2011 3:43 pm
Subject: Getting a value: get vs map

Hi,

(I looked at various places for the information, however I could not
find anything that would answer the question.  It's not completely ruled
out that not all places were checked though :))

I use PB erlang interface to access the database.  Given a bucket name
and a key, the value can easily be extracted using:

    {ok, Object} = riakc_pb_socket:get(Conn, Bucket, Key),
    Value = riakc_obj:get_value(Object)

Alternatively, a mapred (actually, just map) request could be issued:

    {ok, [{_, Value}]} = riakc_pb_socket:mapred(Conn, [
        {Bucket, Key}
    ], [
        {map, {modfun, riak_kv, map_object_value}, none, true}
    ])

I would expect that the result is the same while in the second case, the
amount of data transferred to the client is smaller (which might be good
for certain situations).

So the [open] question is: are there any reasons for using the first
approach over the second?

--
Misha

  signature.asc
< 1K Download

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antonio Rohman Fernandez  
View profile  
 More options Jul 29 2011, 4:37 am
From: Antonio Rohman Fernandez <roh...@mahalostudio.com>
Date: Fri, 29 Jul 2011 16:37:37 +0800
Local: Fri, Jul 29 2011 4:37 am
Subject: Re: Getting a value: get vs map

MapReduce ( or a simply Map ) gets really slow when database has a
significant amount of data ( or distributed over several servers ). Get
instead is always faster as Riak doesn't have to search for the key (
you tell Riak exactly where to GET the data in your url )

Rohman

On
Thu, 28 Jul 2011 23:43:06 +0400, m...@mawhrin.net wrote:

> Hi,

> (I

looked at various places for the information, however I could not
> find

anything that would answer the question. It's not completely ruled
> out

that not all places were checked though :))

> I use PB erlang

interface to access the database. Given a bucket name
> and a key, the

value can easily be extracted using:

> {ok, Object} =

riakc_pb_socket:get(Conn, Bucket, Key),
> Value =

riakc_obj:get_value(Object)

> Alternatively, a mapred (actually, just

map) request could be issued:

> {ok, [{_, Value}]} =

riakc_pb_socket:mapred(Conn, [
> {Bucket, Key}
> ], [
> {map, {modfun,

riak_kv, map_object_value}, none, true}
> ])

> I would expect that

the result is the same while in the second case, the
> amount of data

transferred to the client is smaller (which might be good

> for certain
situations).

> So the [open] question is: are there any reasons for
using the first
> approach over the second?

> --
> Misha

--

[1]

 ANTONIO ROHMAN FERNANDEZ
CEO, Founder & Lead
Engineer
roh...@mahalostudio.com [2]                
 PROJECTS
MaruBatsu.es
[3]
PupCloud.com [4]
Wedding Album [5]

Links:
------
[1]
http://mahalostudio.com
[2] mailto:roh...@mahalostudio.com
[3]
http://marubatsu.es
[4] http://pupcloud.com
[5]
http://wedding.mahalostudio.com

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremiah Peschka  
View profile  
 More options Jul 29 2011, 10:27 am
From: Jeremiah Peschka <jeremiah.pesc...@gmail.com>
Date: Fri, 29 Jul 2011 07:27:34 -0700
Local: Fri, Jul 29 2011 10:27 am
Subject: Re: Getting a value: get vs map
I would have suspected that an MR job where you supply a Bucket, Key pair would be just as fast as a Get request. Shows what I know.
---
Jeremiah Peschka
Founder, Brent Ozar PLF, LLC

On Jul 29, 2011, at 1:37 AM, Antonio Rohman Fernandez wrote:

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Langevin  
View profile  
 More options Jul 29 2011, 10:59 am
From: Jonathan Langevin <jlange...@loomlearning.com>
Date: Fri, 29 Jul 2011 10:59:40 -0400
Local: Fri, Jul 29 2011 10:59 am
Subject: Re: Getting a value: get vs map

And it's a bit ironic that having data spread over more servers results in
slower performance. Usually more servers = greater performance.
...black is white, up is down...
*

<http://www.loomlearning.com/>
Jonathan Langevin
Systems Administrator
Loom Inc.
Wilmington, NC: (910) 241-0433 - jlange...@loomlearning.com -
www.loomlearning.com - Skype: intel352
*

On Fri, Jul 29, 2011 at 10:27 AM, Jeremiah Peschka <

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Sheehy  
View profile  
 More options Jul 29 2011, 1:30 pm
From: Justin Sheehy <jus...@basho.com>
Date: Fri, 29 Jul 2011 13:30:00 -0400
Subject: Re: Getting a value: get vs map
Jeremiah,

You were essentially correct. A "targeted" MR does not have to search
for the data, and does not slow down with database size. It is a
bucket-sweeping MR that currently has that behavior.

-Justin

On Fri, Jul 29, 2011 at 10:27 AM, Jeremiah Peschka

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean Cribbs  
View profile  
 More options Jul 29 2011, 1:46 pm
From: Sean Cribbs <s...@basho.com>
Date: Fri, 29 Jul 2011 13:46:36 -0400
Local: Fri, Jul 29 2011 1:46 pm
Subject: Re: Getting a value: get vs map

A few things that should be mentioned as well:

1) MapReduce amounts to N=1, or reading only one replica. If you have
divergent replicas (siblings, e.g.) on different notes, they might not
appear in your MapReduce results.
2) MapReduce does not invoke read-repair, so divergent replicas will not
converge.

--
Sean Cribbs <s...@basho.com>
Developer Advocate
Basho Technologies, Inc.
http://www.basho.com/

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Langevin  
View profile  
 More options Jul 30 2011, 5:43 am
From: Jonathan Langevin <jlange...@loomlearning.com>
Date: Sat, 30 Jul 2011 05:43:43 -0400
Local: Sat, Jul 30 2011 5:43 am
Subject: Re: Getting a value: get vs map

That's reassuring to know then, thanks*

<http://www.loomlearning.com/>
Jonathan Langevin
Systems Administrator
Loom Inc.
Wilmington, NC: (910) 241-0433 - jlange...@loomlearning.com -
www.loomlearning.com - Skype: intel352
*

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »