You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/09/01 15:16:06 UTC

[1/3] cassandra git commit: Fix Coverity Defects

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 07594ee05 -> 80a141ce0
  refs/heads/trunk c2ee6bac3 -> d013a8952


Fix Coverity Defects


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

Branch: refs/heads/cassandra-3.0
Commit: 80a141ce01c9f5780be20d55fd546c9a7abaae00
Parents: 07594ee
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Sep 1 14:15:34 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Sep 1 14:15:34 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/db/rows/EncodingStats.java    | 17 +----------------
 .../cassandra/db/rows/UnfilteredSerializer.java    |  4 ++--
 2 files changed, 3 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80a141ce/src/java/org/apache/cassandra/db/rows/EncodingStats.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/rows/EncodingStats.java b/src/java/org/apache/cassandra/db/rows/EncodingStats.java
index 5f1a749..2970fa3 100644
--- a/src/java/org/apache/cassandra/db/rows/EncodingStats.java
+++ b/src/java/org/apache/cassandra/db/rows/EncodingStats.java
@@ -129,7 +129,7 @@ public class EncodingStats
     @Override
     public String toString()
     {
-        return String.format("EncodingStats(ts=%d, ldt=%d, ttl=%d, avgColPerRow=%d)", minTimestamp, minLocalDeletionTime, minTTL);
+        return String.format("EncodingStats(ts=%d, ldt=%d, ttl=%d)", minTimestamp, minLocalDeletionTime, minTTL);
     }
 
     public static class Collector implements PartitionStatisticsCollector
@@ -143,10 +143,6 @@ public class EncodingStats
         private boolean isTTLSet;
         private int minTTL = Integer.MAX_VALUE;
 
-        private boolean isColumnSetPerRowSet;
-        private long totalColumnsSet;
-        private long rows;
-
         public void update(LivenessInfo info)
         {
             if (info.isEmpty())
@@ -204,17 +200,6 @@ public class EncodingStats
 
         public void updateColumnSetPerRow(long columnSetInRow)
         {
-            updateColumnSetPerRow(columnSetInRow, 1);
-        }
-
-        public void updateColumnSetPerRow(long totalColumnsSet, long rows)
-        {
-            if (totalColumnsSet < 0 || rows < 0)
-                return;
-
-            this.isColumnSetPerRowSet = true;
-            this.totalColumnsSet += totalColumnsSet;
-            this.rows += rows;
         }
 
         public void updateHasLegacyCounterShards(boolean hasLegacyCounterShards)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80a141ce/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java b/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
index 0866810..60bd06f 100644
--- a/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
+++ b/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
@@ -147,7 +147,7 @@ public class UnfilteredSerializer
     throws IOException
     {
         if (hasComplexDeletion)
-            header.writeDeletionTime(data == null ? DeletionTime.LIVE : data.complexDeletion(), out);
+            header.writeDeletionTime(data.complexDeletion(), out);
 
         out.writeUnsignedVInt(data.cellsCount());
         for (Cell cell : data)
@@ -222,7 +222,7 @@ public class UnfilteredSerializer
         long size = 0;
 
         if (hasComplexDeletion)
-            size += header.deletionTimeSerializedSize(data == null ? DeletionTime.LIVE : data.complexDeletion());
+            size += header.deletionTimeSerializedSize(data.complexDeletion());
 
         size += TypeSizes.sizeofUnsignedVInt(data.cellsCount());
         for (Cell cell : data)


[3/3] cassandra git commit: Merge branch 'cassandra-3.0' into trunk

Posted by be...@apache.org.
Merge branch 'cassandra-3.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/d013a895
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d013a895
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d013a895

Branch: refs/heads/trunk
Commit: d013a895299ca695a2fe4fe571363efbf2700066
Parents: c2ee6ba 80a141c
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Sep 1 14:15:39 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Sep 1 14:15:39 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/db/rows/EncodingStats.java    | 17 +----------------
 .../cassandra/db/rows/UnfilteredSerializer.java    |  4 ++--
 2 files changed, 3 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[2/3] cassandra git commit: Fix Coverity Defects

Posted by be...@apache.org.
Fix Coverity Defects


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

Branch: refs/heads/trunk
Commit: 80a141ce01c9f5780be20d55fd546c9a7abaae00
Parents: 07594ee
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Sep 1 14:15:34 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Sep 1 14:15:34 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/db/rows/EncodingStats.java    | 17 +----------------
 .../cassandra/db/rows/UnfilteredSerializer.java    |  4 ++--
 2 files changed, 3 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/80a141ce/src/java/org/apache/cassandra/db/rows/EncodingStats.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/rows/EncodingStats.java b/src/java/org/apache/cassandra/db/rows/EncodingStats.java
index 5f1a749..2970fa3 100644
--- a/src/java/org/apache/cassandra/db/rows/EncodingStats.java
+++ b/src/java/org/apache/cassandra/db/rows/EncodingStats.java
@@ -129,7 +129,7 @@ public class EncodingStats
     @Override
     public String toString()
     {
-        return String.format("EncodingStats(ts=%d, ldt=%d, ttl=%d, avgColPerRow=%d)", minTimestamp, minLocalDeletionTime, minTTL);
+        return String.format("EncodingStats(ts=%d, ldt=%d, ttl=%d)", minTimestamp, minLocalDeletionTime, minTTL);
     }
 
     public static class Collector implements PartitionStatisticsCollector
@@ -143,10 +143,6 @@ public class EncodingStats
         private boolean isTTLSet;
         private int minTTL = Integer.MAX_VALUE;
 
-        private boolean isColumnSetPerRowSet;
-        private long totalColumnsSet;
-        private long rows;
-
         public void update(LivenessInfo info)
         {
             if (info.isEmpty())
@@ -204,17 +200,6 @@ public class EncodingStats
 
         public void updateColumnSetPerRow(long columnSetInRow)
         {
-            updateColumnSetPerRow(columnSetInRow, 1);
-        }
-
-        public void updateColumnSetPerRow(long totalColumnsSet, long rows)
-        {
-            if (totalColumnsSet < 0 || rows < 0)
-                return;
-
-            this.isColumnSetPerRowSet = true;
-            this.totalColumnsSet += totalColumnsSet;
-            this.rows += rows;
         }
 
         public void updateHasLegacyCounterShards(boolean hasLegacyCounterShards)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/80a141ce/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java b/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
index 0866810..60bd06f 100644
--- a/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
+++ b/src/java/org/apache/cassandra/db/rows/UnfilteredSerializer.java
@@ -147,7 +147,7 @@ public class UnfilteredSerializer
     throws IOException
     {
         if (hasComplexDeletion)
-            header.writeDeletionTime(data == null ? DeletionTime.LIVE : data.complexDeletion(), out);
+            header.writeDeletionTime(data.complexDeletion(), out);
 
         out.writeUnsignedVInt(data.cellsCount());
         for (Cell cell : data)
@@ -222,7 +222,7 @@ public class UnfilteredSerializer
         long size = 0;
 
         if (hasComplexDeletion)
-            size += header.deletionTimeSerializedSize(data == null ? DeletionTime.LIVE : data.complexDeletion());
+            size += header.deletionTimeSerializedSize(data.complexDeletion());
 
         size += TypeSizes.sizeofUnsignedVInt(data.cellsCount());
         for (Cell cell : data)