Java 类org.apache.hadoop.hbase.filter.WritableByteArrayComparable 实例源码

项目:LCIndex-HBase-0.94.16    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row, final byte[] family,
    final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w, Integer lock)
    throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp, comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:LCIndex-HBase-0.94.16    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:LCIndex-HBase-0.94.16    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:LCIndex-HBase-0.94.16    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:IRIndex    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w,
    Integer lock) throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp,
      comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:IRIndex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:IRIndex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:IRIndex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:RStore    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w,
    Integer lock) throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp,
      comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:RStore    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:RStore    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:RStore    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:HBase-Research    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w,
    Integer lock) throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp,
      comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:HBase-Research    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:HBase-Research    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:HBase-Research    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:hbase-0.94.8-qod    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w,
    Integer lock) throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp,
      comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:hbase-0.94.8-qod    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:hbase-0.94.8-qod    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:hbase-0.94.8-qod    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:hbase-0.94.8-qod    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w,
    Integer lock) throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp,
      comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:hbase-0.94.8-qod    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:hbase-0.94.8-qod    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:hbase-0.94.8-qod    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:hindex    文件:HRegionServer.java   
private boolean checkAndMutate(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Writable w,
    Integer lock) throws IOException {
  checkOpen();
  this.requestCount.incrementAndGet();
  HRegion region = getRegion(regionName);
  try {
    if (!region.getRegionInfo().isMetaTable()) {
      this.cacheFlusher.reclaimMemStoreMemory();
    }
    return region.checkAndMutate(row, family, qualifier, compareOp,
      comparator, w, lock, true);
  } catch (Throwable t) {
    throw convertThrowableToIOE(cleanup(t));
  }
}
项目:hindex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).postCheckAndPut(ctx, row,
          family, qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:hindex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Delete delete)
    throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndDelete(ctx, row,
          family, qualifier, compareOp, comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:hindex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param delete delete to commit if check succeeds
 * @throws IOException e
 */
public boolean postCheckAndDelete(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    boolean result)
  throws IOException {
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance())
          .postCheckAndDelete(ctx, row, family, qualifier, compareOp,
            comparator, delete, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return result;
}
项目:LCIndex-HBase-0.94.16    文件:BaseRegionObserver.java   
@Override
public boolean preCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Put put, final boolean result) throws IOException {
  return result;
}
项目:LCIndex-HBase-0.94.16    文件:BaseRegionObserver.java   
@Override
public boolean postCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Put put, final boolean result) throws IOException {
  return result;
}
项目:LCIndex-HBase-0.94.16    文件:BaseRegionObserver.java   
@Override
public boolean preCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Delete delete, final boolean result) throws IOException {
  return result;
}
项目:LCIndex-HBase-0.94.16    文件:BaseRegionObserver.java   
@Override
public boolean postCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Delete delete, final boolean result) throws IOException {
  return result;
}
项目:LCIndex-HBase-0.94.16    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Put put)
  throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndPut(ctx, row, family,
          qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }


      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}
项目:IRIndex    文件:AccessController.java   
@Override
public boolean preCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> c,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareFilter.CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Put put,
    final boolean result) throws IOException {
  Collection<byte[]> familyMap = Arrays.asList(new byte[][]{family});
  requirePermission("checkAndPut", TablePermission.Action.READ, c.getEnvironment(), familyMap);
  requirePermission("checkAndPut", TablePermission.Action.WRITE, c.getEnvironment(), familyMap);
  return result;
}
项目:IRIndex    文件:AccessController.java   
@Override
public boolean preCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> c,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareFilter.CompareOp compareOp,
    final WritableByteArrayComparable comparator, final Delete delete,
    final boolean result) throws IOException {
  Collection<byte[]> familyMap = Arrays.asList(new byte[][]{family});
  requirePermission("checkAndDelete", TablePermission.Action.READ, c.getEnvironment(), familyMap);
  requirePermission("checkAndDelete", TablePermission.Action.WRITE, c.getEnvironment(), familyMap);
  return result;
}
项目:IRIndex    文件:BaseRegionObserver.java   
@Override
public boolean preCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Put put, final boolean result) throws IOException {
  return result;
}
项目:IRIndex    文件:BaseRegionObserver.java   
@Override
public boolean postCheckAndPut(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Put put, final boolean result) throws IOException {
  return result;
}
项目:IRIndex    文件:BaseRegionObserver.java   
@Override
public boolean preCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Delete delete, final boolean result) throws IOException {
  return result;
}
项目:IRIndex    文件:BaseRegionObserver.java   
@Override
public boolean postCheckAndDelete(final ObserverContext<RegionCoprocessorEnvironment> e,
    final byte [] row, final byte [] family, final byte [] qualifier,
    final CompareOp compareOp, final WritableByteArrayComparable comparator,
    final Delete delete, final boolean result) throws IOException {
  return result;
}
项目:IRIndex    文件:RegionCoprocessorHost.java   
/**
 * @param row row to check
 * @param family column family
 * @param qualifier column qualifier
 * @param compareOp the comparison operation
 * @param comparator the comparator
 * @param put data to put if check succeeds
 * @return true or false to return to client if default processing should
 * be bypassed, or null otherwise
 * @throws IOException e
 */
public Boolean preCheckAndPut(final byte [] row, final byte [] family,
    final byte [] qualifier, final CompareOp compareOp,
    final WritableByteArrayComparable comparator, Put put)
  throws IOException {
  boolean bypass = false;
  boolean result = false;
  ObserverContext<RegionCoprocessorEnvironment> ctx = null;
  for (RegionEnvironment env: coprocessors) {
    if (env.getInstance() instanceof RegionObserver) {
      ctx = ObserverContext.createAndPrepare(env, ctx);
      try {
        result = ((RegionObserver)env.getInstance()).preCheckAndPut(ctx, row, family,
          qualifier, compareOp, comparator, put, result);
      } catch (Throwable e) {
        handleCoprocessorThrowable(env, e);
      }


      bypass |= ctx.shouldBypass();
      if (ctx.shouldComplete()) {
        break;
      }
    }
  }
  return bypass ? result : null;
}