[
https://issues.apache.org/jira/browse/HBASE-5330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200311#comment-13200311
]
Nicolas Spiegelberg commented on HBASE-5330:
--------------------------------------------
There's actually more subtle shortcomings that these tests expose.
1) The major compaction is treated differently than the reference use case
because a major compaction does not require all the files. A major compaction
just requires a contiguous range of the oldest files. We need to change
compactSelection to return whether the operation is a major compaction or not.
2) The reference use case should not look all all the StoreFiles. Instead, it
should compact range(oldest_reference, newest_reference).
3) I don't understand why reference files are [5:1]. It should be [7:3] like
the others.
> TestCompactSelection - adding 2 test cases to testCompactionRatio
> -----------------------------------------------------------------
>
> Key: HBASE-5330
> URL: https://issues.apache.org/jira/browse/HBASE-5330
> Project: HBase
> Issue Type: Improvement
> Reporter: Doug Meil
> Assignee: Doug Meil
> Priority: Minor
> Attachments: TestCompactSelection_hbase_5330.java.patch
>
>
> There were three existing assertions in TestCompactSelection
> testCompactionRatio that did "max # of files" assertions...
> {code}
> assertEquals(maxFiles,
>
> store.compactSelection(sfCreate(7,6,5,4,3,2,1)).getFilesToCompact().size());
> {code}
> ... and for references ...
> {code}
> assertEquals(maxFiles,
> store.compactSelection(sfCreate(true,
> 7,6,5,4,3,2,1)).getFilesToCompact().size());
> {code}
>
> ... but they didn't assert against which StoreFiles got selected. While the
> number of StoreFiles is the same, the files selected are actually different,
> and I thought that there should be explicit assertions showing that.
--
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