hadoop - Hbase MapReduce程序中如何自动生成RowId

标签 hadoop mapreduce hbase

我需要将数据集文件加载到 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/

相关文章:

hadoop - hive 服务器 : ClassNotFound (HiveServer)

hadoop - 使用 HBase API Table 接口(interface)无法将数据放入表中?

hadoop - 无法使用 phoenix jdbc 驱动程序连接到 hbase(无法获取位置错误)

Hadoop:运行 HDFS 基准测试后如何删除 block ?

java - 作者为什么提出HBase Tall-Thin schema over Short-Wide 里面描述的?

python - 使用Python进行Hadoop流传输:跟踪行号

python - 有没有办法将Unix上的md5与hadoop上的md5与python进行比较?

hadoop - 是否每次都需要伪分发模式下的Namenode格式

java - UDFRowSequence不起作用

hadoop - 用Reducer计算和矩阵