[
https://issues.apache.org/jira/browse/HBASE-11195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14367732#comment-14367732
]
Lars Hofhansl commented on HBASE-11195:
---------------------------------------
Looking at the patch... Isn't this wrong:
{code}
if (blockLocalityIndex > comConf.getMinLocalityToForceCompact()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Major compaction triggered on only store " + this +
"; to make hdfs blocks local, current blockLocalityIndex is "
+
blockLocalityIndex + " (min " +
comConf.getMinLocalityToForceCompact() +
")");
}
result = true;
{code}
It seems this should be:
{code}
if (blockLocalityIndex < comConf.getMinLocalityToForceCompact()) {
{code}
We want to compact if the current locality index is *less* then what we want it
to be, not more.
Since we default min locality index to 0, we'd always compact these file now,
right? That's bad.
I hope I am missing something.
[~churromorales], [~apurtell].
> Potentially improve block locality during major compaction for old regions
> --------------------------------------------------------------------------
>
> Key: HBASE-11195
> URL: https://issues.apache.org/jira/browse/HBASE-11195
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 1.0.0, 2.0.0, 0.94.26, 0.98.10
> Reporter: churro morales
> Assignee: churro morales
> Fix For: 1.0.0, 2.0.0, 0.98.10, 0.94.27
>
> Attachments: HBASE-11195-0.94.patch, HBASE-11195-0.98.patch,
> HBASE-11195.patch, HBASE-11195.patch
>
>
> This might be a specific use case. But we have some regions which are no
> longer written to (due to the key). Those regions have 1 store file and they
> are very old, they haven't been written to in a while. We still use these
> regions to read from so locality would be nice.
> I propose putting a configuration option: something like
> hbase.hstore.min.locality.to.skip.major.compact [between 0 and 1]
> such that you can decide whether or not to skip major compaction for an old
> region with a single store file.
> I'll attach a patch, let me know what you guys think.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)