类org.apache.hadoop.hbase.regionserver.wal.HLogKey源码实例Demo

下面列出了怎么用org.apache.hadoop.hbase.regionserver.wal.HLogKey的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: phoenix   文件: Indexer.java
@Override
public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info,
    HLogKey logKey, WALEdit logEdit) throws IOException {
    if (this.disabled) {
        super.preWALRestore(env, info, logKey, logEdit);
        return;
      }
  // TODO check the regions in transition. If the server on which the region lives is this one,
  // then we should rety that write later in postOpen.
  // we might be able to get even smarter here and pre-split the edits that are server-local
  // into their own recovered.edits file. This then lets us do a straightforward recovery of each
  // region (and more efficiently as we aren't writing quite as hectically from this one place).

  /*
   * Basically, we let the index regions recover for a little while long before retrying in the
   * hopes they come up before the primary table finishes.
   */
  Collection<Pair<Mutation, byte[]>> indexUpdates = extractIndexUpdate(logEdit);
  recoveryWriter.write(indexUpdates);
}
 
源代码2 项目: phoenix   文件: Indexer.java
@Override
public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info,
    HLogKey logKey, WALEdit logEdit) throws IOException {
    if (this.disabled) {
        super.preWALRestore(env, info, logKey, logEdit);
        return;
      }
  // TODO check the regions in transition. If the server on which the region lives is this one,
  // then we should rety that write later in postOpen.
  // we might be able to get even smarter here and pre-split the edits that are server-local
  // into their own recovered.edits file. This then lets us do a straightforward recovery of each
  // region (and more efficiently as we aren't writing quite as hectically from this one place).

  /*
   * Basically, we let the index regions recover for a little while long before retrying in the
   * hopes they come up before the primary table finishes.
   */
  Collection<Pair<Mutation, byte[]>> indexUpdates = extractIndexUpdate(logEdit);
  recoveryWriter.writeAndKillYourselfOnFailure(indexUpdates);
}
 
源代码3 项目: phoenix   文件: TestWALRecoveryCaching.java
@Override
public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info,
    HLogKey logKey, WALEdit logEdit) throws IOException {
  try {
    LOG.debug("Restoring logs for index table");
    if (allowIndexTableToRecover != null) {
      allowIndexTableToRecover.await();
      LOG.debug("Completed index table recovery wait latch");
    }
  } catch (InterruptedException e) {
    Assert.fail("Should not be interrupted while waiting to allow the index to restore WALs.");
  }
}
 
源代码4 项目: phoenix   文件: TestWALRecoveryCaching.java
@Override
public void preWALRestore(ObserverContext<RegionCoprocessorEnvironment> env, HRegionInfo info,
    HLogKey logKey, WALEdit logEdit) throws IOException {
  try {
    LOG.debug("Restoring logs for index table");
    if (allowIndexTableToRecover != null) {
      allowIndexTableToRecover.await();
      LOG.debug("Completed index table recovery wait latch");
    }
  } catch (InterruptedException e) {
    Assert.fail("Should not be interrupted while waiting to allow the index to restore WALs.");
  }
}
 
源代码5 项目: phoenix   文件: IndexLogRollSynchronizer.java
@Override
public void visitLogEntryBeforeWrite(HRegionInfo info, HLogKey logKey, WALEdit logEdit) {
  // noop
}
 
源代码6 项目: phoenix   文件: IndexLogRollSynchronizer.java
@Override
public void visitLogEntryBeforeWrite(HTableDescriptor htd, HLogKey logKey, WALEdit logEdit) {
  // noop
}
 
 类所在包
 同包方法