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

Lars Hofhansl commented on HBASE-6427:
--------------------------------------

After reviewing all the use cases I have this seems to be best proposal:
* add these
{code}
void postFlush(final ObserverContext<RegionCoprocessorEnvironment> c, final 
Store store, final StoreFile resultFile) throws IOException;
InternalScanner preFlush(final ObserverContext<RegionCoprocessorEnvironment> c, 
final Store store, final InternalScanner scanner) throws IOException;
InternalScanner preFlushScannerOpen(final 
ObserverContext<RegionCoprocessorEnvironment> c, final Store store, final 
KeyValueScanner memstoreScanner, final InternalScanner s) throws IOException;
InternalScanner preCompactScannerOpen(final 
ObserverContext<RegionCoprocessorEnvironment> c, final Store store, List<? 
extends KeyValueScanner> scanners, final ScanType scanType, final long 
earliestPutTs, final InternalScanner s) throws IOException;
KeyValueScanner preStoreScannerOpen(final 
ObserverContext<RegionCoprocessorEnvironment> c, final Store store, final Scan 
scan, final NavigableSet<byte[]> targetCols, final KeyValueScanner s) throws 
IOException;
{code}
* deprecate these:
{code}
void postFlush(final ObserverContext<RegionCoprocessorEnvironment> c) throws 
IOException;
void preFlush(final ObserverContext<RegionCoprocessorEnvironment> c) throws 
IOException;
{code}

The new {pre|post}Flush are called per Store in analogy to {pre|post}Compact.
pre{Flush|Compact}ScannerOpen are called before the flush/compaction scanner is 
built.

This is give maximum flexibility (I can control the reading scanners *and* how 
the storefiles are written for both flushes and compactions), makes more sense 
of {pre|post}Flush and leave existing functionality in place.

This is the first proposal that really "feels" right to me. I'll have a patch 
for that soon.
                
> Pluggable compaction policies via coprocessors
> ----------------------------------------------
>
>                 Key: HBASE-6427
>                 URL: https://issues.apache.org/jira/browse/HBASE-6427
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>            Priority: Minor
>         Attachments: 6427-notReady.txt, 6427-v1.txt, 6427-v2.txt, 
> 6427-v3.txt, 6427-v4.txt, 6427-v5.txt
>
>
> When implementing higher level stores on top of HBase it is necessary to 
> allow dynamic control over how long KVs must be kept around.
> Semi-static config options for ColumnFamilies (# of version or TTL) is not 
> sufficient.
> This can be done with a few additional coprocessor hooks, or by makeing 
> Store.ScanInfo pluggable.
> Was:
> The simplest way to achieve this is to have a pluggable class to determine 
> the smallestReadpoint for Region. That way outside code can control what KVs 
> to retain.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to