Skip to content

Commit

Permalink
Update pycassaShell's 'describe_c_f' for deprecated cf attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
thobbs committed Apr 17, 2012
1 parent 7df88df commit 580f5f9
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions pycassaShell
Expand Up @@ -143,25 +143,28 @@ def describe_column_family(arg1, arg2=None):
_print_line(" Max", cfdef.max_compaction_threshold)
print

print 'Memtable Flush After Thresholds'
_print_line(" Throughput", str(cfdef.memtable_throughput_in_mb) + " MiB")
s = str(int(cfdef.memtable_operations_in_millions * 1000000))
_print_line(" Operations", s + " operations")
_print_line(" Time", str(cfdef.memtable_flush_after_mins) + " minutes")
print

print "Cache Save Periods"
if cfdef.row_cache_save_period_in_seconds == 0:
s = 'Disabled'
else:
s = str(cfdef.row_cache_save_period_in_seconds) + ' seconds'
_print_line(" Row Cache", s)
if hasattr(cfdef, 'memtable_throughput_in_mb'):
print 'Memtable Flush After Thresholds'
_print_line(" Throughput", str(cfdef.memtable_throughput_in_mb) + " MiB")
s = str(int(cfdef.memtable_operations_in_millions * 1000000))
_print_line(" Operations", s + " operations")
_print_line(" Time", str(cfdef.memtable_flush_after_mins) + " minutes")
print

if getattr(cfdef, 'row_cache_save_period_in_seconds', None) is not None:
print "Cache Save Periods"
if cfdef.row_cache_save_period_in_seconds == 0:
s = 'Disabled'
else:
s = str(cfdef.row_cache_save_period_in_seconds) + ' seconds'
_print_line(" Row Cache", s)

if cfdef.key_cache_save_period_in_seconds == 0:
s = 'Disabled'
else:
s = str(cfdef.key_cache_save_period_in_seconds) + ' seconds'
_print_line(" Key Cache", s)
if getattr(cfdef, 'key_cache_save_period_in_seconds', None) is not None:
if cfdef.key_cache_save_period_in_seconds == 0:
s = 'Disabled'
else:
s = str(cfdef.key_cache_save_period_in_seconds) + ' seconds'
_print_line(" Key Cache", s)

if cfdef.column_metadata:
print "\nColumn Metadata"
Expand Down

0 comments on commit 580f5f9

Please sign in to comment.