cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r779771 - in /incubator/cassandra/trunk: ./ interface/gen-java/org/apache/cassandra/service/ lib/licenses/ src/java/org/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/io/ test/unit/org/
Date Thu, 28 May 2009 21:10:08 GMT
Author: jbellis
Date: Thu May 28 21:10:07 2009
New Revision: 779771

URL: http://svn.apache.org/viewvc?rev=779771&view=rev
Log:
merge from 0.3 branch

Added:
    incubator/cassandra/trunk/lib/licenses/
      - copied from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/
    incubator/cassandra/trunk/lib/licenses/antlr-3.1.3.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/antlr-3.1.3.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/commons-cli-1.1.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/commons-cli-1.1.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/commons-collections-3.2.1.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/commons-collections-3.2.1.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/commons-javaflow-1.0-SNAPSHOT.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/commons-javaflow-1.0-SNAPSHOT.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/commons-lang-2.4.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/commons-lang-2.4.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/commons-logging-1.0.4.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/commons-logging-1.0.4.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/commons-math-1.1.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/commons-math-1.1.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/groovy-1.5.6.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/groovy-1.5.6.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/high-scale-lib.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/high-scale-lib.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/jline-0.9.94.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/jline-0.9.94.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/junit-4.6.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/junit-4.6.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/libthrift.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/libthrift.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/log4j-1.2.15.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/log4j-1.2.15.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/lucene-core-2.2.0.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/lucene-core-2.2.0.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/stringtemplate-3.0.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/stringtemplate-3.0.jar.LICENSE
    incubator/cassandra/trunk/lib/licenses/zookeeper-3.0.0.jar.LICENSE
      - copied unchanged from r779770, incubator/cassandra/branches/cassandra-0.3/lib/licenses/zookeeper-3.0.0.jar.LICENSE
Modified:
    incubator/cassandra/trunk/   (props changed)
    incubator/cassandra/trunk/build.xml
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/CqlResult_t.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/batch_mutation_super_t.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/batch_mutation_t.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/column_t.java
  (props changed)
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/superColumn_t.java
  (props changed)
    incubator/cassandra/trunk/src/java/org/   (props changed)
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/PeriodicFlushManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTable.java
    incubator/cassandra/trunk/test/unit/org/   (props changed)

Propchange: incubator/cassandra/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1 +1 @@
-/incubator/cassandra/branches/cassandra-0.3:774578-776715
+/incubator/cassandra/branches/cassandra-0.3:774578-779770

Modified: incubator/cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/build.xml?rev=779771&r1=779770&r2=779771&view=diff
==============================================================================
--- incubator/cassandra/trunk/build.xml (original)
+++ incubator/cassandra/trunk/build.xml Thu May 28 21:10:07 2009
@@ -17,7 +17,7 @@
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
-<project basedir="." default="build" name="cassandra">
+<project basedir="." default="build" name="apache-cassandra-incubating">
     <property environment="env"/>
     <property name="debuglevel" value="source,lines,vars"/>
 

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/Cassandra.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/CqlResult_t.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/CqlResult_t.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/CqlResult_t.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/CqlResult_t.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/InvalidRequestException.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/NotFoundException.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/batch_mutation_super_t.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/batch_mutation_super_t.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/batch_mutation_super_t.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/batch_mutation_super_t.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/batch_mutation_t.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/batch_mutation_t.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/batch_mutation_t.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/batch_mutation_t.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/column_t.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/column_t.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/column_t.java:749219-768588

Propchange: incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/superColumn_t.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:774578-779770
 /incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/superColumn_t.java:749219-768588

Propchange: incubator/cassandra/trunk/src/java/org/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/src/java/org:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/src/java/org:774578-779770
 /incubator/cassandra/trunk/src/java/org:749219-769885

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=779771&r1=779770&r2=779771&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Thu
May 28 21:10:07 2009
@@ -189,7 +189,6 @@
         ssTables_.addAll(filenames);
         /* Load the index files and the Bloom Filters associated with them. */
         SSTable.onStart(filenames);
-        logger_.debug("Submitting a major compaction task ...");
         MinorCompactionManager.instance().submit(ColumnFamilyStore.this);
         if (columnFamily_.equals(Table.hints_))
         {
@@ -418,13 +417,6 @@
         return table_ + "-" + columnFamily_ + "-" + SSTable.temporaryFile_ + "-" + index;
     }
 
-
-    /*
-    * This version is used only on start up when we are recovering from logs.
-    * In the future we may want to parellelize the log processing for a table
-    * by having a thread per log file present for recovery. Re-visit at that
-    * time.
-    */
     void switchMemtable()
     {
         memtableLock_.writeLock().lock();
@@ -446,12 +438,6 @@
         memtableSwitchCount++;
     }
 
-    /*
-     * This version is used only on start up when we are recovering from logs.
-     * In the future we may want to parellelize the log processing for a table
-     * by having a thread per log file present for recovery. Re-visit at that
-     * time.
-     */
     void switchBinaryMemtable(String key, byte[] buffer) throws IOException
     {
         binaryMemtable_.set(new BinaryMemtable(table_, columnFamily_));
@@ -482,7 +468,6 @@
     void forceFlushBinary()
     {
         BinaryMemtableManager.instance().submit(getColumnFamilyName(), binaryMemtable_.get());
-        //binaryMemtable_.get().flush(true);
     }
 
     /**
@@ -729,7 +714,7 @@
      */
     void applyNow(String key, ColumnFamily columnFamily) throws IOException
     {
-        getMemtableThreadSafe().putOnRecovery(key, columnFamily);
+        getMemtableThreadSafe().put(key, columnFamily);
     }
 
     /*

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java?rev=779771&r1=779770&r2=779771&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java Thu May 28 21:10:07
2009
@@ -34,6 +34,8 @@
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
+import org.apache.commons.lang.StringUtils;
+
 /*
  * Commit Log tracks every write operation into the system. The aim
  * of the commit log is to be able to successfully recover data that was
@@ -300,16 +302,12 @@
             file = clogs.get(i);
             readCommitLogHeader(file.getAbsolutePath(), header2);
             byte[] result = CommitLogHeader.and(header, header2);
-            if ( !CommitLogHeader.isZero(result) )
-            {
-                filesNeeded.push(file);
-            }
-            else
-            {
+            if (CommitLogHeader.isZero(result))
                 break;
-            }
+            filesNeeded.push(file);
         }
 
+        logger_.info("Replaying logs from " + StringUtils.join(filesNeeded, ", "));
         doRecovery(filesNeeded, header);
     }
 

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java?rev=779771&r1=779770&r2=779771&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Memtable.java Thu May 28 21:10:07
2009
@@ -161,6 +161,8 @@
         }
     }
 
+    /** flush synchronously (in the current thread, not on the executor).
+     *  only the recover code should call this. */
     void flushOnRecovery() throws IOException {
         if (!isClean())
             flush(CommitLog.CommitLogContext.NULL);
@@ -201,16 +203,6 @@
         return builder.toString();
     }
 
-    /**
-     * This version is called on commit log recovery. The threshold
-     * is not respected and a forceFlush() needs to be invoked to flush
-     * the contents to disk.  Does not go through the executor.
-    */
-    void putOnRecovery(String key, ColumnFamily columnFamily)
-    {
-        resolve(key, columnFamily);
-    }
-
     ColumnFamily getLocalCopy(String key, String columnFamilyColumn, IFilter filter)
     {
     	String[] values = RowMutation.getColumnAndColumnFamily(columnFamilyColumn);

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/PeriodicFlushManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/PeriodicFlushManager.java?rev=779771&r1=779770&r2=779771&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/PeriodicFlushManager.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/PeriodicFlushManager.java Thu
May 28 21:10:07 2009
@@ -65,7 +65,6 @@
                 columnFamilyStore.forceFlush();
             }
         };
-        logger_.info("start periodic flush daemon every " + flushPeriodInMinutes + " minutes
for " + columnFamilyStore.columnFamily_);
         flusher_.scheduleWithFixedDelay(runnable, flushPeriodInMinutes, flushPeriodInMinutes,
TimeUnit.MINUTES);       
     }
 }

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=779771&r1=779770&r2=779771&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 May 28 21:10:07
2009
@@ -404,6 +404,7 @@
 
     private void loadIndexFile() throws IOException
     {
+        logger_.debug("Loading indexes from " + dataFile_);
         IFileReader indexReader = null;
         /* Read all block indexes to maintain an index in memory */
         try
@@ -442,7 +443,6 @@
                     String blockIndexKey = bufIn.readUTF();
                     if (!blockIndexKey.equals(SSTable.blockIndexKey_))
                     {
-                        logger_.debug(" Done reading the block indexes, Index has been created");
                         break;
                     }
                     /* read the size of the block index */

Propchange: incubator/cassandra/trunk/test/unit/org/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 28 21:10:07 2009
@@ -1,2 +1,2 @@
-/incubator/cassandra/branches/cassandra-0.3/test/unit/org:774578-776715
+/incubator/cassandra/branches/cassandra-0.3/test/unit/org:774578-779770
 /incubator/cassandra/trunk/test/unit/org:749219-768583



Mime
View raw message