diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/rest/package.html hbase-server/src/main/java/org/apache/hadoop/hbase/rest/package.html index 2301a43..c21e129 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/rest/package.html +++ hbase-server/src/main/java/org/apache/hadoop/hbase/rest/package.html @@ -52,6 +52,7 @@ This package provides a RESTful Web service front end for HBase.
  • Scanner Creation
  • Scanner Get Next
  • Scanner Deletion
  • +
  • Stateless scanner
  • XML Schema
  • Protobufs Schema
  • @@ -1184,6 +1185,222 @@ Content-Length: 0

    + +

    Stateless Scanner

    + +
    +    GET /<table>/<optional_row_prefix>*?<scan_parameters>
    +
    +

    + The current scanner API expects clients to restart scans if there is a REST server failure in the + midst. The stateless does not store any state related to scan operation and all the parameters + are specified as query parameters. +

    +

    + The following are the scan parameters +

      +
    1. startrow - The start row for the scan.
    2. +
    3. endrow - The end row for the scan.
    4. +
    5. columns - The columns to scan.
    6. +
    7. starttime, endtime - To only retrieve columns within a specific range of version timestamps, + both start and end time must be specified.
    8. +
    9. maxversions - To limit the number of versions of each column to be returned.
    10. +
    11. batchsize - To limit the maximum number of values returned for each call to next().
    12. +
    13. limit - The number of rows to return in the scan operation.
    14. +
    +

    +

    + More on start row, end row and limit parameters. +

      +
    1. If start row, end row and limit not specified, then the whole table will be scanned.
    2. +
    3. If start row and limit (say N) is specified, then the scan operation will return N rows from + the start row specified.
    4. +
    5. If only limit parameter is specified, then the scan operation will return N rows from the + start of the table.
    6. +
    7. If limit and end row are specified, then the scan operation will return N rows from start + of table till the end row. If the end row is reached before N rows ( say M and M < N ), + then M rows will be returned to the user.
    8. +
    9. If start row, end row and limit (say N ) are specified and N < number of rows between + start row and end row, then N rows from start row will be returned to the user. If N > + (number of rows between start row and end row (say M), then M number of rows will be returned + to the user.
    10. +
    +

    +

    Examples

    +

    +

    +
    +Lets say we have a table with name "ExampleScanner". On Hbase shell,
    +>> scan 'ExampleScanner'
    +
    +ROW COLUMN+CELL
    +testrow1 column=a:1, timestamp=1389900769772, value=testvalue-a1
    +testrow1 column=b:1, timestamp=1389900780536, value=testvalue-b1
    +testrow2 column=a:1, timestamp=1389900823877, value=testvalue-a2
    +testrow2 column=b:1, timestamp=1389900818233, value=testvalue-b2
    +testrow3 column=a:1, timestamp=1389900847336, value=testvalue-a3
    +testrow3 column=b:1, timestamp=1389900856845, value=testvalue-b3
    +
    + +
    +

    +

    XML Schema