hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject hbase git commit: HBASE-17243 Reuse CompactionPartitionId and avoid creating MobFileName in PartitionedMobCompactor to avoid unnecessary new objects (addendum)
Date Sat, 03 Dec 2016 15:38:35 GMT
Repository: hbase
Updated Branches:
  refs/heads/master efcd15bf6 -> 03423fec6


HBASE-17243 Reuse CompactionPartitionId and avoid creating MobFileName in PartitionedMobCompactor
to avoid unnecessary new objects (addendum)

Signed-off-by: Matteo Bertozzi <matteo.bertozzi@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/03423fec
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/03423fec
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/03423fec

Branch: refs/heads/master
Commit: 03423fec6bbb16e049bd1294ec439cf56fd0e785
Parents: efcd15b
Author: Huaxiang Sun <hsun@cloudera.com>
Authored: Sat Dec 3 07:18:36 2016 -0800
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Sat Dec 3 07:19:02 2016 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/mob/compactions/PartitionedMobCompactor.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/03423fec/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
index 6c8080c..33f5e71 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java
@@ -176,10 +176,11 @@ public class PartitionedMobCompactor extends MobCompactor {
         id.setDate(MobFileName.getDateFromName(fileName));
         CompactionPartition compactionPartition = filesToCompact.get(id);
         if (compactionPartition == null) {
-          compactionPartition = new CompactionPartition(
-              new CompactionPartitionId(id.getStartKey(), id.getDate()));
+          CompactionPartitionId newId = new CompactionPartitionId(id.getStartKey(), id.getDate());
+          compactionPartition = new CompactionPartition(newId);
+
           compactionPartition.addFile(file);
-          filesToCompact.put(id, compactionPartition);
+          filesToCompact.put(newId, compactionPartition);
         } else {
           compactionPartition.addFile(file);
         }


Mime
View raw message