HBase mapReduce TableOutputFormat如何使用Flush和WAL

How does HBase mapReduce TableOutputFormat use Flush and WAL

因此,当从使用 TableOutputFormat 的 MapReduce 作业写入 HBase 时,它​​多久写入一次 HBase。我不认为它会为每一行执行一个 put 命令。

在MapReduce中使用时如何控制AutoFlush和Write Ahead Log (WAL)?

它确实看到了 the code. If you want to bypass the WAL write using HFileOutputFormat see example on gitub

TableOutputFormat 禁用 AutoFlush 并使用在 hbase.client.write.buffer 指定的写入缓冲区(默认为 2MB),一旦缓冲区已满,它会自动刷新到 HBase。您可以通过将 属性 添加到作业配置来更改它: config.set("hbase.client.write.buffer", 16777216); // 16MB Buffer

WAL 默认启用,每次放置都可以禁用它,但通常不鼓励这样做: myPut.setWriteToWal(false);