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

David Alves commented on HBASE-581:
-----------------------------------

Some thoughts before I submit the patch:
TIF should support filters
extensions of TIF might not need to get the columns, and table name from 
jobConf exactly like current tif does

In light of this I extracted an abstract class that supports filters from 
tableinputformat (which still exists and has the same API).
Subclasses just have to provide the table and the input columns (and optionally 
the rowFilter).
Also table record reader was altered to be extensible and tif chaged to support 
other tablerecordreaders
finally in order to sublass the tif to add for example a filter one just has to 
do the following:

[code]

class myTIFSubClass {

@Override
public void configure(JobConf job) {
       Text myTableName = ...;
       Text[] myCols = ....;
       RowFilterInterface myFilter = ...;
       super.setHTable(new HTable(new HBaseConfiguration(job), new Text(
                    myTableName))
        super.setInputColumns(myCols);
        super.setRowFilter(myFilter);
    }

}
[/code]

what do you think? shall I submit the patch?

> Allow adding filters to TableInputFormat (At same time, ensure TIF and TOF 
> are subclassable)
> --------------------------------------------------------------------------------------------
>
>                 Key: HBASE-581
>                 URL: https://issues.apache.org/jira/browse/HBASE-581
>             Project: Hadoop HBase
>          Issue Type: Improvement
>            Reporter: stack
>            Priority: Critical
>             Fix For: 0.2.0
>
>         Attachments: tif-0.patch, tif-v2.patch, tif-v3.patch, tif-v4.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to