WALUtil.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:ditb 作者:
/**
 * Write a log marker that a bulk load has succeeded and is about to be committed.
 *
 * @param wal        The log to write into.
 * @param htd        A description of the table that we are bulk loading into.
 * @param hri       A description of the region in the table that we are bulk loading into.
 * @param desc A protocol buffers based description of the client's bulk loading request
 * @return txid of this transaction or if nothing to do, the last txid
 * @throws IOException We will throw an IOException if we can not append to the HLog.
 */
public static long writeBulkLoadMarkerAndSync(final WAL wal, final HTableDescriptor htd,
    final HRegionInfo hri, final WALProtos.BulkLoadDescriptor desc,
    final MultiVersionConcurrencyControl mvcc)
throws IOException {
  long trx = writeMarker(wal, htd, hri, WALEdit.createBulkLoadEvent(hri, desc), mvcc, true);
  if (LOG.isTraceEnabled()) {
    LOG.trace("Appended Bulk Load marker " + TextFormat.shortDebugString(desc));
  }
  return trx;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号