【问题标题】:How to get rows in reversed order in HBase REST curl如何在 HBase REST curl 中以相反的顺序获取行
【发布时间】:2016-08-19 13:12:37
【问题描述】:

我可以从一个表中获取所有行

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}

【问题讨论】:

    标签: rest hadoop hbase stargate nosql


    【解决方案1】:

    看起来它没有在旧版本中实现,但补丁可用。

    这里是相关的JIRA ticket

    最终应该是

    curl -H "Accept: application/json" http://localhost:8080/table/*?limit=10&reversed=true

    【讨论】:

      猜你喜欢
      • 2021-10-13
      • 2012-11-29
      • 1970-01-01
      • 1970-01-01
      • 2018-10-05
      • 2022-01-06
      • 1970-01-01
      • 1970-01-01
      • 2013-05-18
      相关资源
      最近更新 更多