Hi Mav,
I opened the following issue to continue investigation:
https://github.com/basho/riak_kv/issues/1541
That would be the best place to continue discussion. I'll find time to
reproduce what you have reported.
Thanks -
--
Luke Bakken
Engineer
lbak...@basho.com
On Fri, Nov 18, 2016 at 4:57
No luck :(
I set up a bucket type called test-bucket-type. I did NOT set data type.
I set the hooks
Ran your curl -X PUT. The Hook was not called. Tried several times, no luck
I changed the curl to hit my non-typed bucket, and the commit hook hit
$ riak-admin bucket-type list
default (active)
tes
Thanks for correcting that. Everything looks set up correctly.
How are you saving objects? If you're using HTTP, what is the URL?
Can you associate your precommit hook with a bucket type
("test-bucket-type" below) that is *not* set up for the "map" data
type and see if your hook is called correct
Here you go ...
For the second url - I think you meant testbucket without the hyphen, Also
I think you have an extra "props" in there
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8098 (#0)
> GET /types/maps/props HTTP/1.1
> User-Agent
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 wrote:
> Luke
>
> I was able to change the properties with your URL, but still the hooks are
> not bei
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"
Hi Luke
I tried that and didn't work for a bucket with bucket type = maps. My
erlang code below does work for buckets without types.
But I think its because I didn't set the hook for the typed bucket
correctly.Could you check my curl below, please ?
I did this to set the hook
curl -X PUT localho
Mav -
Please remember to use "Reply All" so that the riak-users list can
learn from what you find out. Thanks.
Thebucket = riak_object:bucket(Object),
Can you check to see if "Thebucket" is really a two-tuple of
"{BucketType, Bucket}"? I believe that is what is returned.
--
Luke Bakken
Engineer
Mav -
Can you go into more detail? The subject of your message is
"initializing a commit hook".
--
Luke Bakken
Engineer
lbak...@basho.com
On Thu, Nov 17, 2016 at 9:09 AM, Mav erick wrote:
> Folks
>
> Is there way RIAK can call an erlang function in a module when RIAK starts
> up ?
>
> Thanks
>