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 Fri, 17 Jun 2016 02:33:04 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 27395e78b -> 057c32997


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/057c3299
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/057c3299
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/057c3299

Branch: refs/heads/trunk
Commit: 057c32997442b5df8842fe46aa2ebe9b178d8647
Parents: 27395e7
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Thu Jun 16 22:32:00 2016 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Thu Jun 16 22:32:00 2016 -0400

----------------------------------------------------------------------
 .../cassandra/db/compaction/TimeWindowCompactionStrategy.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/057c3299/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java
b/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java
index df688c5..70f29e9 100644
--- a/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategy.java
@@ -189,16 +189,16 @@ public class TimeWindowCompactionStrategy extends AbstractCompactionStrategy
         switch(windowTimeUnit)
         {
             case MINUTES:
-                lowerTimestamp = timestampInSeconds - ((timestampInSeconds) % (60 * windowTimeSize));
+                lowerTimestamp = timestampInSeconds - ((timestampInSeconds) % (60L * windowTimeSize));
                 upperTimestamp = (lowerTimestamp + (60L * (windowTimeSize - 1L))) + 59L;
                 break;
             case HOURS:
-                lowerTimestamp = timestampInSeconds - ((timestampInSeconds) % (3600 * windowTimeSize));
+                lowerTimestamp = timestampInSeconds - ((timestampInSeconds) % (3600L * windowTimeSize));
                 upperTimestamp = (lowerTimestamp + (3600L * (windowTimeSize - 1L))) + 3599L;
                 break;
             case DAYS:
             default:
-                lowerTimestamp = timestampInSeconds - ((timestampInSeconds) % (86400 * windowTimeSize));
+                lowerTimestamp = timestampInSeconds - ((timestampInSeconds) % (86400L * windowTimeSize));
                 upperTimestamp = (lowerTimestamp + (86400L * (windowTimeSize - 1L))) + 86399L;
                 break;
         }


Mime
View raw message