cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: use long math for long results
Date Wed, 18 Mar 2015 01:17:08 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4a4f83334 -> 5a09483df


use long math for long results


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

Branch: refs/heads/trunk
Commit: 5a09483df399b9e498e30624d0e3227fb60d7fa1
Parents: 4a4f833
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Tue Mar 17 21:16:49 2015 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Tue Mar 17 21:16:49 2015 -0400

----------------------------------------------------------------------
 .../org/apache/cassandra/io/compress/CompressionMetadata.java    | 4 ++--
 src/java/org/apache/cassandra/utils/StreamingHistogram.java      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a09483d/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java b/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
index 182cdd2..928541a 100644
--- a/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
+++ b/src/java/org/apache/cassandra/io/compress/CompressionMetadata.java
@@ -188,7 +188,7 @@ public class CompressionMetadata
             {
                 try
                 {
-                    offsets.setLong(i * 8, input.readLong());
+                    offsets.setLong(i * 8L, input.readLong());
                 }
                 catch (EOFException e)
                 {
@@ -290,7 +290,7 @@ public class CompressionMetadata
         {
             if (count == maxCount)
             {
-                SafeMemory newOffsets = offsets.copy((maxCount *= 2L) * 8);
+                SafeMemory newOffsets = offsets.copy((maxCount *= 2L) * 8L);
                 offsets.close();
                 offsets = newOffsets;
             }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a09483d/src/java/org/apache/cassandra/utils/StreamingHistogram.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/StreamingHistogram.java b/src/java/org/apache/cassandra/utils/StreamingHistogram.java
index 3f5a715..eb884be 100644
--- a/src/java/org/apache/cassandra/utils/StreamingHistogram.java
+++ b/src/java/org/apache/cassandra/utils/StreamingHistogram.java
@@ -201,7 +201,7 @@ public class StreamingHistogram
             Map<Double, Long> entries = histogram.getAsMap();
             size += typeSizes.sizeof(entries.size());
             // size of entries = size * (8(double) + 8(long))
-            size += entries.size() * (8 + 8);
+            size += entries.size() * (8L + 8L);
             return size;
         }
     }


Mime
View raw message