cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r934158 - in /cassandra/trunk: ./ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/filter/ src/java/org/apache/cassandra/dht/ test/unit/org/apache/cassandra/ test/unit/org/apache/cassandra/io/sstable/ test/unit/org/apache/...
Date Wed, 14 Apr 2010 19:53:54 GMT
Author: gdusbabek
Date: Wed Apr 14 19:53:53 2010
New Revision: 934158

URL: http://svn.apache.org/viewvc?rev=934158&view=rev
Log:
import and dead-code cleanup. Patch by Stu Hood, reviewed by Gary Dusbabek. CASSANDRA-767

Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/trunk/src/java/org/apache/cassandra/db/DecoratedKey.java
    cassandra/trunk/src/java/org/apache/cassandra/db/filter/IdentityQueryFilter.java
    cassandra/trunk/src/java/org/apache/cassandra/db/filter/QueryFilter.java
    cassandra/trunk/src/java/org/apache/cassandra/dht/ByteOrderedPartitioner.java
    cassandra/trunk/src/java/org/apache/cassandra/dht/IPartitioner.java
    cassandra/trunk/test/unit/org/apache/cassandra/Util.java
    cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTest.java

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Wed Apr 14 19:53:53 2010
@@ -6,6 +6,7 @@ dev
  * access levels for authentication/authorization (CASSANDRA-900)
  * add ReadRepairChance to CF definition (CASSANDRA-930)
  * fix heisenbug in system tests, especially common on OS X (CASSANDRA-944)
+ * convert to byte[] keys internally and all public APIs (CASSANDRA-767)
 
 
 0.6.1

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Wed Apr 14 19:53:53
2010
@@ -862,8 +862,7 @@ public class ColumnFamilyStore implement
         try
         {
             // pull rows out of the iterator
-            boolean first = true;
-            IPartitioner partitioner = StorageService.getPartitioner(); 
+            boolean first = true; 
             while(iterator.hasNext())
             {
                 Row current = iterator.next();

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/DecoratedKey.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/DecoratedKey.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/DecoratedKey.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/DecoratedKey.java Wed Apr 14 19:53:53
2010
@@ -18,15 +18,10 @@
 
 package org.apache.cassandra.db;
 
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.DataInput;
 import java.util.Comparator;
 
 import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.dht.Token;
-import org.apache.cassandra.io.ICompactSerializer2;
-import org.apache.cassandra.io.util.DataOutputBuffer;
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.FBUtilities;
 
@@ -54,15 +49,6 @@ public class DecoratedKey<T extends Toke
     public final T token;
     public final byte[] key;
 
-    @Deprecated
-    public DecoratedKey(T token, String key)
-    {
-        super();
-        assert token != null;
-        this.token = token;
-        this.key = key == null ? null : key.getBytes(FBUtilities.UTF8);
-    }
-
     public DecoratedKey(T token, byte[] key)
     {
         super();

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/filter/IdentityQueryFilter.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/filter/IdentityQueryFilter.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/filter/IdentityQueryFilter.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/filter/IdentityQueryFilter.java Wed Apr
14 19:53:53 2010
@@ -23,7 +23,6 @@ package org.apache.cassandra.db.filter;
 
 import org.apache.commons.lang.ArrayUtils;
 
-import org.apache.cassandra.db.DecoratedKey;
 import org.apache.cassandra.db.SuperColumn;
 
 class IdentityQueryFilter extends SliceQueryFilter

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/filter/QueryFilter.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/filter/QueryFilter.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/filter/QueryFilter.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/filter/QueryFilter.java Wed Apr 14 19:53:53
2010
@@ -25,7 +25,6 @@ import java.util.*;
 
 import org.apache.cassandra.io.sstable.SSTableReader;
 import org.apache.cassandra.io.util.FileDataInput;
-import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.ReducingIterator;
 import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.marshal.AbstractType;

Modified: cassandra/trunk/src/java/org/apache/cassandra/dht/ByteOrderedPartitioner.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/dht/ByteOrderedPartitioner.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/dht/ByteOrderedPartitioner.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/dht/ByteOrderedPartitioner.java Wed Apr
14 19:53:53 2010
@@ -18,19 +18,6 @@
 
 package org.apache.cassandra.dht;
 
-import java.math.BigInteger;
-import java.text.Collator;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Locale;
-import java.util.Random;
-
-import org.apache.commons.lang.ArrayUtils;
-
-import org.apache.cassandra.db.DecoratedKey;
-import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.Pair;
-
 public class ByteOrderedPartitioner extends AbstractByteOrderedPartitioner
 {
     public BytesToken getToken(byte[] key)

Modified: cassandra/trunk/src/java/org/apache/cassandra/dht/IPartitioner.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/dht/IPartitioner.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/dht/IPartitioner.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/dht/IPartitioner.java Wed Apr 14 19:53:53
2010
@@ -66,7 +66,6 @@ public interface IPartitioner<T extends 
      * (This is NOT a method to create a Token from its string representation;
      * for that, use TokenFactory.fromString.)
      */
-    @Deprecated
     public T getToken(byte[] key);
 
     /**

Modified: cassandra/trunk/test/unit/org/apache/cassandra/Util.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/Util.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/Util.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/Util.java Wed Apr 14 19:53:53 2010
@@ -98,11 +98,6 @@ public class Util
         store.forceBlockingFlush();
         return store;
     }
-    
-    public static ColumnFamily getColumnFamily(Table table, String key, String cfName) throws
IOException
-    {
-        return getColumnFamily(table, dk(key), cfName);
-    }
 
     public static ColumnFamily getColumnFamily(Table table, DecoratedKey key, String cfName)
throws IOException
     {

Modified: cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java Wed Apr
14 19:53:53 2010
@@ -1,8 +1,6 @@
 package org.apache.cassandra.io.sstable;
 
 import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
 import java.util.concurrent.ExecutionException;
 
 import org.junit.Test;
@@ -12,7 +10,6 @@ import org.apache.cassandra.config.Datab
 import org.apache.cassandra.db.*;
 import org.apache.cassandra.db.filter.QueryPath;
 import org.apache.cassandra.io.util.FileDataInput;
-import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.FBUtilities;
 
 import org.apache.cassandra.Util;

Modified: cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableTest.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableTest.java Wed Apr 14
19:53:53 2010
@@ -19,21 +19,15 @@
 
 package org.apache.cassandra.io.sstable;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.*;
 
 import org.junit.Test;
-import static org.junit.Assert.*;
 
 import org.apache.cassandra.CleanupHelper;
 import org.apache.cassandra.io.util.BufferedRandomAccessFile;
-import org.apache.cassandra.db.DecoratedKey;
 import org.apache.cassandra.utils.FBUtilities;
 
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-
 public class SSTableTest extends CleanupHelper
 {
     @Test

Modified: cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTest.java?rev=934158&r1=934157&r2=934158&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTest.java Wed
Apr 14 19:53:53 2010
@@ -145,11 +145,11 @@ public class AntiEntropyServiceTest exte
         validator.prepare();
 
         // add a row with the minimum token
-        validator.add(new CompactedRow(new DecoratedKey(min, "nonsense!"),
+        validator.add(new CompactedRow(new DecoratedKey(min, "nonsense!".getBytes(FBUtilities.UTF8)),
                                        new DataOutputBuffer()));
 
         // and a row after it
-        validator.add(new CompactedRow(new DecoratedKey(mid, "inconceivable!"),
+        validator.add(new CompactedRow(new DecoratedKey(mid, "inconceivable!".getBytes(FBUtilities.UTF8)),
                                        new DataOutputBuffer()));
         validator.complete();
 



Mime
View raw message