gpt4 book ai didi

hadoop - 如何通过 StarGate REST API 向 HBase 中插入数据

转载 作者:可可西里 更新时间:2023-11-01 15:18:42 24 4
gpt4 key购买 nike

根据 StarGate 文档,CURL 命令应该如下所示:

% curl -H "Content-Type: text/xml" --data '[...]' http://localhost:8000/test/testrow/test:testcolumn

这就是我正在尝试的:

% curl -X POST -H "Accept: text/xml" --data '[<CellSet><Row key="cm93MQ=="><Cell column="dGl0bGU6YQ==">d29ya2Vk</Cell></Row></CellSet>]' http://localhost:8080/test/row1/title

不断收到 HTTP 415,不支持的媒体类型.. 知道我在那里遗漏了什么吗?

最佳答案

您当前的 curl 选项指定您想要 XML 输出,并且 curl 假设您正在发布 url 编码的表单数据(并在 HTTP header 中指定了错误的 Content-Type)。

修改你的 -H "Accept: text/xml"-H "Content-Type: text/xml" 你应该是好的

关于hadoop - 如何通过 StarGate REST API 向 HBase 中插入数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10920890/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com