[
https://issues.apache.org/jira/browse/HBASE-5616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236819#comment-13236819
]
[email protected] commented on HBASE-5616:
------------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4469/#review6293
-----------------------------------------------------------
CompactionTool is a cool idea.
It's early, so I don't follow completely why this required moving the
compaction code into a separate class, especially because you need an instance
of a store to run its methods.
src/main/java/org/apache/hadoop/hbase/regionserver/Compactor.java
<https://reviews.apache.org/r/4469/#comment13643>
If you need to pass in an instance of Store, what is the advantage?
Could also make it a public static helper method.
src/test/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java
<https://reviews.apache.org/r/4469/#comment13645>
That would have been possible before separating the compaction code out,
right?
- Lars
On 2012-03-23 17:02:01, Michael Stack wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/4469/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-03-23 17:02:01)
bq.
bq.
bq. Review request for hbase.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. Introduces a standalone CompactionTool under src/test. Can call it from
its main
bq. and have it run compactions on arbitrary storefiles.
bq.
bq. Compaction code is moved out of Store into a new Compactor class.
bq.
bq. CompactionTool needs a Store and a mocked up Region to run because
bq. compacting uses a StoreScanner (A StoreScanner needs a Store. A
bq. Store needs an HRegion). Rather than expect to be passed a coherent
bq. HRegion pointer, instead, we fake up one using Mockito.
bq.
bq. I tried to break out of HRegion a "Region" Interface. This Region Interface
bq. would have a basic subset of HRegion functionality and we'd pass this
bq. instead of HRegion to SplitTransaction, Store, CompactionRequest, etc.
bq. but the change would be massive. Everything expects to be able to do
bq. anything on an HRegion. This is work we need to do but I"m not doing
bq. it as part of this patch.
bq.
bq. M src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
bq. Use new CompactionTool instead of asking Store directly to compact.
bq. M src/main/java/org/apache/hadoop/hbase/util/ChecksumType.java
bq. Formatting.
bq. M src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
bq. Format the log message so properly spaced.
bq. A src/test/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java
bq. New compactiontool. Runs all compactions.
bq. M src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
bq. Make getOpenAndCloseThreadPool static.
bq. M src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
bq. Move compaction code out to CompactionTool.
bq. Refactor so can override ttl and Store home directory so Store
bq. is more mockable; can now stand up a Store on its own w/o real
bq. HRegion context.
bq. M src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
bq. Formatting.
bq.
bq.
bq. This addresses bug hbase-5616.
bq. https://issues.apache.org/jira/browse/hbase-5616
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java
b52e5d3
bq. src/main/java/org/apache/hadoop/hbase/regionserver/Compactor.java
PRE-CREATION
bq. src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 4efdc6b
bq. src/main/java/org/apache/hadoop/hbase/regionserver/Store.java dcede5a
bq.
src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactionProgress.java
553eee0
bq. src/main/java/org/apache/hadoop/hbase/util/ChecksumType.java d2329e1
bq. src/main/java/org/apache/hadoop/hbase/util/FSUtils.java 4bfd42f
bq. src/test/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java
PRE-CREATION
bq. src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
91ac652
bq.
bq. Diff: https://reviews.apache.org/r/4469/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq.
bq. Thanks,
bq.
bq. Michael
bq.
bq.
> Make compaction code standalone
> -------------------------------
>
> Key: HBASE-5616
> URL: https://issues.apache.org/jira/browse/HBASE-5616
> Project: HBase
> Issue Type: Improvement
> Reporter: stack
> Assignee: stack
> Attachments: 5616.txt, 5616v3.txt, 5616v6.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