我一直在使用 java 和 python 测试 table.put。
在java中,您可以将int或float值写入列中。使用happybase
table.put(line_item_key, {'allinone:quantity': quantity})
它爆炸了 类型错误:“int”类型的对象没有 len()
happybase 是否不支持写出除字符串以外的任何内容?
最佳答案
在Hbase中,一切都是字节数组。没有任何花哨的数据类型,如 int、string、float、double 等。因此,每当你想插入 hbase 表中时,首先需要转换为字节数组。然后就可以插入了。
关于hbase - happybase table.put 是否接受任何字符串值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29453940/