[
https://issues.apache.org/jira/browse/HBASE-6427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424367#comment-13424367
]
Zhihong Ted Yu commented on HBASE-6427:
---------------------------------------
{code}
+ scanner = ((RegionObserver) env.getInstance()).preCompact(ctx,
store, scanners,
+ scanType, earliestPutTs);
{code}
Maybe insert the returned scanner (if not null) into scanners ?
{code}
+ * @deprecated use {@link #preCompact(ObserverContext, Store, List,
ScanType, long)} instead
*/
InternalScanner preCompact(final
ObserverContext<RegionCoprocessorEnvironment> c,
final Store store, final InternalScanner scanner) throws IOException;
{code}
Do we have to deprecate the existing API ? I feel the new API is much more
involved in terms of technical internals. Maybe a poll on user mailing list
would help clarify.
{code}
+ * @param scanners the list {@link StoreFileScanner}s to be read from
...
+ InternalScanner preCompact(final
ObserverContext<RegionCoprocessorEnvironment> c,
+ final Store store, List<? extends KeyValueScanner> scanners, ScanType
scanType, long earliestPutTs)
{code}
nit: the second line above is over 100 characters.
If scanners really should be StoreFileScanner's, method signature should match
expectation.
See the following in RegionCoprocessorHost.java:
{code}
+ * See {@link RegionObserver#preCompact(ObserverContext, Store,
InternalScanner)}
+ */
+ public InternalScanner preCompact(Store store, List<StoreFileScanner>
scanners,
+ ScanType scanType, long earliestPutTs) throws IOException {
{code}
Review board would facilitate more detailed review.
> 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