Additional NEWS and test fixes for 2.0 (part of CASSANDRA-5909) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3bba32c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3bba32c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3bba32c4
Branch: refs/heads/trunk Commit: 3bba32c409e9e6632063a5b5086e8ceb110dab33 Parents: 86b3270 Author: Vijay Parthasarathy <vijay2...@gmail.com> Authored: Sat Sep 14 17:45:00 2013 -0700 Committer: Vijay Parthasarathy <vijay2...@gmail.com> Committed: Sat Sep 14 17:45:00 2013 -0700 ---------------------------------------------------------------------- NEWS.txt | 2 ++ conf/commitlog_archiving.properties | 2 +- .../org/apache/cassandra/db/commitlog/CommitLogArchiver.java | 4 ++-- test/unit/org/apache/cassandra/db/RecoveryManagerTest.java | 7 +++---- 4 files changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3bba32c4/NEWS.txt ---------------------------------------------------------------------- diff --git a/NEWS.txt b/NEWS.txt index 4e11bf2..68da597 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -76,6 +76,8 @@ Operations use DESCRIBE FULL SCHEMA if you need the schema of system_* keyspaces. - CQL2 has been deprecated, and will be removed entirely in 2.2. See CASSANDRA-5918 for details. + - Commit log archiver now assumes the client time stamp to be in microsecond + precision, during restore. Please refer to commitlog_archiving.properties. Features http://git-wip-us.apache.org/repos/asf/cassandra/blob/3bba32c4/conf/commitlog_archiving.properties ---------------------------------------------------------------------- diff --git a/conf/commitlog_archiving.properties b/conf/commitlog_archiving.properties index b19cfed..0687cd6 100644 --- a/conf/commitlog_archiving.properties +++ b/conf/commitlog_archiving.properties @@ -54,4 +54,4 @@ restore_directories= restore_point_in_time= # precision of the timestamp used in the inserts (MILLISECONDS, MICROSECONDS, ...) -precision=MILLISECONDS \ No newline at end of file +precision=MICROSECONDS \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cassandra/blob/3bba32c4/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java index 78026a4..f020182 100644 --- a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java +++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java @@ -73,7 +73,7 @@ public class CommitLogArchiver restoreCommand = null; restoreDirectories = null; restorePointInTime = Long.MAX_VALUE; - precision = TimeUnit.MILLISECONDS; + precision = TimeUnit.MICROSECONDS; } else { @@ -82,7 +82,7 @@ public class CommitLogArchiver restoreCommand = commitlog_commands.getProperty("restore_command"); restoreDirectories = commitlog_commands.getProperty("restore_directories"); String targetTime = commitlog_commands.getProperty("restore_point_in_time"); - precision = TimeUnit.valueOf(commitlog_commands.getProperty("precision", "MILLISECONDS")); + precision = TimeUnit.valueOf(commitlog_commands.getProperty("precision", "MICROSECONDS")); try { restorePointInTime = Strings.isNullOrEmpty(targetTime) ? Long.MAX_VALUE : format.parse(targetTime).getTime(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/3bba32c4/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java ---------------------------------------------------------------------- diff --git a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java index 4cb9e4e..c053211 100644 --- a/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java +++ b/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java @@ -109,15 +109,14 @@ public class RecoveryManagerTest extends SchemaLoader Date date = CommitLogArchiver.format.parse("2112:12:12 12:12:12"); long timeMS = date.getTime() - 5000; - Table keyspace1 = Table.open("Keyspace1"); + Keyspace keyspace1 = Keyspace.open("Keyspace1"); DecoratedKey dk = Util.dk("dkey"); for (int i = 0; i < 10; ++i) { long ts = TimeUnit.MILLISECONDS.toMicros(timeMS + (i * 1000)); - ColumnFamily cf = ColumnFamily.create("Keyspace1", "Standard1"); + ColumnFamily cf = TreeMapBackedSortedColumns.factory.create("Keyspace1", "Standard1"); cf.addColumn(column("name-" + i, "value", ts)); - RowMutation rm = new RowMutation("Keyspace1", dk.key); - rm.add(cf); + RowMutation rm = new RowMutation("Keyspace1", dk.key, cf); rm.apply(); } keyspace1.getColumnFamilyStore("Standard1").clearUnsafe();