当前位置: 首页>>代码示例>>Java>>正文


Java Delete.getFamilyCellMap方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.client.Delete.getFamilyCellMap方法的典型用法代码示例。如果您正苦于以下问题:Java Delete.getFamilyCellMap方法的具体用法?Java Delete.getFamilyCellMap怎么用?Java Delete.getFamilyCellMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.client.Delete的用法示例。


在下文中一共展示了Delete.getFamilyCellMap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preDelete

import org.apache.hadoop.hbase.client.Delete; //导入方法依赖的package包/类
@Override
public void preDelete(final ObserverContext<RegionCoprocessorEnvironment> c,
    final Delete delete, final WALEdit edit, final Durability durability)
    throws IOException {
  // An ACL on a delete is useless, we shouldn't allow it
  if (delete.getAttribute(AccessControlConstants.OP_ATTRIBUTE_ACL) != null) {
    throw new DoNotRetryIOException("ACL on delete has no effect: " + delete.toString());
  }
  // Require WRITE permissions on all cells covered by the delete. Unlike
  // for Puts we need to check all visible prior versions, because a major
  // compaction could remove them. If the user doesn't have permission to
  // overwrite any of the visible versions ('visible' defined as not covered
  // by a tombstone already) then we have to disallow this operation.
  RegionCoprocessorEnvironment env = c.getEnvironment();
  Map<byte[],? extends Collection<Cell>> families = delete.getFamilyCellMap();
  User user = getActiveUser();
  AuthResult authResult = permissionGranted(OpType.DELETE, user, env, families, Action.WRITE);
  logResult(authResult);
  if (!authResult.isAllowed()) {
    if (cellFeaturesEnabled && !compatibleEarlyTermination) {
      delete.setAttribute(CHECK_COVERING_PERM, TRUE);
    } else if (authorizationEnabled) {
      throw new AccessDeniedException("Insufficient permissions " +
        authResult.toContextString());
    }
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:28,代码来源:AccessController.java

示例2: preDelete

import org.apache.hadoop.hbase.client.Delete; //导入方法依赖的package包/类
@Override
public void preDelete(final ObserverContext<RegionCoprocessorEnvironment> c, 
    final Delete delete, final WALEdit edit,
    final Durability durability) throws IOException {
  Map<byte[], List<Cell>> familyMap  = delete.getFamilyCellMap();
  RegionCoprocessorEnvironment e = c.getEnvironment();
  assertNotNull(e);
  assertNotNull(e.getRegion());
  assertNotNull(familyMap);
  if (ctBeforeDelete.get() > 0) {
    ctPreDeleted.incrementAndGet();
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:14,代码来源:SimpleRegionObserver.java

示例3: postDelete

import org.apache.hadoop.hbase.client.Delete; //导入方法依赖的package包/类
@Override
public void postDelete(final ObserverContext<RegionCoprocessorEnvironment> c, 
    final Delete delete, final WALEdit edit,
    final Durability durability) throws IOException {
  Map<byte[], List<Cell>> familyMap  = delete.getFamilyCellMap();
  RegionCoprocessorEnvironment e = c.getEnvironment();
  assertNotNull(e);
  assertNotNull(e.getRegion());
  assertNotNull(familyMap);
  ctBeforeDelete.set(0);
  ctPostDeleted.incrementAndGet();
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:13,代码来源:SimpleRegionObserver.java


注:本文中的org.apache.hadoop.hbase.client.Delete.getFamilyCellMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。