HBase REST/Stargate 放
HBase REST/Stargate PUT
运行 HBase 1.1.0.1 独立,访问 Stargate API 并且能够创建具有两列 'c' 和 'd' 的 table。我目前正在尝试使用以下 curl 命令插入一列。 returns 400 Bad Request 日志中没有任何解释。
我都试过了http://localhost:8080/table1/row1 & http://localhost:8080/table1/row1/c
格式化JSON来自问题HBase
的评论部分
curl -v -X PUT -H "Content-Type: application/json" -H "Accept: application/json" 'http://localhost:8080/table1/row1' --data '{"Row":[{"key" :"cm93MQ==", "Cell":[{"column":"Yw==", "$":"dmFsdWU="}]}]}'
有人可以帮助解决我在上述请求中遗漏的问题吗?
在您的 Json 中,您只提到了列族 ('c') 而不是限定符..
table1 是 table 名称。row1 是行键。c 是列族。列名是什么?
使用 base64 对 c:columnname 进行编码,然后在 json.. 的列字段中使用它
希望这对您有所帮助!
运行 HBase 1.1.0.1 独立,访问 Stargate API 并且能够创建具有两列 'c' 和 'd' 的 table。我目前正在尝试使用以下 curl 命令插入一列。 returns 400 Bad Request 日志中没有任何解释。
我都试过了http://localhost:8080/table1/row1 & http://localhost:8080/table1/row1/c
格式化JSON来自问题HBase
的评论部分curl -v -X PUT -H "Content-Type: application/json" -H "Accept: application/json" 'http://localhost:8080/table1/row1' --data '{"Row":[{"key" :"cm93MQ==", "Cell":[{"column":"Yw==", "$":"dmFsdWU="}]}]}'
有人可以帮助解决我在上述请求中遗漏的问题吗?
在您的 Json 中,您只提到了列族 ('c') 而不是限定符..
table1 是 table 名称。row1 是行键。c 是列族。列名是什么? 使用 base64 对 c:columnname 进行编码,然后在 json.. 的列字段中使用它 希望这对您有所帮助!