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

Andrew Purtell commented on HBASE-22385:
----------------------------------------

bq. In fact this could be a generalization for the various HFiles we have: 
(Normal) HFiles, HFileLinks, HalfStoreFiles, etc.

Yes, this could be useful.

[~ndimiduk] I think the idea is there would be an additional field in the HFile 
trailer containing a classname that identifies what knows how to handle the 
file internals. This would need to be known at read time in order to parse the 
file bits other than the trailer. Such instantiated reader classes include 
shipped reader classes for data file, link file, "half" files during splits, 
and then potentially a universe of custom implementations that does who knows 
what but who cares as long as the class can be instantiated and doesn't throw 
errors. 

> Consider "programmatic" HFiles
> ------------------------------
>
>                 Key: HBASE-22385
>                 URL: https://issues.apache.org/jira/browse/HBASE-22385
>             Project: HBase
>          Issue Type: Brainstorming
>            Reporter: Lars Hofhansl
>            Priority: Major
>
> For various use cases (among others there is mass deletes) it would be great 
> if HBase had a mechanism for programmatic HFiles. I.e. HFiles (Reader) that 
> produce KeyValues just like any other old HFile, but the key values produced 
> are generated or produced by some other means rather than being physically 
> read from some storage medium.
> In fact this could be a generalization for the various HFiles we have: 
> (Normal) HFiles, HFileLinks, HalfStoreFiles, etc.
> A simple way could be to allow for storing a classname into the HFile. Upon 
> reading the HFile HBase would instantiate an instance of that class and that 
> instance is responsible for all further interaction with that HFile. For 
> normal HFiles it would just be the normal HFileReaderVx. For that we'd also 
> need to StoreFile.Reader into an interface (or a more basic base class) that 
> can be properly implemented.
> (Remember this is Brainstorming :) )



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to