如何使用pycassa打印superCF

时间:2012-05-18 22:29:44

标签: cassandra pycassa

以下代码失败(ValueError:解压缩的值太多 ,在pycassaShell下)
有没有办法漂亮打印超级列?

cf = pycassa.ColumnFamily(pool, 'Super1')
res = cf.get_range()
for key, col in res:
    print '\n\n', key, ':'
    for k, c in col:
        print k, '=>', c

1 个答案:

答案 0 :(得分:0)

像这样

cf = pycassa.ColumnFamily(pool, 'Super1')
res = cf.get_range()
for key, col in res:
    print '\n\n', key, ':'
    for i in col.keys():
        print i, '=>', col[i]