cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r788472 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java
Date Thu, 25 Jun 2009 19:13:59 GMT
Author: jbellis
Date: Thu Jun 25 19:13:59 2009
New Revision: 788472

URL: http://svn.apache.org/viewvc?rev=788472&view=rev
Log:
add private constructor that doesn't init writers
patch by jbellis; reviewed by Eric Evans for CASSANDRA-254

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java?rev=788472&r1=788471&r2=788472&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java Thu Jun 25 19:13:59
2009
@@ -111,9 +111,7 @@
         if (sstable == null)
         {
             assert partitioner != null;
-            sstable = new SSTable(dataFileName, 1, partitioner);
-            sstable.dataWriter_.close(); // todo this is dumb
-            sstable.indexRAF_.close();
+            sstable = new SSTable(dataFileName, partitioner);
 
             long start = System.currentTimeMillis();
             sstable.loadIndexFile();
@@ -132,6 +130,12 @@
         return sstable;
     }
 
+    private SSTable(String filename, IPartitioner partitioner)
+    {
+        dataFile_ = filename;
+        partitioner_ = partitioner;
+    }
+
     private SSTable(String filename, int keyCount, IPartitioner partitioner) throws IOException
     {
         dataFile_ = filename;



Mime
View raw message