You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Anoop Sam John (JIRA)" <ji...@apache.org> on 2015/10/28 06:24:27 UTC

[jira] [Comment Edited] (HBASE-14355) Scan different TimeRange for each column family

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

Anoop Sam John edited comment on HBASE-14355 at 10/28/15 5:23 AM:
------------------------------------------------------------------

Some comments
- The Map for cf vs TimeRange is repeated in Scan and Get.. We can keep it in Query. Add setter and getter there.  We need overloaded setters definition in Scan and Get.(For eg: see Query#setFilter and Scan#setFilter etc)
- In copy constructors of Get and Scan, just copying the reference. This should be avoided.  See how we handle family map and recreate it for the new Object
- Need to handle it in constructor Scan(Get get)
- {quote}byte[] cf = Bytes.toBytes(store.getColumnFamilyName());{quote}     You can see call to getColumnFamilyName will convert the byte[] name into a string and here we will convert it again to byte[].  Unwanted ops. U can use store.getFamily ().getName ()


was (Author: anoop.hbase):
Some comments
- The Map for cf vs TimeRange is repeated in Scan and Get.. We can keep it in Query. Add setter and getter there.  We need overloaded setters definition in Scan and Get.(For eg: see Query#setFilter and Scan#setFilter etc)
- In copy constructors of Get and Scan, just copying the reference. This should be avoided.  See how we handle family map and recreate it for the new Object
- Need to handle it in constructor Scan(Get get)
- bq.byte[] cf = Bytes.toBytes(store.getColumnFamilyName());     You can see call to getColumnFamilyName will convert the byte[] name into a string and here we will convert it again to byte[].  Unwanted ops. U can use store.getFamily ().getName ()

> Scan different TimeRange for each column family
> -----------------------------------------------
>
>                 Key: HBASE-14355
>                 URL: https://issues.apache.org/jira/browse/HBASE-14355
>             Project: HBase
>          Issue Type: New Feature
>          Components: Client, regionserver, Scanners
>            Reporter: Dave Latham
>            Assignee: churro morales
>             Fix For: 2.0.0, 1.3.0, 0.98.16
>
>         Attachments: HBASE-14355-v1.patch, HBASE-14355-v2.patch, HBASE-14355-v3.patch, HBASE-14355-v4.patch, HBASE-14355.patch
>
>
> At present the Scan API supports only table level time range. We have specific use cases that will benefit from per column family time range. (See background discussion at https://mail-archives.apache.org/mod_mbox/hbase-user/201508.mbox/%3CCAA4mzom00ef5eoXStK0HEtxebY8mQSs61GBVGttgpASpmhQHaw@mail.gmail.com%3E)
> There are a couple of choices that would be good to validate.  First - how to update the Scan API to support family and table level updates.  One proposal would be to add Scan.setTimeRange(byte family, long minTime, long maxTime), then store it in a Map<byte[], TimeRange>.  When executing the scan, if a family has a specified TimeRange, then use it, otherwise fall back to using the table level TimeRange.  Clients using the new API against old region servers would not get the families correctly filterd.  Old clients sending scans to new region servers would work correctly.
> The other question is how to get StoreFileScanner.shouldUseScanner to match up the proper family and time range.  It has the Scan available but doesn't currently have available which family it is a part of.  One option would be to try to pass down the column family in each constructor path.  Another would be to instead alter shouldUseScanner to pass down the specific TimeRange to use (similar to how it currently passes down the columns to use which also appears to be a workaround for not having the family available). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)