Java 类org.apache.hadoop.hbase.coprocessor.WALObserver 实例源码

项目:hbase    文件:WALCoprocessorHost.java   
public void preWALWrite(final RegionInfo info, final WALKey logKey, final WALEdit logEdit)
    throws IOException {
  // Not bypassable.
  if (this.coprocEnvironments.isEmpty()) {
    return;
  }
  execOperation(new WALObserverOperation() {
    @Override
    public void call(WALObserver oserver) throws IOException {
      oserver.preWALWrite(this, info, logKey, logEdit);
    }
  });
}
项目:hbase    文件:WALCoprocessorHost.java   
public void postWALWrite(final RegionInfo info, final WALKey logKey, final WALEdit logEdit)
    throws IOException {
  execOperation(coprocEnvironments.isEmpty() ? null : new WALObserverOperation() {
    @Override
    protected void call(WALObserver observer) throws IOException {
      observer.postWALWrite(this, info, logKey, logEdit);
    }
  });
}
项目:hbase    文件:WALCoprocessorHost.java   
/**
 * Called before rolling the current WAL
 * @param oldPath the path of the current wal that we are replacing
 * @param newPath the path of the wal we are going to create
 */
public void preWALRoll(Path oldPath, Path newPath) throws IOException {
  execOperation(coprocEnvironments.isEmpty() ? null : new WALObserverOperation() {
    @Override
    protected void call(WALObserver observer) throws IOException {
      observer.preWALRoll(this, oldPath, newPath);
    }
  });
}
项目:hbase    文件:WALCoprocessorHost.java   
/**
 * Called after rolling the current WAL
 * @param oldPath the path of the wal that we replaced
 * @param newPath the path of the wal we have created and now is the current
 */
public void postWALRoll(Path oldPath, Path newPath) throws IOException {
  execOperation(coprocEnvironments.isEmpty() ? null : new WALObserverOperation() {
    @Override
    protected void call(WALObserver observer) throws IOException {
      observer.postWALRoll(this, oldPath, newPath);
    }
  });
}
项目:hbase    文件:TestRegionReplicaReplicationEndpointNoMaster.java   
@Override
public Optional<WALObserver> getWALObserver() {
  return Optional.of(this);
}