我需要将数据集文件加载到 hbase 表中。我在 google 上搜索了一些示例,并通过这些示例尝试读取文件并将其加载到 Hbase 中。但只有第一行正在读取。只有一行数据正在读取,我需要读取所有数据,我不知道我哪里错了 我有这种格式的文件
year class days mm
1964 9 20.5 8.8
1964 10 13.6 4.2
1964 11 11.8 4.7
1964 12 7.7 0.1
1965 1 7.3 0.8
1965 2 6.5 0.1
1965 3 10.8 1.4
1965 4 13.2 3.5
1965 5 16.1 7.0
1965 6 19.0 9.2
1965 7 18.7 10.7
1965 8 19.9 10.9
1965 9 16.6 8.2
请任何人纠正我,我错在哪里,我需要加载文件中包含的所有数据,但我只能加载第一行数据
最佳答案
https://github.com/imyousuf/smart-dao/tree/hbase/smart-hbase/hbase-auto-long-rowid-incrementor/没有测试,但似乎是您要找的东西。
另外,看Hbase auto increment any column/row-key
Monolitically increasing row keys are not recommended in HBase, see this for reference: http://hbase.apache.org/book/rowkey.design.html, p.6.3.2. In fact, using globally ordered row keys would cause all instances of your distributed application write to the same region, which will become a bottleneck.
关于hadoop - Hbase MapReduce程序中如何自动生成RowId,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12388922/