Re: Object metadata via NodeJS client

2015-04-17 Thread Jose G. Quenum
Hi Luke,
It looks like my previous email didn't get through. I have a few questions 
regarding the riak client. 
1 - when I have several indices to add to an object can I just chain them to 
the riakObject, ie, call successive addIndex methods to a riakObject?
2 - when I am doing a map-reduce,
  a - can I use key filters? What's the syntax?
  b - how can I use map reduce to walk links? In riak-js I used to specify 
the links in the inputs. What is the syntax with this client?

Thanks in advance
Jose

Sent from my iPad

 On Apr 8, 2015, at 9:20 PM, Luke Bakken lbak...@basho.com wrote:
 
 José,
 
 Check out the following methods in the document:
 
 http://basho.github.io/riak-nodejs-client/classes/RiakObject.html
 
 hasLinks()
 getLinks()
 setLinks()
 
 --
 Luke Bakken
 Engineer
 lbak...@basho.com
 
 
 On Wed, Apr 8, 2015 at 8:56 AM, Jose G. Quenum
 jose.que...@googlemail.com wrote:
 Thanks a bunch Luke. It's now getting clear. However the links manipulation 
 is not available yet on the API docs. I guess it's just a matter of update.
 I will now start re implementing my riak data access with this client. When 
 I get questions I will turn to you guys.
 Regards
 Jose
 
 Sent from my iPad
 
 On Apr 7, 2015, at 6:50 PM, Luke Bakken lbak...@basho.com wrote:
 
 Hi José,
 
 Please refer to this document:
 
 http://basho.github.io/riak-nodejs-client/classes/RiakObject.html
 
 When you retrieve a value, you get a RiakObject back:
 
 client.fetchValue({ bucket: 'test', key: 'foo' }, function (err, rslt) {
   var riakObj = rslt.values.shift();
 });
 
 This RiakObject exposes several methods related to metadata.
 
 I just released version 1.1.0 which adds support for links. You'll see
 that in the API docs now.
 
 --
 Luke Bakken
 Engineer
 lbak...@basho.com
 
 
 On Tue, Apr 7, 2015 at 5:27 AM, José Ghislain Quenum
 jose.que...@googlemail.com wrote:
 Luke,
 In my current implementation, I use metadata for both links and secondary
 index.
 
 On Mon, Apr 6, 2015 at 4:03 PM, Luke Bakken lbak...@basho.com wrote:
 
 Hi José,
 
 Other than links, what object metadata are you trying to access or modify?
 
 Thanks -
 
 --
 Luke Bakken
 Engineer
 lbak...@basho.com
 
 
 On Sat, Apr 4, 2015 at 6:56 AM, José Ghislain Quenum
 jose.que...@googlemail.com wrote:
 Thanks Brian for your reply and trying to work out the links part.  I
 took a look at the RiakObject and could see how to manipulate it with
 FetchValue and the Secondary Index. However, I failed to figure out
 how to access the meta while reading an object. Just as an example,
 when you're updating an object you could be using some meta data, and
 some of them come from a prior read.
 
 If you could just share some examples with code  that'd be very helpful.
 
 Thanks José
 
 

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


Re: riak 2.0 + riak-cs 2.0 trouble

2015-04-17 Thread Stanislav Vlasov
2015-04-17 17:04 GMT+05:00 John Daily jda...@basho.com:
 Unfortunately it’s very easy to introduce syntax errors into Erlang 
 configuration files (and tricky to diagnose them without Erlang experience), 
 which is why we’re moving toward the newer sysctl-style files like riak.conf.

 The example in the documentation looks ok; can we see a copy of your 
 advanced.config file? Please redact any sensitive information, and I’d 
 suggest Pastebin or a GitHub gist.

It was copied from site by cut-n-paste, no any additions:
http://pastebin.com/Hyv3tvMS

Last comma in line before second '%%' removed by me.

 -John

 On Apr 17, 2015, at 7:57 AM, Stanislav Vlasov stanislav@gmail.com wrote:

 I have troubles setting up a test riak node for riak-cs. Here's how to
 reproduce my problem:

 1) install on Debian 7 riak 2.0.5 and riak 2.0.0 from apt repository
 as in 
 http://docs.basho.com/riak/latest/ops/building/installing/debian-ubuntu/
 and 
 http://docs.basho.com/riakcs/latest/cookbooks/installing/Installing-Riak-CS/
 2) create advanced.config in /etc/riak as in
 http://docs.basho.com/riakcs/latest/cookbooks/configuration/Configuring-Riak/#Setting-up-the-Proper-Riak-Backend

 After that I get an error in advanced.config

 last lines of 'riak config generate -l debug':
 10:54:47.488 [info] /etc/riak/advanced.config detected, overlaying proplists
 10:54:47.488 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before: ']'

 If i remove last comma in advanced.config, I get another error:

 10:58:21.398 [info] /etc/riak/advanced.config detected, overlaying proplists
 10:58:21.399 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before:

 I think, it is a bug either in documentation or in config generator

 --
 Stanislav

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




-- 
Stanislav

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


Re: riak 2.0 + riak-cs 2.0 trouble

2015-04-17 Thread John Daily
Thanks, that helps. You’re right that the documentation is a bit buggy, or at 
least incomplete.

The problem is that the example provided in the docs is just a snippet. To make 
a fully-functional advanced.config file requires a bit more syntactical 
structure.

You’ll need to wrap what you provided in an Erlang array, with square brackets 
and a period terminating it.

See http://pastebin.com/90gh6amg.

-John

On Apr 17, 2015, at 8:24 AM, Stanislav Vlasov stanislav@gmail.com wrote:

 2015-04-17 17:04 GMT+05:00 John Daily jda...@basho.com:
 Unfortunately it’s very easy to introduce syntax errors into Erlang 
 configuration files (and tricky to diagnose them without Erlang experience), 
 which is why we’re moving toward the newer sysctl-style files like riak.conf.
 
 The example in the documentation looks ok; can we see a copy of your 
 advanced.config file? Please redact any sensitive information, and I’d 
 suggest Pastebin or a GitHub gist.
 
 It was copied from site by cut-n-paste, no any additions:
 http://pastebin.com/Hyv3tvMS
 
 Last comma in line before second '%%' removed by me.
 
 -John
 
 On Apr 17, 2015, at 7:57 AM, Stanislav Vlasov stanislav@gmail.com 
 wrote:
 
 I have troubles setting up a test riak node for riak-cs. Here's how to
 reproduce my problem:
 
 1) install on Debian 7 riak 2.0.5 and riak 2.0.0 from apt repository
 as in 
 http://docs.basho.com/riak/latest/ops/building/installing/debian-ubuntu/
 and 
 http://docs.basho.com/riakcs/latest/cookbooks/installing/Installing-Riak-CS/
 2) create advanced.config in /etc/riak as in
 http://docs.basho.com/riakcs/latest/cookbooks/configuration/Configuring-Riak/#Setting-up-the-Proper-Riak-Backend
 
 After that I get an error in advanced.config
 
 last lines of 'riak config generate -l debug':
 10:54:47.488 [info] /etc/riak/advanced.config detected, overlaying proplists
 10:54:47.488 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before: ']'
 
 If i remove last comma in advanced.config, I get another error:
 
 10:58:21.398 [info] /etc/riak/advanced.config detected, overlaying proplists
 10:58:21.399 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before:
 
 I think, it is a bug either in documentation or in config generator
 
 --
 Stanislav
 
 ___
 riak-users mailing list
 riak-users@lists.basho.com
 http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
 
 
 
 
 -- 
 Stanislav


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


Re: riak 2.0 + riak-cs 2.0 trouble

2015-04-17 Thread Stanislav Vlasov
2015-04-17 17:31 GMT+05:00 John Daily jda...@basho.com:
 Thanks, that helps. You’re right that the documentation is a bit buggy, or at 
 least incomplete.

 The problem is that the example provided in the docs is just a snippet. To 
 make a fully-functional advanced.config file requires a bit more syntactical 
 structure.

 You’ll need to wrap what you provided in an Erlang array, with square 
 brackets and a period terminating it.

 See http://pastebin.com/90gh6amg.

Thank you.

Please, add template for this config to next riak package.

 -John

 On Apr 17, 2015, at 8:24 AM, Stanislav Vlasov stanislav@gmail.com wrote:

 2015-04-17 17:04 GMT+05:00 John Daily jda...@basho.com:
 Unfortunately it’s very easy to introduce syntax errors into Erlang 
 configuration files (and tricky to diagnose them without Erlang 
 experience), which is why we’re moving toward the newer sysctl-style files 
 like riak.conf.

 The example in the documentation looks ok; can we see a copy of your 
 advanced.config file? Please redact any sensitive information, and I’d 
 suggest Pastebin or a GitHub gist.

 It was copied from site by cut-n-paste, no any additions:
 http://pastebin.com/Hyv3tvMS

 Last comma in line before second '%%' removed by me.

 -John

 On Apr 17, 2015, at 7:57 AM, Stanislav Vlasov stanislav@gmail.com 
 wrote:

 I have troubles setting up a test riak node for riak-cs. Here's how to
 reproduce my problem:

 1) install on Debian 7 riak 2.0.5 and riak 2.0.0 from apt repository
 as in 
 http://docs.basho.com/riak/latest/ops/building/installing/debian-ubuntu/
 and 
 http://docs.basho.com/riakcs/latest/cookbooks/installing/Installing-Riak-CS/
 2) create advanced.config in /etc/riak as in
 http://docs.basho.com/riakcs/latest/cookbooks/configuration/Configuring-Riak/#Setting-up-the-Proper-Riak-Backend

 After that I get an error in advanced.config

 last lines of 'riak config generate -l debug':
 10:54:47.488 [info] /etc/riak/advanced.config detected, overlaying 
 proplists
 10:54:47.488 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before: ']'

 If i remove last comma in advanced.config, I get another error:

 10:58:21.398 [info] /etc/riak/advanced.config detected, overlaying 
 proplists
 10:58:21.399 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before:

 I think, it is a bug either in documentation or in config generator

 --
 Stanislav

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




 --
 Stanislav




-- 
Stanislav

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


riak 2.0 + riak-cs 2.0 trouble

2015-04-17 Thread Stanislav Vlasov
I have troubles setting up a test riak node for riak-cs. Here's how to
reproduce my problem:

1) install on Debian 7 riak 2.0.5 and riak 2.0.0 from apt repository
as in http://docs.basho.com/riak/latest/ops/building/installing/debian-ubuntu/
and http://docs.basho.com/riakcs/latest/cookbooks/installing/Installing-Riak-CS/
2) create advanced.config in /etc/riak as in
http://docs.basho.com/riakcs/latest/cookbooks/configuration/Configuring-Riak/#Setting-up-the-Proper-Riak-Backend

After that I get an error in advanced.config

last lines of 'riak config generate -l debug':
10:54:47.488 [info] /etc/riak/advanced.config detected, overlaying proplists
10:54:47.488 [error] Error parsing /etc/riak/advanced.config: 17:
syntax error before: ']'

If i remove last comma in advanced.config, I get another error:

10:58:21.398 [info] /etc/riak/advanced.config detected, overlaying proplists
10:58:21.399 [error] Error parsing /etc/riak/advanced.config: 17:
syntax error before:

I think, it is a bug either in documentation or in config generator

-- 
Stanislav

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


Re: riak 2.0 + riak-cs 2.0 trouble

2015-04-17 Thread John Daily
Unfortunately it’s very easy to introduce syntax errors into Erlang 
configuration files (and tricky to diagnose them without Erlang experience), 
which is why we’re moving toward the newer sysctl-style files like riak.conf.

The example in the documentation looks ok; can we see a copy of your 
advanced.config file? Please redact any sensitive information, and I’d suggest 
Pastebin or a GitHub gist.

-John

On Apr 17, 2015, at 7:57 AM, Stanislav Vlasov stanislav@gmail.com wrote:

 I have troubles setting up a test riak node for riak-cs. Here's how to
 reproduce my problem:
 
 1) install on Debian 7 riak 2.0.5 and riak 2.0.0 from apt repository
 as in http://docs.basho.com/riak/latest/ops/building/installing/debian-ubuntu/
 and 
 http://docs.basho.com/riakcs/latest/cookbooks/installing/Installing-Riak-CS/
 2) create advanced.config in /etc/riak as in
 http://docs.basho.com/riakcs/latest/cookbooks/configuration/Configuring-Riak/#Setting-up-the-Proper-Riak-Backend
 
 After that I get an error in advanced.config
 
 last lines of 'riak config generate -l debug':
 10:54:47.488 [info] /etc/riak/advanced.config detected, overlaying proplists
 10:54:47.488 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before: ']'
 
 If i remove last comma in advanced.config, I get another error:
 
 10:58:21.398 [info] /etc/riak/advanced.config detected, overlaying proplists
 10:58:21.399 [error] Error parsing /etc/riak/advanced.config: 17:
 syntax error before:
 
 I think, it is a bug either in documentation or in config generator
 
 -- 
 Stanislav
 
 ___
 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


PHP Client Release

2015-04-17 Thread Christopher Mancini
Greetings Riak Users!

Yesterday we released the awaited rewrite for the Official PHP client for Riak 
supporting version 2 features (bucket types, CRDTs, and user authentication 
over TLS). The library uses the HTTP interface to communicate with Riak and 
requires PHP version 5.4 or newer as well as the JSON and cURL PHP extensions.

It's available via composer:

https://packagist.org/packages/basho/riak 
https://packagist.org/packages/basho/riak

Simply add the following to your composer.json file within your project:

 require: { basho/riak: 2.0.* },

The github repo can be found here:

https://github.com/basho/riak-php-client 
https://github.com/basho/riak-php-client

API docs are published here:

http://basho.github.io/riak-php-client/ 
http://basho.github.io/riak-php-client/

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


Node.js client addIndex() and map/reduce questions (Was: Object metadata via NodeJS client)

2015-04-17 Thread Luke Bakken
 1 - when I have several indices to add to an object can I just chain them to 
 the riakObject, ie, call successive addIndex methods to a riakObject?

Source code is available as part of the API docs. Note that this is
returned, which allows chaining:

http://basho.github.io/riak-nodejs-client/files/lib_commands_kv_riakobject.js.html#l230

 2 - when I am doing a map-reduce,
   a - can I use key filters? What's the syntax?
   b - how can I use map reduce to walk links? In riak-js I used to 
 specify the links in the inputs. What is the syntax with this client?

I am not an expert with map/reduce, but did find the following documents:

http://docs.basho.com/riak/latest/dev/using/keyfilters/

http://docs.basho.com/riak/latest/dev/using/link-walking/ (Note
deprecation notice)

--
Luke Bakken
Engineer
lbak...@basho.com

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


Re: Android client, Riak server

2015-04-17 Thread Gustavo Gonzalez

Thanks for your answers.

Good point noticed about the middleware.

May I ask what middleware would you suggest to be evaluated?

Regards,
Gustavo


El 16/04/15 a las 16:38, John Daily escribió:

Agreed: exposing any database directly to the Internet is risky, and Riak’s 
security introduced in 2.0 doesn’t really change that.

-John

On Apr 16, 2015, at 4:25 PM, Alexander Sicular sicul...@gmail.com wrote:


That should work but are you sure you want to expose your riak server to the 
Internet? I would recommend against that and instead suggest your app talk to 
some middleware.

-Alexander

@siculars
http://siculars.posthaven.com

Sent from my iRotaryPhone


On Apr 14, 2015, at 12:54, Gustavo Gonzalez gfg...@gmail.com wrote:

Hi,

Please excuse me if I am asking a silly question.

Is the Riak Java Client also usable (applies to) in Android application 
development?

That is, if I want to develop an Android app that connects to a Riak Server, do 
I use this riak-Java-Client?

Thanks for your reply.

Regards,
Gustavo.

___
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: Ensembles failing to reach Leader ready state

2015-04-17 Thread Andrew Stone
Hi Jonathan,

Sorry for the late reply. It looks like riak_ensemble still thinks that
those old nodes are part of the cluster. Did you remove them with
'riak-admin cluster leave' ? If so they should have been removed from the
root ensemble also, and the machines shouldn't have actually left the
cluster until all the ensembles were reconfigured via joint consensus. Can
you paste the results from the following commands:

riak-admin member-status
riak-admin ring-status

Thanks,
Andrew


On Mon, Mar 23, 2015 at 11:25 AM, Jonathan Koff jonat...@projexity.com
wrote:

 Hi all,

 I recently used Riak’s Strong Consistency functionality to get
 auto-incrementing IDs for a feature of an application I’m working on, and
 although this worked great in dev (5 nodes in 1 VM) and staging (3 servers
 across NA) environments, I’ve run into some odd behaviour in production
 (originally 3 servers, now 4) that prevents it from working.

 I initially noticed that consistent requests were immediately failing as
 timeouts, and upon checking `riak-admin ensemble-status` saw that many
 ensembles were at 0 / 3, from the vantage point of the box I was SSH’d
 into. Interestingly, SSH-ing into different boxes showed different results.
 Here’s a brief snippet of what I see now, after adding a fourth server in a
 troubleshooting attempt:

 *Machine 1* (104.131.39.61)

 == Consensus System
 ===
 Enabled: true
 Active:  true
 Ring Ready:  true
 Validation:  strong (trusted majority required)
 Metadata:best-effort replication (asynchronous)

 == Ensembles
 ==
  Ensemble QuorumNodes  Leader

 ---
root   0 / 6 3 / 6  --
 2 0 / 3 3 / 3  --
 3 3 / 3 3 / 3  riak@104.131.130.237
 4 3 / 3 3 / 3  riak@104.131.130.237
 5 3 / 3 3 / 3  riak@104.131.130.237
 6 0 / 3 3 / 3  --
 7 0 / 3 3 / 3  --
 8 0 / 3 3 / 3  --
 9 3 / 3 3 / 3  riak@104.131.130.237
 103 / 3 3 / 3  riak@104.131.130.237
 110 / 3 3 / 3  --

 *Machine 2* (104.236.79.78)

 == Consensus System
 ===
 Enabled: true
 Active:  true
 Ring Ready:  true
 Validation:  strong (trusted majority required)
 Metadata:best-effort replication (asynchronous)

 == Ensembles
 ==
  Ensemble QuorumNodes  Leader

 ---
root   0 / 6 3 / 6  --
 2 3 / 3 3 / 3  riak@104.236.79.78
 3 3 / 3 3 / 3  riak@104.131.130.237
 4 3 / 3 3 / 3  riak@104.131.130.237
 5 3 / 3 3 / 3  riak@104.131.130.237
 6 3 / 3 3 / 3  riak@104.236.79.78
 7 0 / 3 3 / 3  --
 8 0 / 3 3 / 3  --
 9 3 / 3 3 / 3  riak@104.131.130.237
 103 / 3 3 / 3  riak@104.131.130.237
 113 / 3 3 / 3  riak@104.236.79.78

 *Machine 3* (104.131.130.237)

 == Consensus System
 ===
 Enabled: true
 Active:  true
 Ring Ready:  true
 Validation:  strong (trusted majority required)
 Metadata:best-effort replication (asynchronous)

 == Ensembles
 ==
  Ensemble QuorumNodes  Leader

 ---
root   0 / 6 3 / 6  --
 2 0 / 3 3 / 3  --
 3 3 / 3 3 / 3  riak@104.131.130.237
 4 3 / 3 3 / 3  riak@104.131.130.237
 5 3 / 3 3 / 3  riak@104.131.130.237
 6 0 / 3 3 / 3  --
 7 0 / 3 3 / 3  --
 8 0 / 3 3 / 3  --
 9 3 / 3 3 / 3  riak@104.131.130.237
 103 / 3 3 / 3  riak@104.131.130.237
 110 / 3 3 / 3  --

 *Machine 4* (162.243.5.87)

 == Consensus System
 ===
 Enabled: true
 Active:  true
 Ring Ready:  true
 Validation:  strong (trusted majority required)
 Metadata:best-effort replication (asynchronous)

 == Ensembles
 ==
  Ensemble QuorumNodes  Leader

 

Riak Recap - April 17, 2015

2015-04-17 Thread Matthew Brender
Welcome back to The Recap. Here is a summary of what's come over our
user list of late.

## Code drops
There have been a number of big updates of late!

* Riak 2.1 is available for download [1]
* 2.x compliant .NET client [2]
* 2.x compliant Node.js client [3]
* 2.x compliant PHP client [4]


## Recently answered
Here are some interesting topics that came up in the last few weeks.

* A sneaky problem with PackageCloud was resolved thanks to Greg [5]
* Shawn helps out a newer community member by clarifying that Solr is
not a pre-requisite for Riak k/v
* Zeeshan answered a question about Solr tagging [7] and then wrote up
an example using protocol buffers [8]
* Zeeshan confirms we use distributed Solr in Riak Search and are
impacted by this known limitation around distributed joins [9]
* Luke explains how Riak Objects are returned in the Node.js client [10]
* Ciprian outlines inter-node port requirements for clustering [11]
* A known error was confirmed, showing connections drop while using
protocol buffers across a load balancer [12]
* Bryan reminds us of what behavior you see when drives get 100% full [13]
* Hanning solved his own problem AND posted it to Stackoverflow [14]
* Shawn discovered he had an issue with nodename suffix and resolved
it over IRC [15]

## Still open

* Shankar would like some help on sizing his Riak CS cluster [16]
* Question on pre- and post-commit hooks [17]

## For the weekend

You can run through Taste of Riak in Node.js now! It's well worth a
few minutes. [18]



[1] http://docs.basho.com/riak/latest/downloads/
[2] https://github.com/basho/riak-dotnet-client
[3] https://github.com/basho/riak-nodejs-client
[4] https://github.com/basho/riak-php-client#riak-client-for-php
[5] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017004.html
[6] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017031.html
[7] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017038.html
[8] 
https://github.com/basho/yokozuna/pull/479/files#diff-f9f0e102b2a5208f41b2f304ada0ee5cR306
[9] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017038.html
[10] http://basho.github.io/riak-nodejs-client/classes/RiakObject.html
[11] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017052.html
[12] https://github.com/basho/riak_api/issues/88
[13] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017061.html
[14] 
http://stackoverflow.com/questions/29647674/determine-location-of-riakobject-during-conflict-resolution/29648677#29648677
[15] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017068.html
[16] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017020.html
[17] 
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2015-April/017033.html
[18] http://docs.basho.com/riak/latest/dev/taste-of-riak/nodejs/



Thanks for reading!
Matt

Developer Advocate
Basho Technologies
basho.com
twitter.com/mjbrender
ᐧ

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


Re: Node.js client addIndex() and map/reduce questions (Was: Object metadata via NodeJS client)

2015-04-17 Thread Jose G. Quenum
Thanks! Will peruse through these links

Sent from my iPad

On Apr 17, 2015, at 7:15 PM, Luke Bakken lbak...@basho.com wrote:

 1 - when I have several indices to add to an object can I just chain them to 
 the riakObject, ie, call successive addIndex methods to a riakObject?
 
 Source code is available as part of the API docs. Note that this is
 returned, which allows chaining:
 
 http://basho.github.io/riak-nodejs-client/files/lib_commands_kv_riakobject.js.html#l230
 
 2 - when I am doing a map-reduce,
  a - can I use key filters? What's the syntax?
  b - how can I use map reduce to walk links? In riak-js I used to 
 specify the links in the inputs. What is the syntax with this client?
 
 I am not an expert with map/reduce, but did find the following documents:
 
 http://docs.basho.com/riak/latest/dev/using/keyfilters/
 
 http://docs.basho.com/riak/latest/dev/using/link-walking/ (Note
 deprecation notice)
 
 --
 Luke Bakken
 Engineer
 lbak...@basho.com

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


Re: object sizes

2015-04-17 Thread Alex De la rosa
Hi Matthew,

I don't have a github account so seems i'm not able to create the ticket
for this feature, could you do it?

Thanks,
Alex

On Thu, Apr 16, 2015 at 10:08 PM, Alex De la rosa alex.rosa@gmail.com
wrote:

 Hi Matthew,

 Thanks for your answer : ) i always have interesting questions : P

 about point [2]... if you see my examples, i'm already using
 sys.getsizeof()... but sizes are not so accurate, also, I believe that is
 the size they take on RAM when loaded by Python and not the full exact size
 of the object (specially on Maps that differs quite some).

 I will open the ticket then : ) I think it can be very helpful future
 feature.

 Thanks,
 Alex

 On Thu, Apr 16, 2015 at 10:03 PM, Matthew Brender mbren...@basho.com
 wrote:

 Hi Alex,

 That is an interesting question! I haven't seen a request like that in
 our backlog, so feel free to open a new issue [1]. I'm curious: why
 not use something like sys.getsizeof [2]?

 [1] https://github.com/basho/riak-python-client/issues
 [2]
 http://stackoverflow.com/questions/449560/how-do-i-determine-the-size-of-an-object-in-python

 Matt Brender | Developer Advocacy Lead
 Basho Technologies
 t: @mjbrender


 On Mon, Apr 13, 2015 at 7:26 AM, Alex De la rosa
 alex.rosa@gmail.com wrote:
  Hi Bryan,
 
  Thanks for your answer; i don't know how to code in erlang, so all my
 system
  relies on Python.
 
  Following Ciprian's curl suggestion, I tried to compare it with this
 python
  code during the weekend:
 
  Map object:
  curl -I
  1058 bytes
  print sys.getsizeof(obj.value)
  3352 bytes
 
  Standard object:
  curl -I
  9718 bytes
  print sys.getsizeof(obj.encoded_data)
  9755 bytes
 
  The standard object seems pretty accurate in both approaches even the
 image
  binary data was only 5kbs (I assume some overhead here)
 
  The map object is about 3x the difference between curl and getting the
  object via Python.
 
  Not so sure if this is a realistic way to measure their growth (moreover
  because the objects i would need this monitorization are Maps, not
 unaltered
  binary data that I can know the size before storing it).
 
  Would it be possible in some way that the Python get() function would
 return
  something like obj.content-lenght returning the size is currently
 taking?
  that would be a pretty nice feature.
 
  Thanks!
  Alex
 
  On Mon, Apr 13, 2015 at 12:47 PM, bryan hunt bh...@basho.com wrote:
 
  Alex,
 
 
  Maps and Sets are stored just like a regular Riak object, but using a
  particular data structure and object serialization format. As you have
  observed, there is an overhead, and you want to monitor the growth of
 these
  data structures.
 
  It is possible to write a MapReduce map function (in Erlang) which
  retrieves a provided object by type/bucket/id and returns the size of
 it's
  data. Would such a thing be of use?
 
  It would not be hard to write such a module, and I might even have some
  code for doing so if you are interested. There are also reasonably good
  examples in our documentation -
  http://docs.basho.com/riak/latest/dev/advanced/mapreduce
 
  I haven't looked at the Python PB API in a while, but I'm reasonably
  certain it supports the invocation of MapReduce jobs.
 
  Bryan
 
 
  On 10 Apr 2015, at 13:51, Alex De la rosa alex.rosa@gmail.com
 wrote:
 
  Also, I forgot, i'm most interested on bucket_types instead of simple
 riak
  buckets. Being able how my mutable data inside a MAP/SET has grown.
 
  For a traditional standard bucket I can calculate the size of what I'm
  sending before, so Riak won't get data bigger than 1MB. Problem arise
 in
  MAPS/SETS that can grown.
 
  Thanks,
  Alex
 
  On Fri, Apr 10, 2015 at 2:47 PM, Alex De la rosa 
 alex.rosa@gmail.com
  wrote:
 
  Well... using the HTTP Rest API would make no sense when using the PB
  API... would be extremely costly to maintain, also it may include
 some extra
  bytes on the transport.
 
  I would be interested on being able to know the size via Python itself
  using the PB API as I'm doing.
 
  Thanks anyway,
  Alex
 
  On Fri, Apr 10, 2015 at 1:58 PM, Ciprian Manea cipr...@basho.com
 wrote:
 
  Hi Alex,
 
  You can always query the size of a riak object using `curl` and the
 REST
  API:
 
  i.e. curl -I riak-node-ip:8098/buckets/test/keys/demo
 
 
  Regards,
  Ciprian
 
  On Thu, Apr 9, 2015 at 12:11 PM, Alex De la rosa
  alex.rosa@gmail.com wrote:
 
  Hi there,
 
  I'm using the python client (by the way).
 
  obj = RIAK.bucket('my_bucket').get('my_key')
 
  Is there any way to know the actual size of an object stored in
 Riak?
  to make sure something mutable (like a set) didn't added up to more
 than 1MB
  in storage size.
 
  Thanks!
  Alex
 
  ___
  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