Hadoop - Writing to HBase directly from the Mapper

后端 未结 2 1458

I have a haddop job that its output should be written to HBase. I do not really needs reducer, the kind of row I would like to insert is determined in the Mapper.

How c

2条回答
  •  忘了有多久
    2021-02-03 13:35

    You just need to make the mapper output the pair. OutputFormat only specifies how to persist the output key-values. It does not necessarily mean that the key values come from reducer. You would need to do something like this in the mapper:

    ... extends TableMapper() {
        ...
        ...
        context.write(, );
    }
    

提交回复
热议问题