[
https://issues.apache.org/jira/browse/HBASE-17243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15718363#comment-15718363
]
Hudson commented on HBASE-17243:
--------------------------------
SUCCESS: Integrated in Jenkins build HBase-Trunk_matrix #2065 (See
[https://builds.apache.org/job/HBase-Trunk_matrix/2065/])
HBASE-17243 Reuse CompactionPartitionId and avoid creating MobFileName
(matteo.bertozzi: rev efcd15bf67f155e29b337886fe38eadfce75ffc6)
* (edit)
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactionRequest.java
* (edit)
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
* (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileName.java
> Reuse CompactionPartitionId and avoid creating MobFileName in
> PartitionedMobCompactor to avoid unnecessary new objects
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-17243
> URL: https://issues.apache.org/jira/browse/HBASE-17243
> Project: HBase
> Issue Type: Improvement
> Components: mob
> Affects Versions: 2.0.0
> Reporter: huaxiang sun
> Assignee: huaxiang sun
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: HBASE-17243-master-001.patch,
> HBASE-17243-master-002.patch, HBASE-17243-master-addendum.patch
>
>
> In today's select() implementation, when it is an existing id, the new
> allocated object is discarded. It should be reused. fileName is created to
> getStartKey and getDate(), utility APIs can be created to directly get these
> fields from the string.
> {code}
> } else if (allFiles || linkedFile.getLen() < mergeableSize) {
> // add all files if allFiles is true,
> // otherwise add the small files to the merge pool
> MobFileName fileName =
> MobFileName.create(linkedFile.getPath().getName());
> CompactionPartitionId id = new
> CompactionPartitionId(fileName.getStartKey(),
> fileName.getDate());
> CompactionPartition compactionPartition = filesToCompact.get(id);
> if (compactionPartition == null) {
> compactionPartition = new CompactionPartition(id);
> compactionPartition.addFile(file);
> filesToCompact.put(id, compactionPartition);
> } else {
> compactionPartition.addFile(file);
> }
> selectedFileCount++;
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)