Initializing a commit hook

Luke Bakken lbakken at basho.com
Fri Nov 18 17:23:11 EST 2016


What is the output of these commands?

curl -4vvv localhost:8098/types/maps/props

curl -4vvv localhost:8098/types/maps/props/buckets/test-bucket/props

On Fri, Nov 18, 2016 at 2:21 PM, Mav erick <mav4001 at gmail.com> wrote:
> Luke
>
> I was able to change the properties with your URL, but still the hooks are
> not being called for typed buckets ONLY.
>
> The hook is being called for all buckets with no type. So I am sure that
> riak can find the beam file on all my nodes.
>
> I tried restarting riak on all nodes. Still same problem. The hook is called
> for buckets without a type, but wont be called for buckets with a type
>
>
> On 18 November 2016 at 16:45, Luke Bakken <lbakken at basho.com> wrote:
>>
>> Mav -
>>
>> You're not using the correct HTTP URL. You can use this command:
>>
>>
>> http://docs.basho.com/riak/kv/2.1.4/using/reference/bucket-types/#updating-a-bucket-type
>>
>> Or this URL:
>>
>> curl -XPUT localhost:8098/types/maps/props -H 'Content-Type:
>> application/json' -d
>> '{"props":{"precommit":[{"mod":"myhooks","fun":"precommit_hook"}]}}'
>>
>> Please ensure that the "myhooks" beam file is on all Riak servers in a
>> directory that will be picked up by Riak when it starts:
>>
>> http://docs.basho.com/riak/kv/2.1.4/using/reference/custom-code/
>>
>> --
>> Luke Bakken
>> Engineer
>> lbakken at basho.com




More information about the riak-users mailing list