cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/2] git commit: Merge branch 'cassandra-1.1.' into trunk
Date Wed, 23 May 2012 21:12:16 GMT
Updated Branches:
  refs/heads/trunk cc112ae30 -> bc783baab


Merge branch 'cassandra-1.1.' into trunk


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

Branch: refs/heads/trunk
Commit: bc783baab505fd317897f372c86d40b2102329a9
Parents: cc112ae 512d97f
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed May 23 16:11:49 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed May 23 16:11:49 2012 -0500

----------------------------------------------------------------------
 .../cassandra/db/compaction/CompactionInfo.java    |    8 ++++----
 .../cassandra/db/compaction/CompactionManager.java |    6 +++---
 .../cassandra/db/compaction/CompactionTask.java    |    2 +-
 .../cassandra/db/index/SecondaryIndexBuilder.java  |    2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc783baa/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
index 594b639,937557f..acd8fcb
--- a/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionInfo.java
@@@ -103,36 -102,17 +103,36 @@@ public final class CompactionInfo imple
  
      public static abstract class Holder
      {
-         private volatile boolean isStopped = false;
+         private volatile boolean stopRequested = false;
          public abstract CompactionInfo getCompactionInfo();
 +        double load = StorageService.instance.getLoad();
 +        boolean reportedSeverity = false;
  
          public void stop()
          {
-             isStopped = true;
+             stopRequested = true;
          }
  
-         public boolean isStopped()
+         public boolean isStopRequested()
          {
-             return isStopped;
+             return stopRequested;
          }
 +        /**
 +         * report event on the size of the compaction.
 +         */
 +        public void started()
 +        {
 +            reportedSeverity = StorageService.instance.reportSeverity(getCompactionInfo().getTotalBytes()/load);
 +        }
 +
 +        /**
 +         * remove the event complete
 +         */
 +        public void finished()
 +        {
 +            if (reportedSeverity)
 +                StorageService.instance.reportSeverity(-(getCompactionInfo().getTotalBytes()/load));
           
 +            reportedSeverity = false;
 +        }
      }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc783baa/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc783baa/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bc783baa/src/java/org/apache/cassandra/db/index/SecondaryIndexBuilder.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndexBuilder.java
index dfe1a56,5cdd26a..a434fa8
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndexBuilder.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndexBuilder.java
@@@ -59,9 -59,9 +59,9 @@@ public class SecondaryIndexBuilder exte
      {
          while (iter.hasNext())
          {
-             if (isStopped())
+             if (isStopRequested())
                  throw new CompactionInterruptedException(getCompactionInfo());
 -            DecoratedKey<?> key = iter.next();
 +            DecoratedKey key = iter.next();
              Table.indexRow(key, cfs, columns);
          }
  


Mime
View raw message