当我尝试对hbase表进行批处理增量时(没有行键副本)
final List<Increment> increments = countPerUid.entrySet().stream()
.map(entry -> {
Increment increment = new Increment(toBytes(entry.getKey()));
increment.addColumn(toBytes(conf.parentColumnFamily()), toBytes(conf.parentRankQualifier()), entry.getValue());
return increment;
}).collect(Collectors.toList());
public BatchOperationResult batchIncrement(HTable table, List<Increment> rows) {
Object[] results = new Object[rows.size()];
try {
table.batch(rows, results);
} catch (IOException | InterruptedException e) {
Throwables.propagate(e);
}
return new BatchOperationResult(results);
}
我有这样的例外:
2015-05-13 09:53:43,674 [Thread-9] ERROR hbase_query_layer.service.HbaseLayerServiceHandlerImpl - java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException:
Failed 14896 actions: org.apache.hadoop.hbase.exceptions.OperationConflictException: The operation with nonce {-3517837563370374612, -1595005354043534544} on row [298270339298463040] may have already completed
有人知道为什么?
我有Hbase 0.98.0
发布于 2015-07-09 07:08:08
作为一种临时解决方案,需要为较小的块拆分增量批处理。
发布于 2015-05-14 22:01:24
不相关,但我建议在这里尝试高效的无读增量,因为很明显,您试图通过批处理来加快增量。
HBase 0.98的示例可以在这里找到:https://github.com/caskdata/cdap-hbase-increments
https://stackoverflow.com/questions/30220636
复制相似问题