简体   繁体   English

从Avro读取并写入Mapper中的多个HBase

[英]Read from Avro and Write to multiple HBase in Mapper

I have used MultiTableOutputFormat and successfully written to Multiple HBase tables in TableReducer . 我已使用MultiTableOutputFormat并将其成功写入TableReducer多个HBase表中。 But how to achieve that in Mapper only job? 但是如何在仅Mapper工作中实现这一目标?

I tried using TableMapper but it has only <KEYOUT,VALUEOUT> and not <KEYIN,VALUEIN,KEYOUT,VALUEOUT> . 我尝试使用TableMapper但它只有<KEYOUT,VALUEOUT>而没有<KEYIN,VALUEIN,KEYOUT,VALUEOUT> So I couldn't read in text files. 因此,我无法读取文本文件。

My Mapper is reading from Text/Avro file and processing it before pushing to HBase. 我的Mapper正在读取文本/ Avro文件并进行处理,然后再推送到HBase。 Is that possible? 那可能吗?

您可以打开HBase连接,并在实现的Mapper中自己编写PUT操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM