You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/10/08 22:41:47 UTC
[01/11] git commit: fix build
Updated Branches:
refs/heads/cassandra-1.2 102c3c123 -> f31e399ab
refs/heads/cassandra-2.0 b557f7e37 -> 9620e0cc3
refs/heads/trunk a8a2ffb97 -> 465e90c2b
fix build
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/102c3c12
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/102c3c12
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/102c3c12
Branch: refs/heads/trunk
Commit: 102c3c123ed52bff6d2e2418bb393b9fdc427f7e
Parents: 241c70a
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 12:04:34 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 12:04:34 2013 -0500
----------------------------------------------------------------------
.../apache/cassandra/db/index/composites/CompositesSearcher.java | 2 +-
src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/102c3c12/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
index 82e227f..5ab1df6 100644
--- a/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/composites/CompositesSearcher.java
@@ -56,7 +56,7 @@ public class CompositesSearcher extends SecondaryIndexSearcher
{
IndexExpression best = null;
int bestMeanCount = Integer.MAX_VALUE;
- Map<SecondaryIndex, Integer> candidates = new HashMap<>();
+ Map<SecondaryIndex, Integer> candidates = new HashMap<SecondaryIndex, Integer>();
for (IndexExpression expression : clause)
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/102c3c12/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
index 7d23e6c..bed6104 100644
--- a/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
+++ b/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
@@ -52,7 +52,7 @@ public class KeysSearcher extends SecondaryIndexSearcher
{
IndexExpression best = null;
int bestMeanCount = Integer.MAX_VALUE;
- Map<SecondaryIndex, Integer> candidates = new HashMap<>();
+ Map<SecondaryIndex, Integer> candidates = new HashMap<SecondaryIndex, Integer>();
for (IndexExpression expression : clause)
{
[08/11] git commit: add live/tombstoned histogram counts to cfstats
patch by Mikhail Stepura; reviewed by jbellis for CASSANDRA-5889
Posted by jb...@apache.org.
add live/tombstoned histogram counts to cfstats
patch by Mikhail Stepura; reviewed by jbellis for CASSANDRA-5889
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f31e399a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f31e399a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f31e399a
Branch: refs/heads/trunk
Commit: f31e399abe01c0e78f3b8289c562c2f279f04c2c
Parents: 99b40fd
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:37:58 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:37:58 2013 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java | 2 ++
src/java/org/apache/cassandra/tools/NodeCmd.java | 2 ++
2 files changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31e399a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index ef58c86..9ee7568 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -287,9 +287,11 @@ public interface ColumnFamilyStoreMBean
public void disableAutoCompaction();
/** Number of tombstoned cells retreived during the last slicequery */
+ @Deprecated
public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
+ @Deprecated
public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31e399a/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 4416a37..86f9eef 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -916,6 +916,8 @@ public class NodeCmd
outs.println("\t\tCompacted row minimum size: " + cfstore.getMinRowSize());
outs.println("\t\tCompacted row maximum size: " + cfstore.getMaxRowSize());
outs.println("\t\tCompacted row mean size: " + cfstore.getMeanRowSize());
+ outs.println("\t\tAverage live cells per slice (last five minutes): " + cfstore.getLiveCellsPerSlice());
+ outs.println("\t\tAverage tombstones per slice (last five minutes): " + cfstore.getTombstonesPerSlice());
outs.println("");
}
[06/11] git commit: add live/tombstoned histogram counts to cfstats
patch by Mikhail Stepura; reviewed by jbellis for CASSANDRA-5889
Posted by jb...@apache.org.
add live/tombstoned histogram counts to cfstats
patch by Mikhail Stepura; reviewed by jbellis for CASSANDRA-5889
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f31e399a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f31e399a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f31e399a
Branch: refs/heads/cassandra-1.2
Commit: f31e399abe01c0e78f3b8289c562c2f279f04c2c
Parents: 99b40fd
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:37:58 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:37:58 2013 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java | 2 ++
src/java/org/apache/cassandra/tools/NodeCmd.java | 2 ++
2 files changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31e399a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index ef58c86..9ee7568 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -287,9 +287,11 @@ public interface ColumnFamilyStoreMBean
public void disableAutoCompaction();
/** Number of tombstoned cells retreived during the last slicequery */
+ @Deprecated
public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
+ @Deprecated
public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31e399a/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 4416a37..86f9eef 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -916,6 +916,8 @@ public class NodeCmd
outs.println("\t\tCompacted row minimum size: " + cfstore.getMinRowSize());
outs.println("\t\tCompacted row maximum size: " + cfstore.getMaxRowSize());
outs.println("\t\tCompacted row mean size: " + cfstore.getMeanRowSize());
+ outs.println("\t\tAverage live cells per slice (last five minutes): " + cfstore.getLiveCellsPerSlice());
+ outs.println("\t\tAverage tombstones per slice (last five minutes): " + cfstore.getTombstonesPerSlice());
outs.println("");
}
[04/11] git commit: Update sstablesPerReadHistogram to use biased
sampling patch by jbellis; reviewed by yukim for CASSANDRA-6164
Posted by jb...@apache.org.
Update sstablesPerReadHistogram to use biased sampling
patch by jbellis; reviewed by yukim for CASSANDRA-6164
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/99b40fd0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/99b40fd0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/99b40fd0
Branch: refs/heads/cassandra-2.0
Commit: 99b40fd005a9250ff8d255cc9c22ff61e4d32587
Parents: 102c3c1
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:33:11 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:33:11 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ColumnFamilyStore.java | 14 ++++----------
.../apache/cassandra/db/ColumnFamilyStoreMBean.java | 7 ++-----
.../apache/cassandra/metrics/ColumnFamilyMetrics.java | 6 +++---
4 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index adbae91..c4ee9f4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@
* Expose connected thrift + native client counts (CASSANDRA-5084)
* Optimize auth setup (CASSANDRA-6122)
* Trace index selection (CASSANDRA-6001)
+ * Update sstablesPerReadHistogram to use biased sampling (CASSANDRA-6164)
1.2.10
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 6dd6e77..a7e8605 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1911,20 +1911,14 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
return getMinimumCompactionThreshold() <= 0 || getMaximumCompactionThreshold() <= 0;
}
- public long getTombstonesPerLastRead()
+ public double getTombstonesPerSlice()
{
- return metric.tombstoneScannedHistogram.count();
+ return metric.tombstoneScannedHistogram.getSnapshot().getMedian();
}
- public float getPercentageTombstonesPerLastRead()
+ public double getLiveCellsPerSlice()
{
- long total = metric.tombstoneScannedHistogram.count() + metric.liveScannedHistogram.count();
- return ((float) metric.tombstoneScannedHistogram.count() / total);
- }
-
- public long getLiveCellsPerLastRead()
- {
- return metric.liveScannedHistogram.count();
+ return metric.liveScannedHistogram.getSnapshot().getMedian();
}
// End JMX get/set.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index f937032..ef58c86 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -287,13 +287,10 @@ public interface ColumnFamilyStoreMBean
public void disableAutoCompaction();
/** Number of tombstoned cells retreived during the last slicequery */
- public long getTombstonesPerLastRead();
-
- /** Percentage of tombstoned cells retreived during the last slicequery */
- public float getPercentageTombstonesPerLastRead();
+ public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
- public long getLiveCellsPerLastRead();
+ public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
index 9bd90a9..cb13c22 100644
--- a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
@@ -142,7 +142,7 @@ public class ColumnFamilyMetrics
return histogram;
}
});
- sstablesPerReadHistogram = Metrics.newHistogram(factory.createMetricName("SSTablesPerReadHistogram"));
+ sstablesPerReadHistogram = Metrics.newHistogram(factory.createMetricName("SSTablesPerReadHistogram"), true);
compressionRatio = Metrics.newGauge(factory.createMetricName("CompressionRatio"), new Gauge<Double>()
{
public Double value()
@@ -299,8 +299,8 @@ public class ColumnFamilyMetrics
return Math.max(requests, 1); // to avoid NaN.
}
});
- tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"));
- liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"));
+ tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"), true);
+ liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"), true);
}
public void updateSSTableIterated(int count)
[02/11] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Posted by jb...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b557f7e3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b557f7e3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b557f7e3
Branch: refs/heads/trunk
Commit: b557f7e3756e18591e78d791178288e463f17669
Parents: 21ab8f8 102c3c1
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 12:04:56 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 12:04:56 2013 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[11/11] git commit: Merge branch 'cassandra-2.0' into trunk
Posted by jb...@apache.org.
Merge branch 'cassandra-2.0' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/465e90c2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/465e90c2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/465e90c2
Branch: refs/heads/trunk
Commit: 465e90c2b7a534bb6b74be7ef2065a6289052429
Parents: a8a2ffb 9620e0c
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:41:38 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:41:38 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ColumnFamilyStore.java | 14 ++++----------
.../apache/cassandra/db/ColumnFamilyStoreMBean.java | 9 ++++-----
.../apache/cassandra/metrics/ColumnFamilyMetrics.java | 6 +++---
src/java/org/apache/cassandra/tools/NodeCmd.java | 2 ++
5 files changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/465e90c2/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/465e90c2/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
[10/11] git commit: merge from 1.2
Posted by jb...@apache.org.
merge from 1.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9620e0cc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9620e0cc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9620e0cc
Branch: refs/heads/trunk
Commit: 9620e0cc345bede9bfda89c840e514ca88a09079
Parents: b557f7e f31e399
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:41:32 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:41:32 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ColumnFamilyStore.java | 14 ++++----------
.../apache/cassandra/db/ColumnFamilyStoreMBean.java | 9 ++++-----
.../apache/cassandra/metrics/ColumnFamilyMetrics.java | 6 +++---
src/java/org/apache/cassandra/tools/NodeCmd.java | 2 ++
5 files changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 1877a85,c4ee9f4..4375475
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -40,43 -16,10 +40,44 @@@ Merged from 1.2
* Expose connected thrift + native client counts (CASSANDRA-5084)
* Optimize auth setup (CASSANDRA-6122)
* Trace index selection (CASSANDRA-6001)
+ * Update sstablesPerReadHistogram to use biased sampling (CASSANDRA-6164)
-1.2.10
+2.0.1
+ * Fix bug that could allow reading deleted data temporarily (CASSANDRA-6025)
+ * Improve memory use defaults (CASSANDRA-5069)
+ * Make ThriftServer more easlly extensible (CASSANDRA-6058)
+ * Remove Hadoop dependency from ITransportFactory (CASSANDRA-6062)
+ * add file_cache_size_in_mb setting (CASSANDRA-5661)
+ * Improve error message when yaml contains invalid properties (CASSANDRA-5958)
+ * Improve leveled compaction's ability to find non-overlapping L0 compactions
+ to work on concurrently (CASSANDRA-5921)
+ * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614)
+ * Log Merkle tree stats (CASSANDRA-2698)
+ * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862)
+ * Improve offheap memcpy performance (CASSANDRA-5884)
+ * Use a range aware scanner for cleanup (CASSANDRA-2524)
+ * Cleanup doesn't need to inspect sstables that contain only local data
+ (CASSANDRA-5722)
+ * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
+ * Improve native protocol serialization (CASSANDRA-5664)
+ * Upgrade Thrift to 0.9.1 (CASSANDRA-5923)
+ * Require superuser status for adding triggers (CASSANDRA-5963)
+ * Make standalone scrubber handle old and new style leveled manifest
+ (CASSANDRA-6005)
+ * Fix paxos bugs (CASSANDRA-6012, 6013, 6023)
+ * Fix paged ranges with multiple replicas (CASSANDRA-6004)
+ * Fix potential AssertionError during tracing (CASSANDRA-6041)
+ * Fix NPE in sstablesplit (CASSANDRA-6027)
+ * Migrate pre-2.0 key/value/column aliases to system.schema_columns
+ (CASSANDRA-6009)
+ * Paging filter empty rows too agressively (CASSANDRA-6040)
+ * Support variadic parameters for IN clauses (CASSANDRA-4210)
+ * cqlsh: return the result of CAS writes (CASSANDRA-5796)
+ * Fix validation of IN clauses with 2ndary indexes (CASSANDRA-6050)
+ * Support named bind variables in CQL (CASSANDRA-6033)
+Merged from 1.2:
+ * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
* Avoid second-guessing out-of-space state (CASSANDRA-5605)
* Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982)
* (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 84a8d06,a7e8605..117df6f
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -2163,29 -1901,24 +2163,23 @@@ public class ColumnFamilyStore implemen
private void validateCompactionThresholds(int minThreshold, int maxThreshold)
{
- if (minThreshold > maxThreshold && maxThreshold != 0)
+ if (minThreshold > maxThreshold)
throw new RuntimeException(String.format("The min_compaction_threshold cannot be larger than the max_compaction_threshold. " +
"Min is '%d', Max is '%d'.", minThreshold, maxThreshold));
- }
- public boolean isCompactionDisabled()
- {
- return getMinimumCompactionThreshold() <= 0 || getMaximumCompactionThreshold() <= 0;
+ if (maxThreshold == 0 || minThreshold == 0)
+ throw new RuntimeException("Disabling compaction by setting min_compaction_threshold or max_compaction_threshold to 0 " +
+ "is deprecated, set the compaction strategy option 'enabled' to 'false' instead or use the nodetool command 'disableautocompaction'.");
}
- public long getTombstonesPerLastRead()
+ public double getTombstonesPerSlice()
{
- return metric.tombstoneScannedHistogram.count();
+ return metric.tombstoneScannedHistogram.getSnapshot().getMedian();
}
- public float getPercentageTombstonesPerLastRead()
+ public double getLiveCellsPerSlice()
{
- long total = metric.tombstoneScannedHistogram.count() + metric.liveScannedHistogram.count();
- return ((float) metric.tombstoneScannedHistogram.count() / total);
- }
-
- public long getLiveCellsPerLastRead()
- {
- return metric.liveScannedHistogram.count();
+ return metric.liveScannedHistogram.getSnapshot().getMedian();
}
// End JMX get/set.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index 6105714,9ee7568..1ca922b
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@@ -281,16 -281,18 +281,15 @@@ public interface ColumnFamilyStoreMBea
*/
public void setCrcCheckChance(double crcCheckChance);
- /**
- * Disable automatic compaction.
- */
- public void disableAutoCompaction();
+ public boolean isAutoCompactionDisabled();
/** Number of tombstoned cells retreived during the last slicequery */
- public long getTombstonesPerLastRead();
-
- /** Percentage of tombstoned cells retreived during the last slicequery */
- public float getPercentageTombstonesPerLastRead();
+ @Deprecated
+ public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
- public long getLiveCellsPerLastRead();
+ @Deprecated
+ public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
index 7265c7b,cb13c22..aabf373
--- a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
@@@ -304,10 -299,8 +304,10 @@@ public class ColumnFamilyMetric
return Math.max(requests, 1); // to avoid NaN.
}
});
- tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"));
- liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"));
+ tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"), true);
+ liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"), true);
+ coordinatorReadLatency = Metrics.newTimer(factory.createMetricName("CoordinatorReadLatency"), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
+ coordinatorScanLatency = Metrics.newTimer(factory.createMetricName("CoordinatorScanLatency"), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
}
public void updateSSTableIterated(int count)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/tools/NodeCmd.java
index d47a4a3,86f9eef..95da85a
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@@ -875,24 -898,26 +875,26 @@@ public class NodeCm
outs.println("]");
}
}
- outs.println("\t\tSpace used (live): " + cfstore.getLiveDiskSpaceUsed());
- outs.println("\t\tSpace used (total): " + cfstore.getTotalDiskSpaceUsed());
+ outs.println("\t\tSpace used (live), bytes: " + cfstore.getLiveDiskSpaceUsed());
+ outs.println("\t\tSpace used (total), bytes: " + cfstore.getTotalDiskSpaceUsed());
outs.println("\t\tSSTable Compression Ratio: " + cfstore.getCompressionRatio());
- outs.println("\t\tNumber of Keys (estimate): " + cfstore.estimateKeys());
- outs.println("\t\tMemtable Columns Count: " + cfstore.getMemtableColumnsCount());
- outs.println("\t\tMemtable Data Size: " + cfstore.getMemtableDataSize());
- outs.println("\t\tMemtable Switch Count: " + cfstore.getMemtableSwitchCount());
- outs.println("\t\tRead Count: " + cfstore.getReadCount());
- outs.println("\t\tRead Latency: " + String.format("%01.3f", cfstore.getRecentReadLatencyMicros() / 1000) + " ms.");
- outs.println("\t\tWrite Count: " + cfstore.getWriteCount());
- outs.println("\t\tWrite Latency: " + String.format("%01.3f", cfstore.getRecentWriteLatencyMicros() / 1000) + " ms.");
- outs.println("\t\tPending Tasks: " + cfstore.getPendingTasks());
- outs.println("\t\tBloom Filter False Positives: " + cfstore.getBloomFilterFalsePositives());
- outs.println("\t\tBloom Filter False Ratio: " + String.format("%01.5f", cfstore.getRecentBloomFilterFalseRatio()));
- outs.println("\t\tBloom Filter Space Used: " + cfstore.getBloomFilterDiskSpaceUsed());
- outs.println("\t\tCompacted row minimum size: " + cfstore.getMinRowSize());
- outs.println("\t\tCompacted row maximum size: " + cfstore.getMaxRowSize());
- outs.println("\t\tCompacted row mean size: " + cfstore.getMeanRowSize());
+ outs.println("\t\tNumber of keys (estimate): " + cfstore.estimateKeys());
+ outs.println("\t\tMemtable cell count: " + cfstore.getMemtableColumnsCount());
+ outs.println("\t\tMemtable data size, bytes: " + cfstore.getMemtableDataSize());
+ outs.println("\t\tMemtable switch count: " + cfstore.getMemtableSwitchCount());
+ outs.println("\t\tLocal read count: " + cfstore.getReadCount());
+ outs.printf("\t\tLocal read latency: %01.3f ms%n", cfstore.getRecentReadLatencyMicros() / 1000);
+ outs.println("\t\tLocal write count: " + cfstore.getWriteCount());
+ outs.printf("\t\tLocal write latency: %01.3f ms%n", cfstore.getRecentWriteLatencyMicros() / 1000);
+ outs.println("\t\tPending tasks: " + cfstore.getPendingTasks());
+ outs.println("\t\tBloom filter false positives: " + cfstore.getBloomFilterFalsePositives());
+ outs.println("\t\tBloom filter false ratio: " + String.format("%01.5f", cfstore.getRecentBloomFilterFalseRatio()));
+ outs.println("\t\tBloom filter space used, bytes: " + cfstore.getBloomFilterDiskSpaceUsed());
+ outs.println("\t\tCompacted partition minimum bytes: " + cfstore.getMinRowSize());
+ outs.println("\t\tCompacted partition maximum bytes: " + cfstore.getMaxRowSize());
+ outs.println("\t\tCompacted partition mean bytes: " + cfstore.getMeanRowSize());
+ outs.println("\t\tAverage live cells per slice (last five minutes): " + cfstore.getLiveCellsPerSlice());
+ outs.println("\t\tAverage tombstones per slice (last five minutes): " + cfstore.getTombstonesPerSlice());
outs.println("");
}
[09/11] git commit: merge from 1.2
Posted by jb...@apache.org.
merge from 1.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9620e0cc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9620e0cc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9620e0cc
Branch: refs/heads/cassandra-2.0
Commit: 9620e0cc345bede9bfda89c840e514ca88a09079
Parents: b557f7e f31e399
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:41:32 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:41:32 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ColumnFamilyStore.java | 14 ++++----------
.../apache/cassandra/db/ColumnFamilyStoreMBean.java | 9 ++++-----
.../apache/cassandra/metrics/ColumnFamilyMetrics.java | 6 +++---
src/java/org/apache/cassandra/tools/NodeCmd.java | 2 ++
5 files changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 1877a85,c4ee9f4..4375475
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -40,43 -16,10 +40,44 @@@ Merged from 1.2
* Expose connected thrift + native client counts (CASSANDRA-5084)
* Optimize auth setup (CASSANDRA-6122)
* Trace index selection (CASSANDRA-6001)
+ * Update sstablesPerReadHistogram to use biased sampling (CASSANDRA-6164)
-1.2.10
+2.0.1
+ * Fix bug that could allow reading deleted data temporarily (CASSANDRA-6025)
+ * Improve memory use defaults (CASSANDRA-5069)
+ * Make ThriftServer more easlly extensible (CASSANDRA-6058)
+ * Remove Hadoop dependency from ITransportFactory (CASSANDRA-6062)
+ * add file_cache_size_in_mb setting (CASSANDRA-5661)
+ * Improve error message when yaml contains invalid properties (CASSANDRA-5958)
+ * Improve leveled compaction's ability to find non-overlapping L0 compactions
+ to work on concurrently (CASSANDRA-5921)
+ * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614)
+ * Log Merkle tree stats (CASSANDRA-2698)
+ * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862)
+ * Improve offheap memcpy performance (CASSANDRA-5884)
+ * Use a range aware scanner for cleanup (CASSANDRA-2524)
+ * Cleanup doesn't need to inspect sstables that contain only local data
+ (CASSANDRA-5722)
+ * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
+ * Improve native protocol serialization (CASSANDRA-5664)
+ * Upgrade Thrift to 0.9.1 (CASSANDRA-5923)
+ * Require superuser status for adding triggers (CASSANDRA-5963)
+ * Make standalone scrubber handle old and new style leveled manifest
+ (CASSANDRA-6005)
+ * Fix paxos bugs (CASSANDRA-6012, 6013, 6023)
+ * Fix paged ranges with multiple replicas (CASSANDRA-6004)
+ * Fix potential AssertionError during tracing (CASSANDRA-6041)
+ * Fix NPE in sstablesplit (CASSANDRA-6027)
+ * Migrate pre-2.0 key/value/column aliases to system.schema_columns
+ (CASSANDRA-6009)
+ * Paging filter empty rows too agressively (CASSANDRA-6040)
+ * Support variadic parameters for IN clauses (CASSANDRA-4210)
+ * cqlsh: return the result of CAS writes (CASSANDRA-5796)
+ * Fix validation of IN clauses with 2ndary indexes (CASSANDRA-6050)
+ * Support named bind variables in CQL (CASSANDRA-6033)
+Merged from 1.2:
+ * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
* Avoid second-guessing out-of-space state (CASSANDRA-5605)
* Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982)
* (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 84a8d06,a7e8605..117df6f
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -2163,29 -1901,24 +2163,23 @@@ public class ColumnFamilyStore implemen
private void validateCompactionThresholds(int minThreshold, int maxThreshold)
{
- if (minThreshold > maxThreshold && maxThreshold != 0)
+ if (minThreshold > maxThreshold)
throw new RuntimeException(String.format("The min_compaction_threshold cannot be larger than the max_compaction_threshold. " +
"Min is '%d', Max is '%d'.", minThreshold, maxThreshold));
- }
- public boolean isCompactionDisabled()
- {
- return getMinimumCompactionThreshold() <= 0 || getMaximumCompactionThreshold() <= 0;
+ if (maxThreshold == 0 || minThreshold == 0)
+ throw new RuntimeException("Disabling compaction by setting min_compaction_threshold or max_compaction_threshold to 0 " +
+ "is deprecated, set the compaction strategy option 'enabled' to 'false' instead or use the nodetool command 'disableautocompaction'.");
}
- public long getTombstonesPerLastRead()
+ public double getTombstonesPerSlice()
{
- return metric.tombstoneScannedHistogram.count();
+ return metric.tombstoneScannedHistogram.getSnapshot().getMedian();
}
- public float getPercentageTombstonesPerLastRead()
+ public double getLiveCellsPerSlice()
{
- long total = metric.tombstoneScannedHistogram.count() + metric.liveScannedHistogram.count();
- return ((float) metric.tombstoneScannedHistogram.count() / total);
- }
-
- public long getLiveCellsPerLastRead()
- {
- return metric.liveScannedHistogram.count();
+ return metric.liveScannedHistogram.getSnapshot().getMedian();
}
// End JMX get/set.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index 6105714,9ee7568..1ca922b
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@@ -281,16 -281,18 +281,15 @@@ public interface ColumnFamilyStoreMBea
*/
public void setCrcCheckChance(double crcCheckChance);
- /**
- * Disable automatic compaction.
- */
- public void disableAutoCompaction();
+ public boolean isAutoCompactionDisabled();
/** Number of tombstoned cells retreived during the last slicequery */
- public long getTombstonesPerLastRead();
-
- /** Percentage of tombstoned cells retreived during the last slicequery */
- public float getPercentageTombstonesPerLastRead();
+ @Deprecated
+ public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
- public long getLiveCellsPerLastRead();
+ @Deprecated
+ public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
index 7265c7b,cb13c22..aabf373
--- a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
@@@ -304,10 -299,8 +304,10 @@@ public class ColumnFamilyMetric
return Math.max(requests, 1); // to avoid NaN.
}
});
- tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"));
- liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"));
+ tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"), true);
+ liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"), true);
+ coordinatorReadLatency = Metrics.newTimer(factory.createMetricName("CoordinatorReadLatency"), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
+ coordinatorScanLatency = Metrics.newTimer(factory.createMetricName("CoordinatorScanLatency"), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
}
public void updateSSTableIterated(int count)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9620e0cc/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/tools/NodeCmd.java
index d47a4a3,86f9eef..95da85a
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@@ -875,24 -898,26 +875,26 @@@ public class NodeCm
outs.println("]");
}
}
- outs.println("\t\tSpace used (live): " + cfstore.getLiveDiskSpaceUsed());
- outs.println("\t\tSpace used (total): " + cfstore.getTotalDiskSpaceUsed());
+ outs.println("\t\tSpace used (live), bytes: " + cfstore.getLiveDiskSpaceUsed());
+ outs.println("\t\tSpace used (total), bytes: " + cfstore.getTotalDiskSpaceUsed());
outs.println("\t\tSSTable Compression Ratio: " + cfstore.getCompressionRatio());
- outs.println("\t\tNumber of Keys (estimate): " + cfstore.estimateKeys());
- outs.println("\t\tMemtable Columns Count: " + cfstore.getMemtableColumnsCount());
- outs.println("\t\tMemtable Data Size: " + cfstore.getMemtableDataSize());
- outs.println("\t\tMemtable Switch Count: " + cfstore.getMemtableSwitchCount());
- outs.println("\t\tRead Count: " + cfstore.getReadCount());
- outs.println("\t\tRead Latency: " + String.format("%01.3f", cfstore.getRecentReadLatencyMicros() / 1000) + " ms.");
- outs.println("\t\tWrite Count: " + cfstore.getWriteCount());
- outs.println("\t\tWrite Latency: " + String.format("%01.3f", cfstore.getRecentWriteLatencyMicros() / 1000) + " ms.");
- outs.println("\t\tPending Tasks: " + cfstore.getPendingTasks());
- outs.println("\t\tBloom Filter False Positives: " + cfstore.getBloomFilterFalsePositives());
- outs.println("\t\tBloom Filter False Ratio: " + String.format("%01.5f", cfstore.getRecentBloomFilterFalseRatio()));
- outs.println("\t\tBloom Filter Space Used: " + cfstore.getBloomFilterDiskSpaceUsed());
- outs.println("\t\tCompacted row minimum size: " + cfstore.getMinRowSize());
- outs.println("\t\tCompacted row maximum size: " + cfstore.getMaxRowSize());
- outs.println("\t\tCompacted row mean size: " + cfstore.getMeanRowSize());
+ outs.println("\t\tNumber of keys (estimate): " + cfstore.estimateKeys());
+ outs.println("\t\tMemtable cell count: " + cfstore.getMemtableColumnsCount());
+ outs.println("\t\tMemtable data size, bytes: " + cfstore.getMemtableDataSize());
+ outs.println("\t\tMemtable switch count: " + cfstore.getMemtableSwitchCount());
+ outs.println("\t\tLocal read count: " + cfstore.getReadCount());
+ outs.printf("\t\tLocal read latency: %01.3f ms%n", cfstore.getRecentReadLatencyMicros() / 1000);
+ outs.println("\t\tLocal write count: " + cfstore.getWriteCount());
+ outs.printf("\t\tLocal write latency: %01.3f ms%n", cfstore.getRecentWriteLatencyMicros() / 1000);
+ outs.println("\t\tPending tasks: " + cfstore.getPendingTasks());
+ outs.println("\t\tBloom filter false positives: " + cfstore.getBloomFilterFalsePositives());
+ outs.println("\t\tBloom filter false ratio: " + String.format("%01.5f", cfstore.getRecentBloomFilterFalseRatio()));
+ outs.println("\t\tBloom filter space used, bytes: " + cfstore.getBloomFilterDiskSpaceUsed());
+ outs.println("\t\tCompacted partition minimum bytes: " + cfstore.getMinRowSize());
+ outs.println("\t\tCompacted partition maximum bytes: " + cfstore.getMaxRowSize());
+ outs.println("\t\tCompacted partition mean bytes: " + cfstore.getMeanRowSize());
+ outs.println("\t\tAverage live cells per slice (last five minutes): " + cfstore.getLiveCellsPerSlice());
+ outs.println("\t\tAverage tombstones per slice (last five minutes): " + cfstore.getTombstonesPerSlice());
outs.println("");
}
[03/11] git commit: Update sstablesPerReadHistogram to use biased
sampling patch by jbellis; reviewed by yukim for CASSANDRA-6164
Posted by jb...@apache.org.
Update sstablesPerReadHistogram to use biased sampling
patch by jbellis; reviewed by yukim for CASSANDRA-6164
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/99b40fd0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/99b40fd0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/99b40fd0
Branch: refs/heads/cassandra-1.2
Commit: 99b40fd005a9250ff8d255cc9c22ff61e4d32587
Parents: 102c3c1
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:33:11 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:33:11 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ColumnFamilyStore.java | 14 ++++----------
.../apache/cassandra/db/ColumnFamilyStoreMBean.java | 7 ++-----
.../apache/cassandra/metrics/ColumnFamilyMetrics.java | 6 +++---
4 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index adbae91..c4ee9f4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@
* Expose connected thrift + native client counts (CASSANDRA-5084)
* Optimize auth setup (CASSANDRA-6122)
* Trace index selection (CASSANDRA-6001)
+ * Update sstablesPerReadHistogram to use biased sampling (CASSANDRA-6164)
1.2.10
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 6dd6e77..a7e8605 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1911,20 +1911,14 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
return getMinimumCompactionThreshold() <= 0 || getMaximumCompactionThreshold() <= 0;
}
- public long getTombstonesPerLastRead()
+ public double getTombstonesPerSlice()
{
- return metric.tombstoneScannedHistogram.count();
+ return metric.tombstoneScannedHistogram.getSnapshot().getMedian();
}
- public float getPercentageTombstonesPerLastRead()
+ public double getLiveCellsPerSlice()
{
- long total = metric.tombstoneScannedHistogram.count() + metric.liveScannedHistogram.count();
- return ((float) metric.tombstoneScannedHistogram.count() / total);
- }
-
- public long getLiveCellsPerLastRead()
- {
- return metric.liveScannedHistogram.count();
+ return metric.liveScannedHistogram.getSnapshot().getMedian();
}
// End JMX get/set.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index f937032..ef58c86 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -287,13 +287,10 @@ public interface ColumnFamilyStoreMBean
public void disableAutoCompaction();
/** Number of tombstoned cells retreived during the last slicequery */
- public long getTombstonesPerLastRead();
-
- /** Percentage of tombstoned cells retreived during the last slicequery */
- public float getPercentageTombstonesPerLastRead();
+ public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
- public long getLiveCellsPerLastRead();
+ public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
index 9bd90a9..cb13c22 100644
--- a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
@@ -142,7 +142,7 @@ public class ColumnFamilyMetrics
return histogram;
}
});
- sstablesPerReadHistogram = Metrics.newHistogram(factory.createMetricName("SSTablesPerReadHistogram"));
+ sstablesPerReadHistogram = Metrics.newHistogram(factory.createMetricName("SSTablesPerReadHistogram"), true);
compressionRatio = Metrics.newGauge(factory.createMetricName("CompressionRatio"), new Gauge<Double>()
{
public Double value()
@@ -299,8 +299,8 @@ public class ColumnFamilyMetrics
return Math.max(requests, 1); // to avoid NaN.
}
});
- tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"));
- liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"));
+ tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"), true);
+ liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"), true);
}
public void updateSSTableIterated(int count)
[07/11] git commit: add live/tombstoned histogram counts to cfstats
patch by Mikhail Stepura; reviewed by jbellis for CASSANDRA-5889
Posted by jb...@apache.org.
add live/tombstoned histogram counts to cfstats
patch by Mikhail Stepura; reviewed by jbellis for CASSANDRA-5889
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f31e399a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f31e399a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f31e399a
Branch: refs/heads/cassandra-2.0
Commit: f31e399abe01c0e78f3b8289c562c2f279f04c2c
Parents: 99b40fd
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:37:58 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:37:58 2013 -0500
----------------------------------------------------------------------
src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java | 2 ++
src/java/org/apache/cassandra/tools/NodeCmd.java | 2 ++
2 files changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31e399a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index ef58c86..9ee7568 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -287,9 +287,11 @@ public interface ColumnFamilyStoreMBean
public void disableAutoCompaction();
/** Number of tombstoned cells retreived during the last slicequery */
+ @Deprecated
public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
+ @Deprecated
public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/f31e399a/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 4416a37..86f9eef 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -916,6 +916,8 @@ public class NodeCmd
outs.println("\t\tCompacted row minimum size: " + cfstore.getMinRowSize());
outs.println("\t\tCompacted row maximum size: " + cfstore.getMaxRowSize());
outs.println("\t\tCompacted row mean size: " + cfstore.getMeanRowSize());
+ outs.println("\t\tAverage live cells per slice (last five minutes): " + cfstore.getLiveCellsPerSlice());
+ outs.println("\t\tAverage tombstones per slice (last five minutes): " + cfstore.getTombstonesPerSlice());
outs.println("");
}
[05/11] git commit: Update sstablesPerReadHistogram to use biased
sampling patch by jbellis; reviewed by yukim for CASSANDRA-6164
Posted by jb...@apache.org.
Update sstablesPerReadHistogram to use biased sampling
patch by jbellis; reviewed by yukim for CASSANDRA-6164
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/99b40fd0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/99b40fd0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/99b40fd0
Branch: refs/heads/trunk
Commit: 99b40fd005a9250ff8d255cc9c22ff61e4d32587
Parents: 102c3c1
Author: Jonathan Ellis <jb...@apache.org>
Authored: Tue Oct 8 15:33:11 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Tue Oct 8 15:33:11 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/db/ColumnFamilyStore.java | 14 ++++----------
.../apache/cassandra/db/ColumnFamilyStoreMBean.java | 7 ++-----
.../apache/cassandra/metrics/ColumnFamilyMetrics.java | 6 +++---
4 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index adbae91..c4ee9f4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@
* Expose connected thrift + native client counts (CASSANDRA-5084)
* Optimize auth setup (CASSANDRA-6122)
* Trace index selection (CASSANDRA-6001)
+ * Update sstablesPerReadHistogram to use biased sampling (CASSANDRA-6164)
1.2.10
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 6dd6e77..a7e8605 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1911,20 +1911,14 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
return getMinimumCompactionThreshold() <= 0 || getMaximumCompactionThreshold() <= 0;
}
- public long getTombstonesPerLastRead()
+ public double getTombstonesPerSlice()
{
- return metric.tombstoneScannedHistogram.count();
+ return metric.tombstoneScannedHistogram.getSnapshot().getMedian();
}
- public float getPercentageTombstonesPerLastRead()
+ public double getLiveCellsPerSlice()
{
- long total = metric.tombstoneScannedHistogram.count() + metric.liveScannedHistogram.count();
- return ((float) metric.tombstoneScannedHistogram.count() / total);
- }
-
- public long getLiveCellsPerLastRead()
- {
- return metric.liveScannedHistogram.count();
+ return metric.liveScannedHistogram.getSnapshot().getMedian();
}
// End JMX get/set.
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index f937032..ef58c86 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@ -287,13 +287,10 @@ public interface ColumnFamilyStoreMBean
public void disableAutoCompaction();
/** Number of tombstoned cells retreived during the last slicequery */
- public long getTombstonesPerLastRead();
-
- /** Percentage of tombstoned cells retreived during the last slicequery */
- public float getPercentageTombstonesPerLastRead();
+ public double getTombstonesPerSlice();
/** Number of live cells retreived during the last slicequery */
- public long getLiveCellsPerLastRead();
+ public double getLiveCellsPerSlice();
public long estimateKeys();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/99b40fd0/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
index 9bd90a9..cb13c22 100644
--- a/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ColumnFamilyMetrics.java
@@ -142,7 +142,7 @@ public class ColumnFamilyMetrics
return histogram;
}
});
- sstablesPerReadHistogram = Metrics.newHistogram(factory.createMetricName("SSTablesPerReadHistogram"));
+ sstablesPerReadHistogram = Metrics.newHistogram(factory.createMetricName("SSTablesPerReadHistogram"), true);
compressionRatio = Metrics.newGauge(factory.createMetricName("CompressionRatio"), new Gauge<Double>()
{
public Double value()
@@ -299,8 +299,8 @@ public class ColumnFamilyMetrics
return Math.max(requests, 1); // to avoid NaN.
}
});
- tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"));
- liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"));
+ tombstoneScannedHistogram = Metrics.newHistogram(factory.createMetricName("TombstoneScannedHistogram"), true);
+ liveScannedHistogram = Metrics.newHistogram(factory.createMetricName("LiveScannedHistogram"), true);
}
public void updateSSTableIterated(int count)