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

the problem in hbase thrift client when scan/get rows by timestamp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 0.90.0
    • None
    • Thrift

    Description

      I want to scan rows by specified timestamp. I use following hbase shell command :

      scan 'testcrawl',

      {TIMESTAMP=>1312268202071}


      ROW COLUMN+CELL
      put1.com column=crawl:data, timestamp=1312268202071, value=<html>put1</html>
      put1.com column=crawl:type, timestamp=1312268202071, value=html
      put1.com column=links:outlinks, timestamp=1312268202071, value=www.163.com;www.sina.com

      As I expected, I can get the rows which timestamp is 1312268202071.
      But when I use thift client to do the same thing ,the return data is the rows which time before specified timestamp , not the same as hbase shell.following is timestamp of return data:

      1312179170000
      1312268202059

      I look up the source in hbase/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java, it use following code to set time parameter .

      scan.setTimeRange(Long.MIN_VALUE, timestamp);

      This cause thrift client return rows before specified row ,not the rows timestamp specified.
      But in hbase client and avro client ,it use following code to set time parameter.

      scan.setTimeStamp(timestamp);

      this will return rows timestamp specified.

      Is this a feature or a bug in thrift client ?
      if this is a feature, which method in thrift client can get the rows by specified timestamp?

      Attachments

        1. 4155.txt
          2 kB
          Ted Yu
        2. patch.txt
          2 kB
          zezhou
        3. patch.txt.svn
          2 kB
          zezhou

        Activity

          People

            Unassigned Unassigned
            zezhou zezhou
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified