Merge branch 'cassandra-1.0' into cassandra-1.1

This commit is contained in:
Brandon Williams 2012-02-06 14:58:59 -06:00
commit 0f3ff051ef
2 changed files with 5 additions and 2 deletions

View File

@ -330,7 +330,7 @@ def format_value(val, casstype, output_encoding, addcolor=False, time_format='',
elif casstype == 'UTF8Type':
escapedval = val.replace(u'\\', u'\\\\')
escapedval = controlchars_re.sub(_show_control_chars, escapedval)
bval = escapedval.encode(output_encoding, errors='backslashreplace')
bval = escapedval.encode(output_encoding, 'backslashreplace')
displaywidth = wcwidth.wcswidth(bval.decode(output_encoding))
if addcolor:
coloredval = YELLOW + bits_to_turn_red_re.sub(_turn_bits_red, bval) + ANSI_RESET

View File

@ -664,7 +664,10 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface, Lo
break;
}
}
property.setProperty(signature, cfdefToString(cfDef));
if (cfDef != null)
property.setProperty(signature, cfdefToString(cfDef));
else
throw new RuntimeException("Column family '" + column_family + "' not found in keyspace '" + keyspace + "'");
}
catch (TException e)
{