我知道如何使用命令行列出所有存储桶类型。参考 http://stackoverflow.com/questions/30785431/how-to-list-all-the-bucket-types-in-riak
但我需要使用 HTTP 调用
目前无法通过 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”:“默认”,
“道具”: {
“活跃”:是的,
“allow_mult”:是的,
“基本法定人数”:假,
“big_vclock”:50,
"chash_keyfun": "{riak_core_util,chash_std_keyfun}",
“dvv_enabled”:假,
“dw”:“法定人数”,
“last_write_wins”:假,
"linkfun": "{modfun,riak_kv_wm_link_walker,mapreduce_linkfun}",
“n_val”:3,
“notfound_ok”:是的,
“old_vclock”:86400,
“提交后”:[],
“公关”:0,
“预提交”:[],
“pw”:0,
“r”:“法定人数”,
“rw”:“法定人数”,
“small_vclock”:50,
“w”:“法定人数”,
“write_once”:假,
“young_vclock”:20
}
}],
“链接”:{
"self": "/explore/clusters/default/bucket_types"
}
}