You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2016/03/30 23:52:32 UTC
[01/15] cassandra git commit: Backport CASSANDRA-10859
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.1 5a45aa62d -> 105fbb35d
refs/heads/cassandra-2.2 6ff006554 -> 1dac59d1e
refs/heads/cassandra-3.0 500d6b3a2 -> 202786e06
refs/heads/cassandra-3.5 9b1968fcb -> 7fbdce812
refs/heads/trunk 7f6d70d70 -> d00bda88b
Backport CASSANDRA-10859
patch by yukim; reviewed by thobbs for CASSANDRA-11415
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/105fbb35
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/105fbb35
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/105fbb35
Branch: refs/heads/cassandra-2.1
Commit: 105fbb35db228aa47b7de079795d61e748ed8abc
Parents: 5a45aa6
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 23 14:53:39 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:47:42 2016 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/tools/NodeProbe.java | 5 ++---
.../cassandra/utils/EstimatedHistogram.java | 20 ++++++++++++++++++++
3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 65d094f..af2518c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.14
+ * Backport CASSANDRA-10859 (CASSANDRA-11415)
* COPY FROM fails when importing blob (CASSANDRA-11375)
* Backport CASSANDRA-10679 (CASSANDRA-9598)
* Don't do defragmentation if reading from repaired sstables (CASSANDRA-10342)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index ab08e9f..13c7acf 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1265,13 +1265,12 @@ public class NodeProbe implements AutoCloseable
}
double[] offsetPercentiles = new double[] { 0.5, 0.75, 0.95, 0.98, 0.99 };
- long[] offsets = new EstimatedHistogram(counts.length).getBucketOffsets();
- EstimatedHistogram metric = new EstimatedHistogram(offsets, counts);
+ EstimatedHistogram metric = new EstimatedHistogram(counts);
if (metric.isOverflowed())
{
System.err.println(String.format("EstimatedHistogram overflowed larger than %s, unable to calculate percentiles",
- offsets[offsets.length - 1]));
+ metric.getLargestBucketOffset()));
for (int i = 0; i < result.length; i++)
result[i] = Double.NaN;
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
index a5c51c8..fd22f6f 100644
--- a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
+++ b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
@@ -68,6 +68,18 @@ public class EstimatedHistogram
buckets = new AtomicLongArray(bucketData);
}
+ /**
+ * Create EstimatedHistogram from only bucket data.
+ *
+ * @param bucketData bucket data
+ */
+ public EstimatedHistogram(long[] bucketData)
+ {
+ assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0";
+ bucketOffsets = newOffsets(bucketData.length - 1);
+ buckets = new AtomicLongArray(bucketData);
+ }
+
private static long[] newOffsets(int size)
{
long[] result = new long[size];
@@ -226,6 +238,14 @@ public class EstimatedHistogram
}
/**
+ * @return the largest bucket offset
+ */
+ public long getLargestBucketOffset()
+ {
+ return bucketOffsets[bucketOffsets.length - 1];
+ }
+
+ /**
* @return true if this histogram has overflowed -- that is, a value larger than our largest bucket could bound was added
*/
public boolean isOverflowed()
[07/15] cassandra git commit: Merge branch 'cassandra-2.1' into
cassandra-2.2
Posted by yu...@apache.org.
Merge branch 'cassandra-2.1' into cassandra-2.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1dac59d1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1dac59d1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1dac59d1
Branch: refs/heads/cassandra-2.2
Commit: 1dac59d1e75102480a1cb4575cd5c0c30ba6c8c0
Parents: 6ff0065 105fbb3
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:35 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:35 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[08/15] cassandra git commit: Merge branch 'cassandra-2.1' into
cassandra-2.2
Posted by yu...@apache.org.
Merge branch 'cassandra-2.1' into cassandra-2.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1dac59d1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1dac59d1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1dac59d1
Branch: refs/heads/cassandra-3.0
Commit: 1dac59d1e75102480a1cb4575cd5c0c30ba6c8c0
Parents: 6ff0065 105fbb3
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:35 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:35 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[12/15] cassandra git commit: Merge branch 'cassandra-2.2' into
cassandra-3.0
Posted by yu...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/202786e0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/202786e0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/202786e0
Branch: refs/heads/cassandra-3.0
Commit: 202786e065acc82482333a11d92dd942017506f3
Parents: 500d6b3 1dac59d
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:42 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:42 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[03/15] cassandra git commit: Backport CASSANDRA-10859
Posted by yu...@apache.org.
Backport CASSANDRA-10859
patch by yukim; reviewed by thobbs for CASSANDRA-11415
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/105fbb35
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/105fbb35
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/105fbb35
Branch: refs/heads/trunk
Commit: 105fbb35db228aa47b7de079795d61e748ed8abc
Parents: 5a45aa6
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 23 14:53:39 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:47:42 2016 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/tools/NodeProbe.java | 5 ++---
.../cassandra/utils/EstimatedHistogram.java | 20 ++++++++++++++++++++
3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 65d094f..af2518c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.14
+ * Backport CASSANDRA-10859 (CASSANDRA-11415)
* COPY FROM fails when importing blob (CASSANDRA-11375)
* Backport CASSANDRA-10679 (CASSANDRA-9598)
* Don't do defragmentation if reading from repaired sstables (CASSANDRA-10342)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index ab08e9f..13c7acf 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1265,13 +1265,12 @@ public class NodeProbe implements AutoCloseable
}
double[] offsetPercentiles = new double[] { 0.5, 0.75, 0.95, 0.98, 0.99 };
- long[] offsets = new EstimatedHistogram(counts.length).getBucketOffsets();
- EstimatedHistogram metric = new EstimatedHistogram(offsets, counts);
+ EstimatedHistogram metric = new EstimatedHistogram(counts);
if (metric.isOverflowed())
{
System.err.println(String.format("EstimatedHistogram overflowed larger than %s, unable to calculate percentiles",
- offsets[offsets.length - 1]));
+ metric.getLargestBucketOffset()));
for (int i = 0; i < result.length; i++)
result[i] = Double.NaN;
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
index a5c51c8..fd22f6f 100644
--- a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
+++ b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
@@ -68,6 +68,18 @@ public class EstimatedHistogram
buckets = new AtomicLongArray(bucketData);
}
+ /**
+ * Create EstimatedHistogram from only bucket data.
+ *
+ * @param bucketData bucket data
+ */
+ public EstimatedHistogram(long[] bucketData)
+ {
+ assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0";
+ bucketOffsets = newOffsets(bucketData.length - 1);
+ buckets = new AtomicLongArray(bucketData);
+ }
+
private static long[] newOffsets(int size)
{
long[] result = new long[size];
@@ -226,6 +238,14 @@ public class EstimatedHistogram
}
/**
+ * @return the largest bucket offset
+ */
+ public long getLargestBucketOffset()
+ {
+ return bucketOffsets[bucketOffsets.length - 1];
+ }
+
+ /**
* @return true if this histogram has overflowed -- that is, a value larger than our largest bucket could bound was added
*/
public boolean isOverflowed()
[11/15] cassandra git commit: Merge branch 'cassandra-2.2' into
cassandra-3.0
Posted by yu...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/202786e0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/202786e0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/202786e0
Branch: refs/heads/cassandra-3.5
Commit: 202786e065acc82482333a11d92dd942017506f3
Parents: 500d6b3 1dac59d
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:42 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:42 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[10/15] cassandra git commit: Merge branch 'cassandra-2.2' into
cassandra-3.0
Posted by yu...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/202786e0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/202786e0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/202786e0
Branch: refs/heads/trunk
Commit: 202786e065acc82482333a11d92dd942017506f3
Parents: 500d6b3 1dac59d
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:42 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:42 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[04/15] cassandra git commit: Backport CASSANDRA-10859
Posted by yu...@apache.org.
Backport CASSANDRA-10859
patch by yukim; reviewed by thobbs for CASSANDRA-11415
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/105fbb35
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/105fbb35
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/105fbb35
Branch: refs/heads/cassandra-3.0
Commit: 105fbb35db228aa47b7de079795d61e748ed8abc
Parents: 5a45aa6
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 23 14:53:39 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:47:42 2016 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/tools/NodeProbe.java | 5 ++---
.../cassandra/utils/EstimatedHistogram.java | 20 ++++++++++++++++++++
3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 65d094f..af2518c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.14
+ * Backport CASSANDRA-10859 (CASSANDRA-11415)
* COPY FROM fails when importing blob (CASSANDRA-11375)
* Backport CASSANDRA-10679 (CASSANDRA-9598)
* Don't do defragmentation if reading from repaired sstables (CASSANDRA-10342)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index ab08e9f..13c7acf 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1265,13 +1265,12 @@ public class NodeProbe implements AutoCloseable
}
double[] offsetPercentiles = new double[] { 0.5, 0.75, 0.95, 0.98, 0.99 };
- long[] offsets = new EstimatedHistogram(counts.length).getBucketOffsets();
- EstimatedHistogram metric = new EstimatedHistogram(offsets, counts);
+ EstimatedHistogram metric = new EstimatedHistogram(counts);
if (metric.isOverflowed())
{
System.err.println(String.format("EstimatedHistogram overflowed larger than %s, unable to calculate percentiles",
- offsets[offsets.length - 1]));
+ metric.getLargestBucketOffset()));
for (int i = 0; i < result.length; i++)
result[i] = Double.NaN;
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
index a5c51c8..fd22f6f 100644
--- a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
+++ b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
@@ -68,6 +68,18 @@ public class EstimatedHistogram
buckets = new AtomicLongArray(bucketData);
}
+ /**
+ * Create EstimatedHistogram from only bucket data.
+ *
+ * @param bucketData bucket data
+ */
+ public EstimatedHistogram(long[] bucketData)
+ {
+ assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0";
+ bucketOffsets = newOffsets(bucketData.length - 1);
+ buckets = new AtomicLongArray(bucketData);
+ }
+
private static long[] newOffsets(int size)
{
long[] result = new long[size];
@@ -226,6 +238,14 @@ public class EstimatedHistogram
}
/**
+ * @return the largest bucket offset
+ */
+ public long getLargestBucketOffset()
+ {
+ return bucketOffsets[bucketOffsets.length - 1];
+ }
+
+ /**
* @return true if this histogram has overflowed -- that is, a value larger than our largest bucket could bound was added
*/
public boolean isOverflowed()
[13/15] cassandra git commit: Merge branch 'cassandra-3.0' into
cassandra-3.5
Posted by yu...@apache.org.
Merge branch 'cassandra-3.0' into cassandra-3.5
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7fbdce81
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7fbdce81
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7fbdce81
Branch: refs/heads/cassandra-3.5
Commit: 7fbdce812d268fb8681e8b553cf521f9e47a3531
Parents: 9b1968f 202786e
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:51 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:51 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[15/15] cassandra git commit: Merge branch 'cassandra-3.5' into trunk
Posted by yu...@apache.org.
Merge branch 'cassandra-3.5' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d00bda88
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d00bda88
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d00bda88
Branch: refs/heads/trunk
Commit: d00bda88b1c83a296a026f5ce14482bbe9a31b4c
Parents: 7f6d70d 7fbdce8
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:59 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:59 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[09/15] cassandra git commit: Merge branch 'cassandra-2.1' into
cassandra-2.2
Posted by yu...@apache.org.
Merge branch 'cassandra-2.1' into cassandra-2.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1dac59d1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1dac59d1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1dac59d1
Branch: refs/heads/cassandra-3.5
Commit: 1dac59d1e75102480a1cb4575cd5c0c30ba6c8c0
Parents: 6ff0065 105fbb3
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:35 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:35 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[05/15] cassandra git commit: Backport CASSANDRA-10859
Posted by yu...@apache.org.
Backport CASSANDRA-10859
patch by yukim; reviewed by thobbs for CASSANDRA-11415
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/105fbb35
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/105fbb35
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/105fbb35
Branch: refs/heads/cassandra-3.5
Commit: 105fbb35db228aa47b7de079795d61e748ed8abc
Parents: 5a45aa6
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 23 14:53:39 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:47:42 2016 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/tools/NodeProbe.java | 5 ++---
.../cassandra/utils/EstimatedHistogram.java | 20 ++++++++++++++++++++
3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 65d094f..af2518c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.14
+ * Backport CASSANDRA-10859 (CASSANDRA-11415)
* COPY FROM fails when importing blob (CASSANDRA-11375)
* Backport CASSANDRA-10679 (CASSANDRA-9598)
* Don't do defragmentation if reading from repaired sstables (CASSANDRA-10342)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index ab08e9f..13c7acf 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1265,13 +1265,12 @@ public class NodeProbe implements AutoCloseable
}
double[] offsetPercentiles = new double[] { 0.5, 0.75, 0.95, 0.98, 0.99 };
- long[] offsets = new EstimatedHistogram(counts.length).getBucketOffsets();
- EstimatedHistogram metric = new EstimatedHistogram(offsets, counts);
+ EstimatedHistogram metric = new EstimatedHistogram(counts);
if (metric.isOverflowed())
{
System.err.println(String.format("EstimatedHistogram overflowed larger than %s, unable to calculate percentiles",
- offsets[offsets.length - 1]));
+ metric.getLargestBucketOffset()));
for (int i = 0; i < result.length; i++)
result[i] = Double.NaN;
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
index a5c51c8..fd22f6f 100644
--- a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
+++ b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
@@ -68,6 +68,18 @@ public class EstimatedHistogram
buckets = new AtomicLongArray(bucketData);
}
+ /**
+ * Create EstimatedHistogram from only bucket data.
+ *
+ * @param bucketData bucket data
+ */
+ public EstimatedHistogram(long[] bucketData)
+ {
+ assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0";
+ bucketOffsets = newOffsets(bucketData.length - 1);
+ buckets = new AtomicLongArray(bucketData);
+ }
+
private static long[] newOffsets(int size)
{
long[] result = new long[size];
@@ -226,6 +238,14 @@ public class EstimatedHistogram
}
/**
+ * @return the largest bucket offset
+ */
+ public long getLargestBucketOffset()
+ {
+ return bucketOffsets[bucketOffsets.length - 1];
+ }
+
+ /**
* @return true if this histogram has overflowed -- that is, a value larger than our largest bucket could bound was added
*/
public boolean isOverflowed()
[02/15] cassandra git commit: Backport CASSANDRA-10859
Posted by yu...@apache.org.
Backport CASSANDRA-10859
patch by yukim; reviewed by thobbs for CASSANDRA-11415
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/105fbb35
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/105fbb35
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/105fbb35
Branch: refs/heads/cassandra-2.2
Commit: 105fbb35db228aa47b7de079795d61e748ed8abc
Parents: 5a45aa6
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 23 14:53:39 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:47:42 2016 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/tools/NodeProbe.java | 5 ++---
.../cassandra/utils/EstimatedHistogram.java | 20 ++++++++++++++++++++
3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 65d094f..af2518c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.1.14
+ * Backport CASSANDRA-10859 (CASSANDRA-11415)
* COPY FROM fails when importing blob (CASSANDRA-11375)
* Backport CASSANDRA-10679 (CASSANDRA-9598)
* Don't do defragmentation if reading from repaired sstables (CASSANDRA-10342)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index ab08e9f..13c7acf 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -1265,13 +1265,12 @@ public class NodeProbe implements AutoCloseable
}
double[] offsetPercentiles = new double[] { 0.5, 0.75, 0.95, 0.98, 0.99 };
- long[] offsets = new EstimatedHistogram(counts.length).getBucketOffsets();
- EstimatedHistogram metric = new EstimatedHistogram(offsets, counts);
+ EstimatedHistogram metric = new EstimatedHistogram(counts);
if (metric.isOverflowed())
{
System.err.println(String.format("EstimatedHistogram overflowed larger than %s, unable to calculate percentiles",
- offsets[offsets.length - 1]));
+ metric.getLargestBucketOffset()));
for (int i = 0; i < result.length; i++)
result[i] = Double.NaN;
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/105fbb35/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
index a5c51c8..fd22f6f 100644
--- a/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
+++ b/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
@@ -68,6 +68,18 @@ public class EstimatedHistogram
buckets = new AtomicLongArray(bucketData);
}
+ /**
+ * Create EstimatedHistogram from only bucket data.
+ *
+ * @param bucketData bucket data
+ */
+ public EstimatedHistogram(long[] bucketData)
+ {
+ assert bucketData != null && bucketData.length > 0 : "Bucket data must be an array of size more than 0";
+ bucketOffsets = newOffsets(bucketData.length - 1);
+ buckets = new AtomicLongArray(bucketData);
+ }
+
private static long[] newOffsets(int size)
{
long[] result = new long[size];
@@ -226,6 +238,14 @@ public class EstimatedHistogram
}
/**
+ * @return the largest bucket offset
+ */
+ public long getLargestBucketOffset()
+ {
+ return bucketOffsets[bucketOffsets.length - 1];
+ }
+
+ /**
* @return true if this histogram has overflowed -- that is, a value larger than our largest bucket could bound was added
*/
public boolean isOverflowed()
[14/15] cassandra git commit: Merge branch 'cassandra-3.0' into
cassandra-3.5
Posted by yu...@apache.org.
Merge branch 'cassandra-3.0' into cassandra-3.5
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7fbdce81
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7fbdce81
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7fbdce81
Branch: refs/heads/trunk
Commit: 7fbdce812d268fb8681e8b553cf521f9e47a3531
Parents: 9b1968f 202786e
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:51 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:51 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[06/15] cassandra git commit: Merge branch 'cassandra-2.1' into
cassandra-2.2
Posted by yu...@apache.org.
Merge branch 'cassandra-2.1' into cassandra-2.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1dac59d1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1dac59d1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1dac59d1
Branch: refs/heads/trunk
Commit: 1dac59d1e75102480a1cb4575cd5c0c30ba6c8c0
Parents: 6ff0065 105fbb3
Author: Yuki Morishita <yu...@apache.org>
Authored: Wed Mar 30 16:51:35 2016 -0500
Committer: Yuki Morishita <yu...@apache.org>
Committed: Wed Mar 30 16:51:35 2016 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------