0

首先,我很确定 riak 使用以下命令设置正常:riak-admin status

但我不能放入桶测试:

curl -v -X PUT -d 'This is really cool' -H "Content-Type: text/plain" http://markson.hk:8098/buckets/test/1234

< HTTP/1.1 404 Object Not Found
< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)
< Date: Fri, 18 Nov 2011 12:13:03 GMT
< Content-Type: text/html
< Content-Length: 193

错误是由于新桶测试引起的吗?我应该先创建它吗?

4

1 回答 1

0

看一下Basic Riak API Operations,基本的 PUT 请求是这样的:

PUT /riak/bucket/key

因此,您的 curl 示例应类似于:

curl -v -X PUT -d 'The is so cool' -H "Content-Type: text/plain" http://markson.hk:8098/riak/test/1234

但是话又说回来,似乎有人已经为您存放了测试密钥:

在此处输入图像描述

于 2011-11-22T04:42:18.780 回答