Java Code Examples for org.apache.hadoop.hbase.regionserver.querymatcher.DeleteTracker

The following examples show how to use org.apache.hadoop.hbase.regionserver.querymatcher.DeleteTracker. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: ranger   Source File: RangerAuthorizationCoprocessor.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public DeleteTracker postInstantiateDeleteTracker( ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker) throws IOException {
	final DeleteTracker ret;

	if(LOG.isDebugEnabled()) {
		LOG.debug("==> RangerAuthorizationCoprocessor.postInstantiateDeleteTracker()");
	}

	try {
		activatePluginClassLoader();
		ret = implRegionObserver.postInstantiateDeleteTracker(ctx, delTracker);
	} finally {
		deactivatePluginClassLoader();
	}

	if(LOG.isDebugEnabled()) {
		LOG.debug("<== RangerAuthorizationCoprocessor.postInstantiateDeleteTracker()");
	}

	return ret;
}
 
Example 2
Source Project: hbase   Source File: VisibilityController.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public DeleteTracker postInstantiateDeleteTracker(
    ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker)
    throws IOException {
  // Nothing to do if we are not filtering by visibility
  if (!authorizationEnabled) {
    return delTracker;
  }
  Region region = ctx.getEnvironment().getRegion();
  TableName table = region.getRegionInfo().getTable();
  if (table.isSystemTable()) {
    return delTracker;
  }
  // We are creating a new type of delete tracker here which is able to track
  // the timestamps and also the
  // visibility tags per cell. The covering cells are determined not only
  // based on the delete type and ts
  // but also on the visibility expression matching.
  return new VisibilityScanDeleteTracker(delTracker.getCellComparator());
}
 
Example 3
Source Project: hbase   Source File: RegionCoprocessorHost.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @deprecated Since 2.0 with out any replacement and will be removed in 3.0
 */
@Deprecated
public DeleteTracker postInstantiateDeleteTracker(DeleteTracker result) throws IOException {
  if (this.coprocEnvironments.isEmpty()) {
    return result;
  }
  return execOperationWithResult(new ObserverOperationWithResult<RegionObserver, DeleteTracker>(
      regionObserverGetter, result) {
    @Override
    public DeleteTracker call(RegionObserver observer) throws IOException {
      return observer.postInstantiateDeleteTracker(this, getResult());
    }
  });
}
 
Example 4
Source Project: phoenix   Source File: DelegateRegionObserver.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public DeleteTracker postInstantiateDeleteTracker(
        ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker)
        throws IOException {
    return delegate.postInstantiateDeleteTracker(ctx, delTracker);
}
 
Example 5
Source Project: hbase   Source File: RegionObserver.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Called after the ScanQueryMatcher creates ScanDeleteTracker. Implementing
 * this hook would help in creating customised DeleteTracker and returning
 * the newly created DeleteTracker
 * <p>
 * Warn: This is used by internal coprocessors. Should not be implemented by user coprocessors
 * @param ctx the environment provided by the region server
 * @param delTracker the deleteTracker that is created by the QueryMatcher
 * @return the Delete Tracker
 * @deprecated Since 2.0 with out any replacement and will be removed in 3.0
 */
@Deprecated
default DeleteTracker postInstantiateDeleteTracker(
    ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker)
    throws IOException {
  return delTracker;
}