Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the riak store create bucket types in create_schema #145

Closed
igaray opened this issue Apr 27, 2015 · 7 comments
Closed

Have the riak store create bucket types in create_schema #145

igaray opened this issue Apr 27, 2015 · 7 comments

Comments

@igaray
Copy link
Member

igaray commented Apr 27, 2015

Currently the riak store create_schema does not fulfill its responsibility of preparing the storage for the data. The bucket type creation and activation, index creation and association to the bucket must be done manually through the riak-admin command and riak's REST API.

It would be preferable to handle this automatically, possibly tuning it via create_schema option parameters.

@jonasrichard
Copy link

Here you can find the riak-admin features:
riak_core_console
Unfortunately I don't know where Riak handles REST api, how they work, who can register to webmachine, etc.
Let me ask Basho if they accept pull requests (to documentation as well). If it works and add valuable features I think they are willing to merge.

@jfacorro
Copy link
Contributor

What I found when I looked at this is that the riak erlang client doesn't provide an API call to create bucket types because the Riak API doesn't provide one.

The riak-admin tool is built on a set of scripts that ends up making an rpc:call/3 to the riak_kv_console:bucket_type_create/2 function in the local Riak node. As far as I could tell this is not exposed anywhere through the Riak API (either HTTP or ProtoBuff) which makes it hard to create buckets types and buckets 😞.

@lixen
Copy link

lixen commented May 27, 2015

Created a branch with create and activate bucket type API over PB.

git clone https://github.com/lixen/riak
git checkout bucket_types
make stagedevrel DEVNODES=1
./dev/dev1/bin/riak start

git clone https://github.com/lixen/riak-erlang-client
git checkout bucket_types
[email protected] RIAK_TEST_PBC_1=10017 make test

riakc_pb_socket:create_bucket_type(Pid, BucketType, BucketProps)
riakc_pb_socket:activate_bucket_type(Pid, BucketType)

@elbrujohalcon
Copy link
Member

@lixen have you sent PRs with that to Basho?

@lixen
Copy link

lixen commented May 27, 2015

@elbrujohalcon I started with the riak-erlang-client. Do you have any requirement on Riak version where you would like this functionality?

@igaray
Copy link
Member Author

igaray commented May 27, 2015

We're currently using 2.0.5

@cabol
Copy link
Contributor

cabol commented Mar 28, 2017

This issue was moved to the specific Riak adapter repo HERE

@cabol cabol closed this as completed Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants