cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1195812 - in /cassandra/branches/cassandra-1.0: src/java/org/apache/cassandra/db/index/ src/java/org/apache/cassandra/db/index/keys/ test/unit/org/apache/cassandra/db/
Date Tue, 01 Nov 2011 04:28:58 GMT
Author: jbellis
Date: Tue Nov  1 04:28:58 2011
New Revision: 1195812

URL: http://svn.apache.org/viewvc?rev=1195812&view=rev
Log:
renaming

Modified:
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/PerColumnSecondaryIndex.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
    cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
    cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
    cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/DefsTest.java

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/PerColumnSecondaryIndex.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/PerColumnSecondaryIndex.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/PerColumnSecondaryIndex.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/PerColumnSecondaryIndex.java
Tue Nov  1 04:28:58 2011
@@ -56,7 +56,6 @@ public abstract class PerColumnSecondary
      */
     public abstract void updateColumn(DecoratedKey<?> valueKey, ByteBuffer rowKey,
IColumn col) throws IOException;
     
-    @Override
     public String getNameForSystemTable(ByteBuffer column)
     {
         return getIndexName();   

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndex.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
Tue Nov  1 04:28:58 2011
@@ -115,7 +115,7 @@ public abstract class SecondaryIndex
      * Allow access to the underlying column family store if there is one
      * @return the underlying column family store or null
      */
-    public abstract ColumnFamilyStore getUnderlyingCfs();
+    public abstract ColumnFamilyStore getIndexCfs();
    
     
     /**
@@ -245,12 +245,12 @@ public abstract class SecondaryIndex
         return f;
     }
     
-    public ColumnFamilyStore getBaseCFStore()
+    public ColumnFamilyStore getBaseCfs()
     {
         return baseCfs;
     }
 
-    private void setBaseCfStore(ColumnFamilyStore baseCfs)
+    private void setBaseCfs(ColumnFamilyStore baseCfs)
     {
         this.baseCfs = baseCfs;
     }
@@ -313,7 +313,7 @@ public abstract class SecondaryIndex
         
         index.addColumnDef(cdef);
         index.validateOptions();
-        index.setBaseCfStore(baseCfs);
+        index.setBaseCfs(baseCfs);
         
         return index;
     }

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/SecondaryIndexManager.java
Tue Nov  1 04:28:58 2011
@@ -319,7 +319,7 @@ public class SecondaryIndexManager
 
         for (Map.Entry<ByteBuffer, SecondaryIndex> entry : indexesByColumn.entrySet())
         {
-            ColumnFamilyStore cfs = entry.getValue().getUnderlyingCfs();
+            ColumnFamilyStore cfs = entry.getValue().getIndexCfs();
             
             if (cfs != null)
                 cfsList.add(cfs);        

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysIndex.java
Tue Nov  1 04:28:58 2011
@@ -71,7 +71,6 @@ public class KeysIndex extends PerColumn
                : new LocalByPartionerType(StorageService.getPartitioner());
     }
 
-    @Override
     public void deleteColumn(DecoratedKey<?> valueKey, ByteBuffer rowKey, IColumn column)
     {
         if (column.isMarkedForDelete())
@@ -85,7 +84,6 @@ public class KeysIndex extends PerColumn
             logger.debug("removed index entry for cleaned-up value {}:{}", valueKey, cfi);
     }
 
-    @Override
     public void insertColumn(DecoratedKey<?> valueKey, ByteBuffer rowKey, IColumn column)
     {
         ColumnFamily cfi = ColumnFamily.create(indexCfs.metadata);
@@ -104,20 +102,17 @@ public class KeysIndex extends PerColumn
         indexCfs.apply(valueKey, cfi);
     }
     
-    @Override
     public void updateColumn(DecoratedKey<?> valueKey, ByteBuffer rowKey, IColumn col)
     {        
         insertColumn(valueKey, rowKey, col);        
     }
 
-    @Override
     public void removeIndex(ByteBuffer columnName) throws IOException
     {        
         indexCfs.removeAllSSTables();
         indexCfs.unregisterMBean();
     }
 
-    @Override
     public void forceBlockingFlush() throws IOException
     {       
         try
@@ -134,37 +129,31 @@ public class KeysIndex extends PerColumn
         }
     }
 
-    @Override
     public void unregisterMbean()
     {
         indexCfs.unregisterMBean();
     }
 
-    @Override
-    public ColumnFamilyStore getUnderlyingCfs()
+    public ColumnFamilyStore getIndexCfs()
     {
        return indexCfs;
     }
 
-    @Override
     public SecondaryIndexSearcher createSecondaryIndexSearcher(Set<ByteBuffer> columns)
     {
         return new KeysSearcher(baseCfs.indexManager, columns);
     }
 
-    @Override
     public String getIndexName()
     {
         return indexCfs.columnFamily;
     }
 
-    @Override
     public void renameIndex(String newCfName) throws IOException
     {
         indexCfs.renameSSTables(indexCfs.columnFamily.replace(baseCfs.columnFamily, newCfName));
     }
 
-    @Override
     public void validateOptions() throws ConfigurationException
     {
         // no options used

Modified: cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
(original)
+++ cassandra/branches/cassandra-1.0/src/java/org/apache/cassandra/db/index/keys/KeysSearcher.java
Tue Nov  1 04:28:58 2011
@@ -58,7 +58,7 @@ public class KeysSearcher extends Second
             SecondaryIndex index = indexManager.getIndexForColumn(expression.column_name);
             if (index == null || (expression.op != IndexOperator.EQ))
                 continue;
-            int columns = index.getUnderlyingCfs().getMeanColumns();
+            int columns = index.getIndexCfs().getMeanColumns();
             if (columns < bestMeanCount)
             {
                 best = expression;
@@ -149,17 +149,17 @@ public class KeysSearcher extends Second
              * should be pretty close to `start_key`. */
             if (logger.isDebugEnabled())
                 logger.debug(String.format("Scanning index %s starting with %s",
-                                           expressionString(primary), index.getBaseCFStore().metadata.getKeyValidator().getString(startKey)));
+                                           expressionString(primary), index.getBaseCfs().metadata.getKeyValidator().getString(startKey)));
 
             // We shouldn't fetch only 1 row as this provides buggy paging in case the first
row doesn't satisfy all clauses
             int count = Math.max(clause.count, 2);
             QueryFilter indexFilter = QueryFilter.getSliceFilter(indexKey,
-                                                                 new QueryPath(index.getUnderlyingCfs().getColumnFamilyName()),
+                                                                 new QueryPath(index.getIndexCfs().getColumnFamilyName()),
                                                                  startKey,
                                                                  ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                                  false,
                                                                  count);
-            ColumnFamily indexRow = index.getUnderlyingCfs().getColumnFamily(indexFilter);
+            ColumnFamily indexRow = index.getIndexCfs().getColumnFamily(indexFilter);
             logger.debug("fetched {}", indexRow);
             if (indexRow == null)
                 break;

Modified: cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
(original)
+++ cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
Tue Nov  1 04:28:58 2011
@@ -53,7 +53,6 @@ import static org.apache.cassandra.Util.
 import static org.apache.cassandra.Util.getBytes;
 import static org.junit.Assert.assertNull;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 public class ColumnFamilyStoreTest extends CleanupHelper
@@ -460,7 +459,7 @@ public class ColumnFamilyStoreTest exten
         Future<?> future = cfs.indexManager.addIndexedColumn(cd);
         future.get();
         // we had a bug (CASSANDRA-2244) where index would get created but not flushed --
check for that
-        assert cfs.indexManager.getIndexForColumn(cd.name).getUnderlyingCfs().getSSTables().size()
> 0;
+        assert cfs.indexManager.getIndexForColumn(cd.name).getIndexCfs().getSSTables().size()
> 0;
 
         queryBirthdate(table);
 

Modified: cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/DefsTest.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/DefsTest.java?rev=1195812&r1=1195811&r2=1195812&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/DefsTest.java (original)
+++ cassandra/branches/cassandra-1.0/test/unit/org/apache/cassandra/db/DefsTest.java Tue Nov
 1 04:28:58 2011
@@ -656,7 +656,7 @@ public class DefsTest extends CleanupHel
         rm.apply();
         ColumnFamilyStore cfs = Table.open("Keyspace6").getColumnFamilyStore("Indexed1");
         cfs.forceBlockingFlush();
-        ColumnFamilyStore indexedCfs = cfs.indexManager.getIndexForColumn(cfs.indexManager.getIndexedColumns().iterator().next()).getUnderlyingCfs();
+        ColumnFamilyStore indexedCfs = cfs.indexManager.getIndexForColumn(cfs.indexManager.getIndexedColumns().iterator().next()).getIndexCfs();
         Descriptor desc = indexedCfs.getSSTables().iterator().next().descriptor;
 
         // drop the index



Mime
View raw message