cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/3] cassandra git commit: Do not load keyspace when creating sstable writer
Date Wed, 07 Oct 2015 21:56:39 GMT
Do not load keyspace when creating sstable writer

patch by carlyeks; reviewed by yukim for CASSANDRA-10443


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

Branch: refs/heads/trunk
Commit: 9415c8460ce2bd72502cc35dd74a9e0e0358998c
Parents: 6c3fa8e
Author: Carl Yeksigian <carl@apache.org>
Authored: Wed Oct 7 16:53:55 2015 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Wed Oct 7 16:53:55 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 src/java/org/apache/cassandra/io/sstable/SSTableTxnWriter.java | 6 ------
 .../cassandra/io/sstable/CQLSSTableWriterClientTest.java       | 2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9415c846/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0bac64e..72c09d3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0
+ * Do not load keyspace when creating sstable writer (CASSANDRA-10443)
  * If node is not yet gossiping write all MV updates to batchlog only (CASSANDRA-10413)
  * Re-populate token metadata after commit log recovery (CASSANDRA-10293)
  * Provide additional metrics for materialized views (CASSANDRA-10323)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9415c846/src/java/org/apache/cassandra/io/sstable/SSTableTxnWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableTxnWriter.java b/src/java/org/apache/cassandra/io/sstable/SSTableTxnWriter.java
index 0b50901..9ad5a80 100644
--- a/src/java/org/apache/cassandra/io/sstable/SSTableTxnWriter.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableTxnWriter.java
@@ -104,12 +104,6 @@ public class SSTableTxnWriter extends Transactional.AbstractTransactional
implem
     @SuppressWarnings("resource") // log and writer closed during postCleanup
     public static SSTableTxnWriter create(CFMetaData cfm, Descriptor descriptor, long keyCount,
long repairedAt, int sstableLevel, SerializationHeader header)
     {
-        if (Keyspace.open(cfm.ksName).hasColumnFamilyStore(cfm.cfId))
-        {
-            ColumnFamilyStore cfs = Keyspace.open(cfm.ksName).getColumnFamilyStore(cfm.cfId);
-            return create(cfs, descriptor, keyCount, repairedAt, sstableLevel, header);
-        }
-
         // if the column family store does not exist, we create a new default SSTableMultiWriter
to use:
         LifecycleTransaction txn = LifecycleTransaction.offline(OperationType.WRITE, descriptor.directory);
         MetadataCollector collector = new MetadataCollector(cfm.comparator).sstableLevel(sstableLevel);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9415c846/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterClientTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterClientTest.java b/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterClientTest.java
index a9165f7..d38276f 100644
--- a/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterClientTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/CQLSSTableWriterClientTest.java
@@ -45,7 +45,7 @@ public class CQLSSTableWriterClientTest
     public void setUp()
     {
         this.testDirectory = Files.createTempDir();
-        Keyspace.setInitialized();
+        Config.setClientMode(true);
     }
 
     @After


Mime
View raw message