我知道如何使用命令行列出所有存储桶类型。参考http://stackoverflow.com/questions/30785431/how-to-list-all-the-bucket-types-in-riak
但我需要使用HTTP调用
答案 0 :(得分:1)
目前无法通过HTTP列出存储桶类型。我可以提出两个选择:
riak-admin bucket-types list
命令包装在一个简单的Web服务中,并通过HTTP公开。curl -X GET http://127.0.0.1:9000/explore/clusters/default/bucket_types
应该为您提供类似{ "bucket_types": [{ "id": "default", "props": { "active": true, "allow_mult": true, "basic_quorum": false, "big_vclock": 50, "chash_keyfun": "{riak_core_util,chash_std_keyfun}", "dvv_enabled": false, "dw": "quorum", "last_write_wins": false, "linkfun": "{modfun,riak_kv_wm_link_walker,mapreduce_linkfun}", "n_val": 3, "notfound_ok": true, "old_vclock": 86400, "postcommit": [], "pr": 0, "precommit": [], "pw": 0, "r": "quorum", "rw": "quorum", "small_vclock": 50, "w": "quorum", "write_once": false, "young_vclock": 20 } }], "links": { "self": "/explore/clusters/default/bucket_types" } }