cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1069004 - /cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/operations/Reader.java
Date Wed, 09 Feb 2011 18:04:10 GMT
Author: brandonwilliams
Date: Wed Feb  9 18:04:09 2011
New Revision: 1069004

URL: http://svn.apache.org/viewvc?rev=1069004&view=rev
Log:
fix stress build

Modified:
    cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/operations/Reader.java

Modified: cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/operations/Reader.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/operations/Reader.java?rev=1069004&r1=1069003&r2=1069004&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/operations/Reader.java
(original)
+++ cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/operations/Reader.java
Wed Feb  9 18:04:09 2011
@@ -22,7 +22,9 @@ import org.apache.cassandra.db.ColumnFam
 import org.apache.cassandra.thrift.*;
 import org.apache.cassandra.utils.ByteBufferUtil;
 
+import java.lang.AssertionError;
 import java.nio.ByteBuffer;
+import java.nio.charset.CharacterCodingException;
 import java.util.List;
 
 public class Reader extends OperationThread
@@ -83,7 +85,14 @@ public class Reader extends OperationThr
                 }
                 catch (Exception e)
                 {
-                    System.err.printf("Error while reading Super Column %s key %s - %s%n",
superColumn, ByteBufferUtil.string(key), getExceptionMessage(e));
+                    try
+                    {
+                        System.err.printf("Error while reading Super Column %s key %s - %s%n",
superColumn, ByteBufferUtil.string(key), getExceptionMessage(e));
+                    }
+                    catch (CharacterCodingException e1)
+                    {
+                        throw new AssertionError(e1); // keys are valid string
+                    }
 
                     if (!session.ignoreErrors())
                         break;



Mime
View raw message