cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/2] Add column metadata to system column families
Date Mon, 18 Jun 2012 07:45:34 GMT
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ea2d2a6/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 64aea28..51f5fe2 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -368,7 +368,7 @@ public class StorageProxy implements StorageProxyMBean
                         return;
                     }
                     assert hostId != null : "Missing host ID for " + target.getHostAddress();
-                    RowMutation hintedMutation = RowMutation.hintFor(mutation, ByteBuffer.wrap(UUIDGen.decompose(hostId)));
+                    RowMutation hintedMutation = RowMutation.hintFor(mutation, hostId);
                     hintedMutation.apply();
 
                     totalHints.incrementAndGet();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ea2d2a6/test/unit/org/apache/cassandra/config/DefsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/config/DefsTest.java b/test/unit/org/apache/cassandra/config/DefsTest.java
index ae6ccc0..ba4c20f 100644
--- a/test/unit/org/apache/cassandra/config/DefsTest.java
+++ b/test/unit/org/apache/cassandra/config/DefsTest.java
@@ -49,8 +49,8 @@ public class DefsTest extends SchemaLoader
     @Test
     public void ensureStaticCFMIdsAreLessThan1000()
     {
-        assert CFMetaData.StatusCf.cfId.equals(CFMetaData.getId(Table.SYSTEM_TABLE, SystemTable.STATUS_CF));
-        assert CFMetaData.HintsCf.cfId.equals(CFMetaData.getId(Table.SYSTEM_TABLE, HintedHandOffManager.HINTS_CF));
+        assert CFMetaData.OldStatusCf.cfId.equals(CFMetaData.getId(Table.SYSTEM_TABLE, SystemTable.OLD_STATUS_CF));
+        assert CFMetaData.OldHintsCf.cfId.equals(CFMetaData.getId(Table.SYSTEM_TABLE, SystemTable.OLD_HINTS_CF));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8ea2d2a6/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
index 9c131f9..d57f9c1 100644
--- a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
+++ b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
@@ -35,6 +35,7 @@ import org.apache.cassandra.db.marshal.AsciiType;
 import org.apache.cassandra.db.marshal.UTF8Type;
 import org.apache.cassandra.locator.LocalStrategy;
 import org.apache.cassandra.locator.NetworkTopologyStrategy;
+import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 
 public class ThriftValidationTest extends SchemaLoader
@@ -124,7 +125,7 @@ public class ThriftValidationTest extends SchemaLoader
         assert !gotException : "got unexpected ConfigurationException";
 
         // add a column with name = "id"
-        newMetadata.addColumnDefinition(ColumnDefinition.utf8("id", null));
+        newMetadata.addColumnDefinition(new ColumnDefinition(ByteBufferUtil.bytes("id"),
UTF8Type.instance, null, null, null, null));
 
         gotException = false;
 


Mime
View raw message