use riak pre-commit hook to validate json schema

2012-06-14 Thread Paul Scheltema
Helo,

I would like to use a pre-commit hook written in javascript  in riak to
validate the json schema of the data submitted

There are a number of implementations in javascript on json-schema.org

http://json-schema.org/implementations.html

is there a way to load an external library or libraries into riak so i can
use them inside the pre- and post-commit hooks

and preferably also the external schema definition files (or at least load
them from a bucket)

I use clients in multiple languages to submit data to riak, and it would be
ideal if riak could do the validtion of all data submitted.

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


{error,insufficient_vnodes_available}

2012-09-17 Thread Paul Scheltema
recently 2 of the vm's running riak crashed. (probably not due to riak)
When i now run "curl $riak/buckets/$2/keys?keys=true" i get the following
error message:

500 Internal Server
ErrorInternal Server ErrorThe server
encountered an error while processing this
request:{error,{error,{badmatch,{error,insufficient_vnodes_available}},
  [{riak_kv_wm_keylist,produce_bucket_body,2},
   {webmachine_resource,resource_call,3},
   {webmachine_resource,do,3},
   {webmachine_decision_core,resource_call,1},
   {webmachine_decision_core,decision,1},
   {webmachine_decision_core,handle_request,2},
   {webmachine_mochiweb,loop,1},

 {mochiweb_http,parse_headers,5}]}}mochiweb+webmachine
web server

== ring_status
root@03:/usr/local/riak/bin# ./riak-admin ring_status
== Claimant
===
Claimant:  'riak@192.168.122.112'
Status: up
Ring Ready: true

== Ownership Handoff
==
No pending changes.

== Unreachable Nodes
==
All nodes are up and reachable

== ring ready
root@03:/usr/local/riak/bin# ./riak-admin ringready
TRUE All nodes agree on the ring ['riak@192.168.122.111',
  'riak@192.168.122.112',
  'riak@192.168.122.113']

== member status
root@03:/usr/local/riak/bin# ./riak-admin member_status
= Membership
==
Status RingPendingNode
---
valid  34.4%  --  'riak@192.168.122.111'
valid  32.8%  --  'riak@192.168.122.112'
valid  32.8%  --  'riak@192.168.122.113'
---
Valid:3 / Leaving:0 / Exiting:0 / Joining:0 / Down:0

== ulimit:
root@03:/usr/local/riak/etc# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 15584
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 15584
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited



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


Re: {error,insufficient_vnodes_available}

2012-09-17 Thread Paul Scheltema
Thank you for the reply,
adding back the other nodes did (after a while) fix the prblem
even tho the ring stated it was complete some 10 minutes before the actual
query worked again.


2012/9/17 Reid Draper 

> Paul,
>
> It looks like you're running a 3-node cluster. If two of the nodes fail,
> you'll likely
> not be able to run `coverage` queries like 2i and list-keys. If you need
> to be able
> to sustain losing 2 nodes and still successfully run 2i, I'd suggest
> running at least
> a 5 node cluster.
>
> Reid
>
>
> On Sep 17, 2012, at 6:07 AM, Paul Scheltema 
> wrote:
>
> recently 2 of the vm's running riak crashed. (probably not due to riak)
> When i now run "curl $riak/buckets/$2/keys?keys=true" i get the following
> error message:
>
> 500 Internal Server
> ErrorInternal Server ErrorThe server
> encountered an error while processing this
> request:{error,{error,{badmatch,{error,insufficient_vnodes_available}},
>   [{riak_kv_wm_keylist,produce_bucket_body,2},
>{webmachine_resource,resource_call,3},
>{webmachine_resource,do,3},
>{webmachine_decision_core,resource_call,1},
>{webmachine_decision_core,decision,1},
>{webmachine_decision_core,handle_request,2},
>{webmachine_mochiweb,loop,1},
>
>  {mochiweb_http,parse_headers,5}]}}mochiweb+webmachine
> web server
>
> == ring_status
> root@03:/usr/local/riak/bin# ./riak-admin ring_status
> == Claimant
> ===
> Claimant:  'riak@192.168.122.112'
> Status: up
> Ring Ready: true
>
> == Ownership Handoff
> ==
> No pending changes.
>
> == Unreachable Nodes
> ==
> All nodes are up and reachable
>
> == ring ready
> root@03:/usr/local/riak/bin# ./riak-admin ringready
> TRUE All nodes agree on the ring ['riak@192.168.122.111',
>   'riak@192.168.122.112',
>   'riak@192.168.122.113']
>
> == member status
> root@03:/usr/local/riak/bin# ./riak-admin member_status
> = Membership
> ==
> Status RingPendingNode
>
> ---
> valid  34.4%  --  'riak@192.168.122.111'
> valid  32.8%  --  'riak@192.168.122.112'
> valid  32.8%  --  'riak@192.168.122.113'
>
> ---
> Valid:3 / Leaving:0 / Exiting:0 / Joining:0 / Down:0
>
> == ulimit:
> root@03:/usr/local/riak/etc# ulimit -a
> core file size  (blocks, -c) 0
> data seg size   (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size   (blocks, -f) unlimited
> pending signals (-i) 15584
> max locked memory   (kbytes, -l) 64
> max memory size (kbytes, -m) unlimited
> open files  (-n) 1024
> pipe size(512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority  (-r) 0
> stack size  (kbytes, -s) 8192
> cpu time   (seconds, -t) unlimited
> max user processes  (-u) 15584
> virtual memory  (kbytes, -v) unlimited
> file locks  (-x) unlimited
>
>
>
> --
> groeten
> /paul
>
>  ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
>


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