cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: Move LCS DataTracker subscription to startup()
Date Wed, 29 Jan 2014 22:30:53 GMT
Updated Branches:
  refs/heads/cassandra-2.0 cc708b92a -> b44683c4a


Move LCS DataTracker subscription to startup()


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

Branch: refs/heads/cassandra-2.0
Commit: b44683c4a6c0e592b11f88acb41adc18c85422a3
Parents: cc708b9
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jan 29 16:30:43 2014 -0600
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jan 29 16:30:43 2014 -0600

----------------------------------------------------------------------
 .../db/compaction/LeveledCompactionStrategy.java       | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b44683c4/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index 8e60223..18b9fbd 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -71,17 +71,24 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy
implem
         }
         maxSSTableSizeInMB = configuredMaxSSTableSize;
 
-        cfs.getDataTracker().subscribe(this);
-        logger.debug("{} subscribed to the data tracker.", this);
-
         manifest = LeveledManifest.create(cfs, this.maxSSTableSizeInMB, cfs.getSSTables(),
localOptions);
         logger.debug("Created {}", manifest);
     }
 
+    @Override
+    public void startup()
+    {
+        super.startup();
+        cfs.getDataTracker().subscribe(this);
+        logger.debug("{} subscribed to the data tracker.", this);
+    }
+
+    @Override
     public void shutdown()
     {
         super.shutdown();
         cfs.getDataTracker().unsubscribe(this);
+        logger.debug("{} unsubscribed from the data tracker.", this);
     }
 
     public int getLevelSize(int i)


Mime
View raw message