对于具有两个整数的复合行键的表,从 hbase shell 获取行的命令应该是什么。
我创建了这个示例 ruby 脚本
include Java
import org.apache.hadoop.hbase.util.Bytes
id = ARGV[0]
sid = ARGV[1]
byte [] rowkey = Bytes.add(Bytes.toBytes(id.to_i),Bytes.toBytes(sid.to_i))
puts Bytes.toStringBinary (rowkey)
....
....
....
当我调用 hbase org.jruby.Main script.rb 10 20 \x00\x00\x00\x00\x00\x00\x00\x0A\x00\x00\x00\x00\x00\x00\x00\x14 时看到的输出这清楚地显示了 16 个字节长。如何确保它是 8 个字节长(4 个用于 id,4 个用于 sid)。