cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1033484 - /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java
Date Wed, 10 Nov 2010 14:22:35 GMT
Author: jbellis
Date: Wed Nov 10 14:22:35 2010
New Revision: 1033484

URL: http://svn.apache.org/viewvc?rev=1033484&view=rev
Log:
fix logging
patch by jbellis

Modified:
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java?rev=1033484&r1=1033483&r2=1033484&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java Wed Nov 10
14:22:35 2010
@@ -397,9 +397,14 @@ public class Table
                             mutatedIndexedColumns = new TreeSet<ByteBuffer>();
                         mutatedIndexedColumns.add(column);
                         if (logger.isDebugEnabled())
+                        {
+                            // can't actually use validator to print value here, because
we overload value
+                            // for deletion timestamp as well (which may not be a well-formed
value for the column type)
+                            ByteBuffer value = cf.getColumn(column) == null ? null : cf.getColumn(column).value();
// may be null on row-level deletion
                             logger.debug(String.format("mutating indexed column %s value
%s",
                                                        cf.getComparator().getString(column),
-                                                       cfs.metadata.column_metadata.get(column).validator.getString(cf.getColumn(column).value())));
+                                                       value == null ? "null" : FBUtilities.bytesToHex(value)));
+                        }
                     }
                 }
 



Mime
View raw message