How to deactivate or delete bucket type in Riak?

/home/khorkak> sudo riak-admin bucket-type Usage: riak-admin bucket-type <command> The follow commands can be used to manage bucket types for the cluster: list List all bucket types and their activation status status <type> Display the status and properties of a type activate <type> Activate a type create <type> <json> Create or modify a type before activation update <type> <json> Update a type after activation /home/khorkak> 

Well, I have a set of bucket types that I created by trying some of what I no longer want - can I get rid of them without reinstalling Riak?

+7
riak
source share
2 answers

Unfortunately, there is currently no documented way to remove unused bucket types in Riak.

If you do not want to delete all data in Riak, you can stop Riak, delete the contents of the data directory and restart Riak. (If you have more than one node, you will need to stop each node and delete the data directory for each before restarting the nodes.)

If you delete only data in Bitcask or LevelDB data directories, bucket-type metadata will still exist in the ring.

+6
source share

You can delete one bucket in Riak by iterating over all keys in the bucket (or only all keys) and performing a delete operation on all keys. It is excessively expensive to use in production and slows down overall.

Depending on which server you are using, you can instead delete keys directly in the background. I successfully managed leveldb on a production system. This means that Riak needs to be stopped, but this is usually not a problem, since deletion can be done in a node, so only one node should be stopped at any time.

In our case, it was pretty fast (compared to deleting keys one by one). This was not supported in any way by Basho or an official, but we had no choice. My contact information is available in my profile if you need more information.

0
source share

All Articles