cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r889674 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Date Fri, 11 Dec 2009 16:09:13 GMT
Author: jbellis
Date: Fri Dec 11 16:09:13 2009
New Revision: 889674

URL: http://svn.apache.org/viewvc?rev=889674&view=rev
Log:
clean up casting, generics of CompactionIterator use.  patch by jbellis

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

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=889674&r1=889673&r2=889674&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 Fri
Dec 11 16:09:13 2009
@@ -811,7 +811,7 @@
 
         SSTableWriter writer = null;
         CompactionIterator ci = new CompactionIterator(sstables, getDefaultGCBefore(), sstables.size()
== ssTables_.size());
-        Iterator nni = new FilterIterator(ci, PredicateUtils.notNullPredicate());
+        Iterator<CompactionIterator.CompactedRow> nni = new FilterIterator(ci, PredicateUtils.notNullPredicate());
 
         try
         {
@@ -822,7 +822,7 @@
 
             while (nni.hasNext())
             {
-                CompactionIterator.CompactedRow row = (CompactionIterator.CompactedRow) nni.next();
+                CompactionIterator.CompactedRow row = nni.next();
                 if (Range.isTokenInRanges(row.key.token, ranges))
                 {
                     if (writer == null)
@@ -901,7 +901,7 @@
 
         SSTableWriter writer;
         CompactionIterator ci = new CompactionIterator(sstables, gcBefore, major); // retain
a handle so we can call close()
-        Iterator nni = new FilterIterator(ci, PredicateUtils.notNullPredicate());
+        Iterator<CompactionIterator.CompactedRow> nni = new FilterIterator(ci, PredicateUtils.notNullPredicate());
 
         try
         {
@@ -923,7 +923,7 @@
             validator.prepare();
             while (nni.hasNext())
             {
-                CompactionIterator.CompactedRow row = (CompactionIterator.CompactedRow) nni.next();
+                CompactionIterator.CompactedRow row = nni.next();
                 writer.append(row.key, row.buffer);
                 validator.add(row);
                 totalkeysWritten++;
@@ -971,8 +971,8 @@
     }
 
     /**
-     * Performs a readonly compaction of all sstables in order to validate
-     * them on request, but without performing any writes.
+     * Performs a readonly "compaction" of all sstables in order to validate complete rows,
+     * but without writing the merge result
      */
     void doReadonlyCompaction(InetAddress initiator) throws IOException
     {
@@ -980,14 +980,14 @@
         CompactionIterator ci = new CompactionIterator(sstables, getDefaultGCBefore(), true);
         try
         {
-            Iterator nni = new FilterIterator(ci, PredicateUtils.notNullPredicate());
+            Iterator<CompactionIterator.CompactedRow> nni = new FilterIterator(ci,
PredicateUtils.notNullPredicate());
 
             // validate the CF as we iterate over it
             AntiEntropyService.IValidator validator = AntiEntropyService.instance().getValidator(table_,
columnFamily_, initiator);
             validator.prepare();
             while (nni.hasNext())
             {
-                CompactionIterator.CompactedRow row = (CompactionIterator.CompactedRow) nni.next();
+                CompactionIterator.CompactedRow row = nni.next();
                 validator.add(row);
             }
             validator.complete();



Mime
View raw message