【发布时间】:2023-03-20 14:04:01
【问题描述】:
我有一个 HBase 查找表,用于存储一些信息。我有一个 MapReduce 程序,它运行一些 Pentaho KTR,在 MapReduce 作业中我捕获了输出。从 KTR 输出中的某些字段中,我检索了一些键并使用它们我必须在 HBase 中查找一些值。我的情况是:
1. The rowkey is of format <Table Code>-<CRC>, ex- DDVC-XXX
For each output of the KTRs:
2. If no result is found for a particular key(which I get from the Pentaho KTRs),
then increment a column value which has the rowkey of format
<Table Code>-last, ex: DDVC-last
3. Take this incremented value and put it in the HBase table with the specific key.
所以,如果我找不到 rowkey 的值,我将在这里执行一次 Get、一次 Increment 和一次 Put 操作。有人可以给我一些建议,告诉我如何有效地做到这一点,而无需再次点击 HBase。因为,我可以看到作业所需的大部分时间是执行上述算法,该算法针对单行多次命中 HBase。
先谢谢了!!
【问题讨论】:
标签: hbase