如何在 HBase REST curl 中以相反的顺序获取行
How to get rows in reversed order in HBase REST curl
我可以使用
从 table 中获取所有行
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
我可以使用
从 table 中获取所有行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