gpt4 book ai didi

ruby-on-rails - 通过 Ruby 中的 MassiveRecord 的 HBase 导致中止

转载 作者:太空宇宙 更新时间:2023-11-03 16:54:48 27 4
gpt4 key购买 nike

使用 MassiveRecord 时为了将记录保存到 HBase 中而过于节俭,我收到了一个奇怪的“中止”错误。

这里有一些代码可以在 Mac OS X 上重现错误,通过自制软件安装 hbase(0.92.0 和 0.94.0)。

require 'massive_record'

MassiveRecord::ORM::Base.connection_configuration = { :host => 'hbase' }
class Woot < MassiveRecord::ORM::Table
default_scope select(:data)
column_family :data do
field :name, :string
end
end

woot = Woot.new( :name => 'rawr' )
woot.save

这总是导致进程停止,留下消息

[1]    8756 abort      ruby massive_woot.rb

检索工作正常,但我似乎无法保存记录。

架构如下:

>> describe 'woots'
DESCRIPTION ENABLED
{NAME => 'woots', FAMILIES => [{NAME => 'data', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '3', C true
OMPRESSION => 'NONE', MIN_VERSIONS => '0', TTL => '2147483647', BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCA
CHE => 'true'}]}
1 row(s) in 0.0190 seconds

最佳答案

这原来是一个版本控制问题。 MassiveRecord v0.2.2 依赖于 thrift 0.6.0(由 Gemfile 中的“= 0.6.0”版本指定)。

我现在通过从 github 上移除 MassiveRecord 的“开发”分支解决了这个问题。

关于ruby-on-rails - 通过 Ruby 中的 MassiveRecord 的 HBase 导致中止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12984445/

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