cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/5] git commit: Merge branch 'cassandra-1.1' into trunk
Date Sun, 18 Mar 2012 10:17:51 GMT
Updated Branches:
  refs/heads/trunk 51a658d22 -> 15ae2f630


Merge branch 'cassandra-1.1' into trunk

Conflicts:
	src/java/org/apache/cassandra/db/migration/AddColumnFamily.java
	src/java/org/apache/cassandra/db/migration/AddKeyspace.java
	src/java/org/apache/cassandra/db/migration/DropColumnFamily.java
	src/java/org/apache/cassandra/db/migration/DropKeyspace.java
	src/java/org/apache/cassandra/db/migration/Migration.java
	src/java/org/apache/cassandra/db/migration/MigrationHelper.java
	src/java/org/apache/cassandra/db/migration/UpdateColumnFamily.java
	src/java/org/apache/cassandra/db/migration/UpdateKeyspace.java
	test/unit/org/apache/cassandra/io/sstable/SSTableTest.java


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

Branch: refs/heads/trunk
Commit: 15ae2f6306406e8c68dbffe2987886c314665114
Parents: 51a658d fe98003
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Sun Mar 18 11:17:28 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Sun Mar 18 11:17:28 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/config/CFMetaData.java    |   25 +-
 .../apache/cassandra/config/ColumnDefinition.java  |    6 +-
 .../cassandra/config/DatabaseDescriptor.java       |    4 +-
 .../org/apache/cassandra/config/KSMetaData.java    |   10 +-
 src/java/org/apache/cassandra/config/Schema.java   |   22 +--
 .../apache/cassandra/cql/DropIndexStatement.java   |    5 +-
 .../org/apache/cassandra/cql/QueryProcessor.java   |   62 +---
 .../cql3/statements/AlterTableStatement.java       |  163 +++++-----
 .../statements/CreateColumnFamilyStatement.java    |    7 +-
 .../cql3/statements/CreateIndexStatement.java      |   82 ++---
 .../cql3/statements/CreateKeyspaceStatement.java   |    7 +-
 .../cql3/statements/DropColumnFamilyStatement.java |    7 +-
 .../cql3/statements/DropIndexStatement.java        |    7 +-
 .../cql3/statements/DropKeyspaceStatement.java     |    7 +-
 .../cql3/statements/SchemaAlteringStatement.java   |   50 +---
 src/java/org/apache/cassandra/db/DefsTable.java    |  209 +++++++++++--
 src/java/org/apache/cassandra/db/Directories.java  |    2 +-
 src/java/org/apache/cassandra/db/SystemTable.java  |    5 +-
 .../cassandra/db/migration/AddColumnFamily.java    |   59 ----
 .../apache/cassandra/db/migration/AddKeyspace.java |   58 ----
 .../cassandra/db/migration/DropColumnFamily.java   |   57 ----
 .../cassandra/db/migration/DropKeyspace.java       |   53 ---
 .../apache/cassandra/db/migration/Migration.java   |  127 --------
 .../cassandra/db/migration/MigrationHelper.java    |  247 ---------------
 .../cassandra/db/migration/UpdateColumnFamily.java |   52 ---
 .../cassandra/db/migration/UpdateKeyspace.java     |   58 ----
 .../apache/cassandra/service/MigrationManager.java |  119 +++++++-
 .../org/apache/cassandra/service/StorageProxy.java |    3 +-
 .../apache/cassandra/thrift/CassandraServer.java   |   47 +--
 .../apache/cassandra/thrift/ThriftValidation.java  |    7 +-
 .../org/apache/cassandra/db/LongTableTest.java     |    4 +-
 .../apache/cassandra/db/MeteredFlusherTest.java    |    8 +-
 .../db/compaction/LongCompactionSpeedTest.java     |    4 +-
 .../cassandra/AbstractSerializationsTester.java    |    2 +-
 test/unit/org/apache/cassandra/CleanupHelper.java  |  126 --------
 test/unit/org/apache/cassandra/EmbeddedServer.java |    2 +-
 test/unit/org/apache/cassandra/SchemaLoader.java   |  115 +++++++-
 test/unit/org/apache/cassandra/cli/CliTest.java    |    6 +-
 .../apache/cassandra/config/CFMetaDataTest.java    |    4 +-
 .../cassandra/config/DatabaseDescriptorTest.java   |   12 +-
 .../unit/org/apache/cassandra/config/DefsTest.java |   94 ++----
 test/unit/org/apache/cassandra/db/CleanupTest.java |    4 +-
 .../apache/cassandra/db/ColumnFamilyStoreTest.java |    4 +-
 .../org/apache/cassandra/db/CommitLogTest.java     |    4 +-
 .../apache/cassandra/db/CounterMutationTest.java   |    4 +-
 .../unit/org/apache/cassandra/db/KeyCacheTest.java |    4 +-
 .../org/apache/cassandra/db/KeyCollisionTest.java  |    4 +-
 .../org/apache/cassandra/db/MultitableTest.java    |    4 +-
 .../unit/org/apache/cassandra/db/NameSortTest.java |    4 +-
 .../apache/cassandra/db/RecoveryManager2Test.java  |    4 +-
 .../apache/cassandra/db/RecoveryManager3Test.java  |    4 +-
 .../apache/cassandra/db/RecoveryManagerTest.java   |    4 +-
 .../cassandra/db/RecoveryManagerTruncateTest.java  |    4 +-
 .../cassandra/db/RemoveColumnFamilyTest.java       |    4 +-
 .../db/RemoveColumnFamilyWithFlush1Test.java       |    4 +-
 .../db/RemoveColumnFamilyWithFlush2Test.java       |    4 +-
 .../org/apache/cassandra/db/RemoveColumnTest.java  |    4 +-
 .../apache/cassandra/db/RemoveSubColumnTest.java   |    4 +-
 .../apache/cassandra/db/RemoveSuperColumnTest.java |    4 +-
 .../unit/org/apache/cassandra/db/RowCacheTest.java |    4 +-
 .../org/apache/cassandra/db/RowIterationTest.java  |    4 +-
 test/unit/org/apache/cassandra/db/ScrubTest.java   |    5 +-
 test/unit/org/apache/cassandra/db/TableTest.java   |    4 +-
 .../unit/org/apache/cassandra/db/TimeSortTest.java |    4 +-
 .../db/compaction/CompactionsPurgeTest.java        |    4 +-
 .../cassandra/db/compaction/CompactionsTest.java   |    4 +-
 .../cassandra/db/compaction/OneCompactionTest.java |    4 +-
 .../cassandra/db/marshal/CompositeTypeTest.java    |    4 +-
 .../db/marshal/DynamicCompositeTypeTest.java       |    4 +-
 .../org/apache/cassandra/dht/BootStrapperTest.java |    4 +-
 .../cassandra/io/BloomFilterTrackerTest.java       |    4 +-
 .../apache/cassandra/io/CompactSerializerTest.java |    4 +-
 .../cassandra/io/LazilyCompactedRowTest.java       |    4 +-
 .../cassandra/io/sstable/LegacySSTableTest.java    |    4 +-
 .../cassandra/io/sstable/SSTableReaderTest.java    |    4 +-
 .../io/sstable/SSTableSimpleWriterTest.java        |    4 +-
 .../cassandra/locator/SimpleStrategyTest.java      |    4 +-
 .../service/AntiEntropyServiceTestAbstract.java    |    4 +-
 .../cassandra/service/CassandraServerTest.java     |    4 +-
 .../service/EmbeddedCassandraServiceTest.java      |    6 +-
 .../cassandra/service/LeaveAndBootstrapTest.java   |   48 ++--
 .../org/apache/cassandra/service/MoveTest.java     |   52 ++--
 .../org/apache/cassandra/service/RemoveTest.java   |   27 ++-
 .../apache/cassandra/service/StorageProxyTest.java |    4 +-
 .../service/StorageServiceClientTest.java          |    6 +-
 .../service/StorageServiceServerTest.java          |    6 +-
 .../cassandra/streaming/StreamingTransferTest.java |    4 +-
 .../cassandra/thrift/ThriftValidationTest.java     |    4 +-
 89 files changed, 816 insertions(+), 1439 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/config/ColumnDefinition.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/config/KSMetaData.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/config/Schema.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql/DropIndexStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql/QueryProcessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/AlterTableStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/CreateColumnFamilyStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/CreateIndexStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/CreateKeyspaceStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/DropColumnFamilyStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/DropIndexStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/DropKeyspaceStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/cql3/statements/SchemaAlteringStatement.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/db/DefsTable.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/db/Directories.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/db/SystemTable.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/service/MigrationManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/MigrationManager.java
index 5ba83c6,93030cc..0d7bf4f
--- a/src/java/org/apache/cassandra/service/MigrationManager.java
+++ b/src/java/org/apache/cassandra/service/MigrationManager.java
@@@ -274,6 -364,24 +363,24 @@@ public class MigrationManager implement
          }
      }
  
+     /**
+      * Used only in case node has old style migration schema (newly updated)
+      * @return the UUID identifying version of the last applied migration
+      */
+     @Deprecated
+     public static UUID getLastMigrationId()
+     {
 -        DecoratedKey<?> dkey = StorageService.getPartitioner().decorateKey(LAST_MIGRATION_KEY);
++        DecoratedKey dkey = StorageService.getPartitioner().decorateKey(LAST_MIGRATION_KEY);
+         Table defs = Table.open(Table.SYSTEM_TABLE);
+         ColumnFamilyStore cfStore = defs.getColumnFamilyStore(DefsTable.OLD_SCHEMA_CF);
+         QueryFilter filter = QueryFilter.getNamesFilter(dkey, new QueryPath(DefsTable.OLD_SCHEMA_CF),
LAST_MIGRATION_KEY);
+         ColumnFamily cf = cfStore.getColumnFamily(filter);
+         if (cf == null || cf.getColumnNames().size() == 0)
+             return null;
+         else
+             return UUIDGen.getUUID(cf.getColumn(LAST_MIGRATION_KEY).value());
+     }
+ 
      static class MigrationTask extends WrappedRunnable
      {
          private final InetAddress endpoint;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/src/java/org/apache/cassandra/thrift/ThriftValidation.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/db/KeyCacheTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/db/KeyCollisionTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/db/TableTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
index bd49c23,3916669..e8e01a2
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
@@@ -28,9 -31,8 +28,9 @@@ import java.util.concurrent.TimeUnit
  import org.junit.Test;
  import static junit.framework.Assert.assertEquals;
  import static junit.framework.Assert.assertNotNull;
 +import static junit.framework.Assert.assertTrue;
  
- import org.apache.cassandra.CleanupHelper;
+ import org.apache.cassandra.SchemaLoader;
  import org.apache.cassandra.Util;
  import org.apache.cassandra.config.DatabaseDescriptor;
  import org.apache.cassandra.db.*;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/dht/BootStrapperTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/dht/BootStrapperTest.java
index 65a6a5c,4b19505..9e3793a
--- a/test/unit/org/apache/cassandra/dht/BootStrapperTest.java
+++ b/test/unit/org/apache/cassandra/dht/BootStrapperTest.java
@@@ -42,11 -40,9 +42,11 @@@ import org.apache.cassandra.service.Sto
  import org.apache.cassandra.streaming.OperationType;
  import org.apache.cassandra.utils.FBUtilities;
  
 +import static org.junit.Assert.*;
 +
  import static org.junit.Assert.assertEquals;
  
- public class BootStrapperTest extends CleanupHelper
+ public class BootStrapperTest extends SchemaLoader
  {
      @Test
      public void testTokenRoundtrip() throws Exception

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/15ae2f63/test/unit/org/apache/cassandra/service/RemoveTest.java
----------------------------------------------------------------------


Mime
View raw message