cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r759205 - in /incubator/cassandra/trunk/src/org/apache/cassandra: db/ColumnFamily.java db/Memtable.java db/RowMutation.java test/SSTableTest.java
Date Fri, 27 Mar 2009 16:33:18 GMT
Author: jbellis
Date: Fri Mar 27 16:33:17 2009
New Revision: 759205

URL: http://svn.apache.org/viewvc?rev=759205&view=rev
Log:
rename createColumn overloads to addColumn to make clear that they are all ultimately doing
the same thing

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamily.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/Memtable.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java
    incubator/cassandra/trunk/src/org/apache/cassandra/test/SSTableTest.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamily.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamily.java?rev=759205&r1=759204&r2=759205&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamily.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/ColumnFamily.java Fri Mar 27 16:33:17
2009
@@ -195,10 +195,9 @@
     	return columnSerializer_;
     }
 
-    public void createColumn(String name)
+    public void addColumn(String name)
     {
-    	IColumn column = columnFactory_.createColumn(name);
-    	addColumn(column);
+        addColumn(columnFactory_.createColumn(name));
     }
 
     int getColumnCount()
@@ -223,17 +222,15 @@
     	return count;
     }
 
-    public void createColumn(String name, byte[] value)
+    public void addColumn(String name, byte[] value)
     {
-    	IColumn column = columnFactory_.createColumn(name, value);
-    	addColumn(column);
+    	addColumn(name, value, 0);
     }
 
-	public void createColumn(String name, byte[] value, long timestamp)
+    public void addColumn(String name, byte[] value, long timestamp)
 	{
-		IColumn column = columnFactory_.createColumn(name, value, timestamp);
-		addColumn(column);
-	}
+        addColumn(columnFactory_.createColumn(name, value, timestamp));
+    }
 
     void clear()
     {

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/Memtable.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/Memtable.java?rev=759205&r1=759204&r2=759205&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/Memtable.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/Memtable.java Fri Mar 27 16:33:17
2009
@@ -369,7 +369,7 @@
         			if(subColumn != null)
         			{
 	        			columnFamily = new ColumnFamily(cfName_);
-	            		columnFamily.createColumn(values[1] + ":" + values[2], subColumn.value(),
subColumn.timestamp());
+	            		columnFamily.addColumn(values[1] + ":" + values[2], subColumn.value(), subColumn.timestamp());
         			}
         		}
         	}

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java?rev=759205&r1=759204&r2=759205&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/RowMutation.java Fri Mar 27 16:33:17
2009
@@ -154,7 +154,7 @@
             {
             	columnFamily = new ColumnFamily(values[0], ColumnFamily.getColumnType("Standard"));
             }
-        	columnFamily.createColumn(values[1], value, timestamp);
+        	columnFamily.addColumn(values[1], value, timestamp);
         }
         if( values.length == 3 )
         {
@@ -162,7 +162,7 @@
             {
             	columnFamily = new ColumnFamily(values[0], ColumnFamily.getColumnType("Super"));
             }
-        	columnFamily.createColumn(values[1]+ ":" + values[2], value, timestamp);
+        	columnFamily.addColumn(values[1]+ ":" + values[2], value, timestamp);
         }
         modifications_.put(values[0], columnFamily);
     }
@@ -189,11 +189,11 @@
             columnFamily = new ColumnFamily(values[0]);
         if(values.length == 2 )
         {
-	        columnFamily.createColumn( values[1]);
+	        columnFamily.addColumn( values[1]);
         }
         if(values.length == 3 )
         {
-	        columnFamily.createColumn( values[1] + ":" + values[2]);
+	        columnFamily.addColumn( values[1] + ":" + values[2]);
         }
         deletions_.put(values[0], columnFamily);
     }

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/test/SSTableTest.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/test/SSTableTest.java?rev=759205&r1=759204&r2=759205&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/test/SSTableTest.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/test/SSTableTest.java Fri Mar 27 16:33:17
2009
@@ -51,7 +51,7 @@
             ColumnFamily cf = new ColumnFamily("Test", "Standard");
             bufOut.reset();           
             // random.nextBytes(bytes);
-            cf.createColumn("C", "Avinash Lakshman is a good man".getBytes(), i);
+            cf.addColumn("C", "Avinash Lakshman is a good man".getBytes(), i);
             ColumnFamily.serializerWithIndexes().serialize(cf, bufOut);
             ssTable.append(key, bufOut);            
             bf.fill(key);
@@ -69,7 +69,7 @@
             String key = Integer.toString(i);
             ColumnFamily cf = new ColumnFamily("Test", "Standard");                     

             // random.nextBytes(bytes);
-            cf.createColumn("C", "Avinash Lakshman is a good man".getBytes(), i);
+            cf.addColumn("C", "Avinash Lakshman is a good man".getBytes(), i);
             columnFamilies.put(key, cf);
         } 
         flushForRandomPartitioner(columnFamilies);



Mime
View raw message