gpt4 book ai didi

hbase - happybase table.put 是否接受任何字符串值?

转载 作者:行者123 更新时间:2023-12-02 04:22:21 30 4
gpt4 key购买 nike

我一直在使用 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/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com