Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0728A83FD for ; Thu, 1 Sep 2011 05:18:50 +0000 (UTC) Received: (qmail 97749 invoked by uid 500); 1 Sep 2011 05:18:49 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 97143 invoked by uid 500); 1 Sep 2011 05:18:38 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 97115 invoked by uid 99); 1 Sep 2011 05:18:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 05:18:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2011 05:18:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9DF8344263 for ; Thu, 1 Sep 2011 05:18:12 +0000 (UTC) Date: Thu, 1 Sep 2011 05:18:12 +0000 (UTC) From: "jiraposter@reviews.apache.org (JIRA)" To: issues@hbase.apache.org Message-ID: <78486976.5753.1314854292643.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1468071729.14363.1304282523140.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-3842) Refactor Coprocessor Compaction API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-3842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095124#comment-13095124 ] jiraposter@reviews.apache.org commented on HBASE-3842: ------------------------------------------------------ ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1686/#review1714 ----------------------------------------------------------- Ship it! API looks good to me. Ship it. src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java Nice doc. - Michael On 2011-09-01 02:35:36, Gary Helmling wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/1686/ bq. ----------------------------------------------------------- bq. bq. (Updated 2011-09-01 02:35:36) bq. bq. bq. Review request for hbase. bq. bq. bq. Summary bq. ------- bq. bq. This patch adds two new hooks to wrap the selection process for store files to compact: bq. bq. void preCompactSelection(final ObserverContext c, bq. final Store store, final List candidates); bq. bq. void postCompactSelection(final ObserverContext c, bq. final Store store, final ImmutableList selected); bq. bq. In addition, the existing preCompact and postCompact methods have been refactored as described in JIRA: bq. bq. InternalScanner preCompact(final ObserverContext c, bq. final Store store, final InternalScanner scanner); bq. bq. void postCompact(final ObserverContext c, bq. final Store store, StoreFile resultFile); bq. bq. Coprocessors that wish to override compaction behavior can wrap the provided InternalScanner in preCompact and return their own implementation. They can then apply custom policy on the fly before returning KeyValues from the scanner. Alternately, the coprocessor could set the "bypass" flag in preCompact, which will skip the normal process of writing out a new store file. In this case, the coprocessor is indicating that it will handle the store file writing itself. Once the coprocessor has written a new store file, it will need to explicitly tell the Store instance to load it using bulkLoadHFile(). bq. bq. bq. This addresses bug HBASE-3842. bq. https://issues.apache.org/jira/browse/HBASE-3842 bq. bq. bq. Diffs bq. ----- bq. bq. src/main/java/org/apache/hadoop/hbase/coprocessor/BaseRegionObserver.java d473ba7 bq. src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java 008d027 bq. src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 30c9d69 bq. src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java 53645ce bq. src/main/java/org/apache/hadoop/hbase/regionserver/Store.java 655db7d bq. src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java c0b7267 bq. src/test/java/org/apache/hadoop/hbase/coprocessor/TestClassLoading.java c2af6a1 bq. src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java a8edb42 bq. src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java b370ff0 bq. bq. Diff: https://reviews.apache.org/r/1686/diff bq. bq. bq. Testing bq. ------- bq. bq. Added a new test case -- TestRegionObserverInterface#testCompactionOverride -- to verify custom compaction handling using an InternalScanner implementation. bq. bq. All additional coprocessor related tests pass. bq. bq. bq. Thanks, bq. bq. Gary bq. bq. > Refactor Coprocessor Compaction API > ----------------------------------- > > Key: HBASE-3842 > URL: https://issues.apache.org/jira/browse/HBASE-3842 > Project: HBase > Issue Type: Improvement > Components: coprocessors, regionserver > Affects Versions: 0.92.0 > Reporter: Nicolas Spiegelberg > Assignee: Gary Helmling > Priority: Critical > Labels: compaction > Fix For: 0.92.0 > > > After HBASE-3797, the compaction logic flow has been significantly altered. Because of this, the current compaction coprocessor API is insufficient for gaining full insight into compaction requests/results. Refactor coprocessor API after HBASE-3797 is committed to be more extensible and increase visibility. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira