Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts:
test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/43d248f9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/43d248f9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/43d248f9
Branch: refs/heads/cassandra-2.1
Commit: 43d248f913b5cc9a7a3f33ef133de1d9307e18f1
Parents: cf9b8c9 760441b
Author: Aleksey Yeschenko <[email protected]>
Authored: Wed Jun 18 12:57:32 2014 -0700
Committer: Aleksey Yeschenko <[email protected]>
Committed: Wed Jun 18 12:57:32 2014 -0700
----------------------------------------------------------------------
test/unit/org/apache/cassandra/db/BatchlogManagerTest.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/43d248f9/test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
index e0eae6b,0b6a908..57f6844
--- a/test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
+++ b/test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
@@@ -62,20 -60,15 +62,21 @@@ public class BatchlogManagerTest extend
// Generate 1000 mutations and put them all into the batchlog.
// Half (500) ready to be replayed, half not.
+ CellNameType comparator =
Keyspace.open("Keyspace1").getColumnFamilyStore("Standard1").metadata.comparator;
for (int i = 0; i < 1000; i++)
{
- RowMutation mutation = new RowMutation("Keyspace1", bytes(i));
- mutation.add("Standard1", bytes(i), bytes(i),
System.currentTimeMillis());
+ Mutation mutation = new Mutation("Keyspace1", bytes(i));
+ mutation.add("Standard1", comparator.makeCellName(bytes(i)),
bytes(i), System.currentTimeMillis());
- long timestamp = System.currentTimeMillis();
- if (i < 500)
- timestamp -= DatabaseDescriptor.getWriteRpcTimeout() * 2;
+ long timestamp = i < 500
+ ? (System.currentTimeMillis() -
DatabaseDescriptor.getWriteRpcTimeout() * 2) * 1000
+ : Long.MAX_VALUE;
-
BatchlogManager.getBatchlogMutationFor(Collections.singleton(mutation),
UUIDGen.getTimeUUID(), timestamp).apply();
++
+
BatchlogManager.getBatchlogMutationFor(Collections.singleton(mutation),
+ UUIDGen.getTimeUUID(),
+
MessagingService.current_version,
- timestamp * 1000)
++ timestamp)
+ .apply();
}
// Flush the batchlog to disk (see CASSANDRA-6822).