[ 
https://issues.apache.org/jira/browse/HBASE-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13078442#comment-13078442
 ] 

Jean-Daniel Cryans commented on HBASE-4155:
-------------------------------------------

Yeah that's an option... and then we deprecate it for the next major version? 
That means we also have to print out in bold letters when people that function 
that it's going to be deprecated... although you might want to print that out 
only once. In any case we need to find a good way to communicate our intent to 
the users.

But now looking the idl I'm starting to think we should just change the 
behavior:

{noformat}
  /** 
   * Get the specified number of versions for the specified table,
   * row, and column.  Only versions less than or equal to the specified
   * timestamp will be returned.
   *
   * @return list of cells for specified row/column
   */
  list<TCell> getVerTs(
...
  /** 
   * Get all the data for the specified table and row at the specified
   * timestamp. Returns an empty list if the row does not exist.
   * 
   * @return TRowResult containing the row and map of columns to TCells
   */
  list<TRowResult> getRowTs(
...
  /** 
   * Get a scanner on the current table starting at the specified row and
   * ending at the last row in the table.  Return the specified columns.
   * Only values with the specified timestamp are returned.
   *
   * @return scanner id to be used with other scanner procedures
   */
  ScannerID scannerOpenTs(
{noformat}

getVerTs has the right documentation, but not scannerOpenTs and getRowTs since 
they also use the TimeRange (but the behavior we want is documented).

> the problem in hbase thrift client when scan/get rows by timestamp
> ------------------------------------------------------------------
>
>                 Key: HBASE-4155
>                 URL: https://issues.apache.org/jira/browse/HBASE-4155
>             Project: HBase
>          Issue Type: Bug
>          Components: thrift
>    Affects Versions: 0.90.0
>            Reporter: zezhou
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> 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?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to