[ 
https://issues.apache.org/jira/browse/HBASE-5616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack updated HBASE-5616:
-------------------------

    Attachment: 5616v3.txt

Introduces a standalone CompactionTool.  Can call it from its main
and have it run compactions on arbitrary storefiles.  Compaction code
is moved out of Store into this new class.

CompactionTool needs a Store and a mocked up Region to run because
compacting uses a StoreScanner (A StoreScanner needs a Store.  A
Store needs an HRegion).  Rather than expect to be passed a coherent
HRegion pointer, instead, we fake up one using Mockito (this means
Mockito is no longer just a test dependency).

I tried to break out of HRegion a "Region" Interface.  This Region Interface
would have a basic subset of HRegion functionality and we'd pass this
instead of HRegion to SplitTransaction, Store, CompactionRequest, etc.
but the change would be massive.  Everything expects to be able to do
anything on an HRegion.   This is work we need to do but I"m not doing
it as part of this patch.

M src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
  Use new CompactionTool instead of asking Store directly to compact.
M src/main/java/org/apache/hadoop/hbase/util/ChecksumType.java
  Formatting.
M src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
  Format the log message so properly spaced.
A src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java
  New compactiontool.  Runs all compactions.
M src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
  Make getOpenAndCloseThreadPool static.
M src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
  Move compaction code out to CompactionTool.
  Refactor so can override ttl and Store home directory so Store
  is more mockable; can now stand up a Store on its own w/o real
  HRegion context.
M src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
  Formatting.
M pom.xml
  Need mockito at runtime now too.
                
> Make compaction code standalone
> -------------------------------
>
>                 Key: HBASE-5616
>                 URL: https://issues.apache.org/jira/browse/HBASE-5616
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: stack
>         Attachments: 5616.txt, 5616v3.txt, standalone.txt
>
>
> This is part of hbase-2462.  Make the compaction code standalone so can run 
> it independent of hbase.  Will make it easier to profile and try stuff out.

--
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