Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1292

php thrift's getRow() would throw an exception if the row does not exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.19.0, 0.19.1
    • 0.19.2, 0.20.0
    • Thrift
    • None
    • Incompatible change
    • thrift's getRow*() now throws NotFound if the row key does not exist

    Description

      I've been played with thrift recently, and observed an unexpected behavior: when getRow() encounters an non-existent row key, it throws an exception like this:

      PHP Fatal error: Uncaught exception 'Exception' with message 'getRow failed: unknown result' in pear/thrift/packages/Hbase/Hbase.php:715

      Stack trace:
      #0 pear/thrift/packages/Hbase/Hbase.php(666): HbaseClient->recv_getRow()
      #1 htdocs/hbase/DemoClient.php(174): HbaseClient->getRow('demo_table', '00100-XXXX')
      #2

      {main}

      thrown in pear/thrift/packages/Hbase/Hbase.php on line 715

      I would expect when we pass a non-existent key, it can throw something like NotFound (as in scanner) or one can test with RowResult.isEmpty() just like in java api.

      Attachments

        1. 1292-0.19.patch
          24 kB
          Rong-En Fan
        2. 1292.patch
          24 kB
          Rong-En Fan

        Issue Links

          Activity

            People

              rafan Rong-En Fan
              rafan Rong-En Fan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: