我可以从一个表中获取所有行
curl -H "Accept: application/json" http://localhost:8080/table/*
我可以限制行数
curl -H "Accept: application/json" http://localhost:8080/table/*?limit=10
问题是行总是插入前 10 行而不是最后 10 行。
想弄个反序,特意结合了limit参数。
我知道 setReversed 参数,在 HBase shell 中它工作正常:
scan 'table', {LIMIT => 10, REVERSED=> TRUE}
最佳答案
看起来它没有在旧版本中实现,但补丁可用。
这是相关的JIRA ticket
最终应该是
curl -H "Accept: application/json"http://localhost:8080/table/*?limit=10&reversed=true
关于rest - 如何在 HBase REST curl 中以相反的顺序获取行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36852539/