0

hbase-0.94.0/src/examples/mapreduce/index-builder-setup.rb スクリプトを実行すると、次のエラーが報告されます: [zhouhh@Hadoop48 mapreduce]$ ruby​​ index-builder-setup.rb index-builder-setup. rb:18: main:Object のメソッド「create」が未定義です (NoMethodError) index-builder-setup.rb:

# Set up sample data for IndexBuilder example
create "people", "attributes"
create "people-email", "INDEX"
create "people-phone", "INDEX"
create "people-name", "INDEX"

[["1", "jenny", "jenny@example.com", "867-5309"],
 ["2", "alice", "alice@example.com", "555-1234"],
 ["3", "kevin", "kevinpet@example.com", "555-1212"]].each do |fields|
  (id, name, email, phone) = *fields
  put "people", id, "attributes:name", name
  put "people", id, "attributes:email", email
  put "people", id, "attributes:phone", phone
end
4

1 に答える 1

3

これにはrubyを使用しないでください。これは、hbaseが何であるかを知らなかったためです。

あなたの場合は、これを試してください:

./bin/hbase shell /path-to-your-hbase-dir/src/examples/mapreduce/index-builder-setup.rb

于 2012-10-09T13:52:49.723 に答える