Java 类org.apache.hadoop.hbase.ipc.CoprocessorProtocol 实例源码

项目:LCIndex-HBase-0.94.16    文件:HMaster.java   
@Override
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered master protocol handler: protocol="+protocol.getName());
  }
  return true;
}
项目:LCIndex-HBase-0.94.16    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to be available for handling
 * {@link HRegion#exec(Exec)} calls.
 * <p>
 * Only a single protocol type/handler combination may be registered per region. After the first
 * registration, subsequent calls with the same protocol type will fail with a return value of
 * {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false} otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(Class<T> protocol, T handler) {

  /*
   * No stacking of protocol handlers is currently allowed. The first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol " + protocol.getName() + " already registered, rejecting request from "
        + handler);
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region=" + Bytes.toStringBinary(getRegionName())
        + " protocol=" + protocol.getName());
  }
  return true;
}
项目:IRIndex    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T,R> callable)
    throws IOException, Throwable {

  final Map<byte[],R> results =  Collections.synchronizedMap(new TreeMap<byte[],R>(
      Bytes.BYTES_COMPARATOR));
  coprocessorExec(protocol, startKey, endKey, callable,
      new Batch.Callback<R>(){
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:IRIndex    文件:HMaster.java   
@Override
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered master protocol handler: protocol="+protocol.getName());
  }
  return true;
}
项目:IRIndex    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to
 * be available for handling {@link HRegion#exec(Exec)} calls.
 *
 * <p>
 * Only a single protocol type/handler combination may be registered per
 * region.
 * After the first registration, subsequent calls with the same protocol type
 * will fail with a return value of {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the
 * protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false}
 * otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region="+
        Bytes.toStringBinary(getRegionName())+" protocol="+protocol.getName());
  }
  return true;
}
项目:RStore    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T,R> callable)
    throws IOException, Throwable {

  final Map<byte[],R> results = new TreeMap<byte[],R>(
      Bytes.BYTES_COMPARATOR);
  coprocessorExec(protocol, startKey, endKey, callable,
      new Batch.Callback<R>(){
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:RStore    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to
 * be available for handling {@link HRegion#exec(Exec)} calls.
 *
 * <p>
 * Only a single protocol type/handler combination may be registered per
 * region.
 * After the first registration, subsequent calls with the same protocol type
 * will fail with a return value of {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the
 * protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false}
 * otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region="+
        Bytes.toStringBinary(getRegionName())+" protocol="+protocol.getName());
  }
  return true;
}
项目:RStore    文件:RegionCoprocessorHost.java   
@Override
public RegionEnvironment createEnvironment(Class<?> implClass,
    Coprocessor instance, int priority, int seq, Configuration conf) {
  // Check if it's an Endpoint.
  // Due to current dynamic protocol design, Endpoint
  // uses a different way to be registered and executed.
  // It uses a visitor pattern to invoke registered Endpoint
  // method.
  for (Class c : implClass.getInterfaces()) {
    if (CoprocessorProtocol.class.isAssignableFrom(c)) {
      region.registerProtocol(c, (CoprocessorProtocol)instance);
      break;
    }
  }
  return new RegionEnvironment(instance, priority, seq, conf, region,
      rsServices);
}
项目:HBase-Research    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T,R> callable)
    throws IOException, Throwable {

  final Map<byte[],R> results =  Collections.synchronizedMap(new TreeMap<byte[],R>(
      Bytes.BYTES_COMPARATOR));
  coprocessorExec(protocol, startKey, endKey, callable,
      new Batch.Callback<R>(){
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:HBase-Research    文件:HMaster.java   
@Override
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered master protocol handler: protocol="+protocol.getName());
  }
  return true;
}
项目:HBase-Research    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to
 * be available for handling {@link HRegion#exec(Exec)} calls.
 *
 * <p>
 * Only a single protocol type/handler combination may be registered per
 * region.
 * After the first registration, subsequent calls with the same protocol type
 * will fail with a return value of {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the
 * protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false}
 * otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region="+
        Bytes.toStringBinary(getRegionName())+" protocol="+protocol.getName());
  }
  return true;
}
项目:hbase-0.94.8-qod    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T,R> callable)
    throws IOException, Throwable {

  final Map<byte[],R> results =  Collections.synchronizedMap(new TreeMap<byte[],R>(
      Bytes.BYTES_COMPARATOR));
  coprocessorExec(protocol, startKey, endKey, callable,
      new Batch.Callback<R>(){
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:hindex    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to
 * be available for handling {@link HRegion#exec(Exec)} calls.
 *
 * <p>
 * Only a single protocol type/handler combination may be registered per
 * region.
 * After the first registration, subsequent calls with the same protocol type
 * will fail with a return value of {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the
 * protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false}
 * otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region="+
        Bytes.toStringBinary(getRegionName())+" protocol="+protocol.getName());
  }
  return true;
}
项目:hbase-0.94.8-qod    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to
 * be available for handling {@link HRegion#exec(Exec)} calls.
 *
 * <p>
 * Only a single protocol type/handler combination may be registered per
 * region.
 * After the first registration, subsequent calls with the same protocol type
 * will fail with a return value of {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the
 * protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false}
 * otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region="+
        Bytes.toStringBinary(getRegionName())+" protocol="+protocol.getName());
  }
  return true;
}
项目:hbase-0.94.8-qod    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T,R> callable)
    throws IOException, Throwable {

  final Map<byte[],R> results =  Collections.synchronizedMap(new TreeMap<byte[],R>(
      Bytes.BYTES_COMPARATOR));
  coprocessorExec(protocol, startKey, endKey, callable,
      new Batch.Callback<R>(){
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:hindex    文件:HMaster.java   
@Override
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered master protocol handler: protocol="+protocol.getName());
  }
  return true;
}
项目:hbase-0.94.8-qod    文件:HMaster.java   
@Override
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered master protocol handler: protocol="+protocol.getName());
  }
  return true;
}
项目:hbase-0.94.8-qod    文件:HRegion.java   
/**
 * Registers a new CoprocessorProtocol subclass and instance to
 * be available for handling {@link HRegion#exec(Exec)} calls.
 *
 * <p>
 * Only a single protocol type/handler combination may be registered per
 * region.
 * After the first registration, subsequent calls with the same protocol type
 * will fail with a return value of {@code false}.
 * </p>
 * @param protocol a {@code CoprocessorProtocol} subinterface defining the
 * protocol methods
 * @param handler an instance implementing the interface
 * @param <T> the protocol type
 * @return {@code true} if the registration was successful, {@code false}
 * otherwise
 */
public <T extends CoprocessorProtocol> boolean registerProtocol(
    Class<T> protocol, T handler) {

  /* No stacking of protocol handlers is currently allowed.  The
   * first to claim wins!
   */
  if (protocolHandlers.containsKey(protocol)) {
    LOG.error("Protocol "+protocol.getName()+
        " already registered, rejecting request from "+
        handler
    );
    return false;
  }

  protocolHandlers.putInstance(protocol, handler);
  protocolHandlerNames.put(protocol.getName(), protocol);
  if (LOG.isDebugEnabled()) {
    LOG.debug("Registered protocol handler: region="+
        Bytes.toStringBinary(getRegionName())+" protocol="+protocol.getName());
  }
  return true;
}
项目:hindex    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[],R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T,R> callable)
    throws IOException, Throwable {

  final Map<byte[],R> results =  Collections.synchronizedMap(new TreeMap<byte[],R>(
      Bytes.BYTES_COMPARATOR));
  coprocessorExec(protocol, startKey, endKey, callable,
      new Batch.Callback<R>(){
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:LCIndex-HBase-0.94.16    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(Class<T> protocol,
    byte[] startKey, byte[] endKey, Batch.Call<T, R> callable) throws IOException, Throwable {

  final Map<byte[], R> results =
      Collections.synchronizedMap(new TreeMap<byte[], R>(Bytes.BYTES_COMPARATOR));
  coprocessorExec(protocol, startKey, endKey, callable, new Batch.Callback<R>() {
    public void update(byte[] region, byte[] row, R value) {
      results.put(region, value);
    }
  });
  return results;
}
项目:LCIndex-HBase-0.94.16    文件:HTable.java   
/**
 * {@inheritDoc}
 */
@Override
public <T extends CoprocessorProtocol, R> void coprocessorExec(Class<T> protocol,
    byte[] startKey, byte[] endKey, Batch.Call<T, R> callable, Batch.Callback<R> callback)
    throws IOException, Throwable {

  // get regions covered by the row range
  List<byte[]> keys = getStartKeysInRange(startKey, endKey);
  connection.processExecs(protocol, keys, tableName, pool, callable, callback);
}
项目:LCIndex-HBase-0.94.16    文件:HTablePool.java   
@Override
public <T extends CoprocessorProtocol, R> void coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T, R> callable, Batch.Callback<R> callback)
    throws IOException, Throwable {
  table.coprocessorExec(protocol, startKey, endKey, callable, callback);
}
项目:LCIndex-HBase-0.94.16    文件:Batch.java   
/**
 * Creates a new {@link Batch.Call} instance that invokes a method
 * with the given parameters and returns the result.
 *
 * @param method the method reference to invoke
 * @param args zero or more arguments to be passed to the method
 * @param <T> the class type of the protocol implementation being invoked
 * @param <R> the return type for the method call
 * @return a {@code Callable} instance that will invoke the given method and
 * return the results
 * @see org.apache.hadoop.hbase.client.HTable#coprocessorExec(Class, byte[], byte[], org.apache.hadoop.hbase.client.coprocessor.Batch.Call, org.apache.hadoop.hbase.client.coprocessor.Batch.Callback)
 */
public static <T extends CoprocessorProtocol,R> Call<T,R> forMethod(
    final Method method, final Object... args) {
  return new Call<T,R>() {
      public R call(T instance) throws IOException {
        try {
          if (Proxy.isProxyClass(instance.getClass())) {
            InvocationHandler invoker = Proxy.getInvocationHandler(instance);
            return (R)invoker.invoke(instance, method, args);
          } else {
            LOG.warn("Non proxied invocation of method '"+method.getName()+"'!");
            return (R)method.invoke(instance, args);
          }
        }
        catch (IllegalAccessException iae) {
          throw new IOException("Unable to invoke method '"+
              method.getName()+"'", iae);
        }
        catch (InvocationTargetException ite) {
          throw new IOException(ite.toString(), ite);
        }
        catch (Throwable t) {
          throw new IOException(t.toString(), t);
        }
      }
  };
}
项目:LCIndex-HBase-0.94.16    文件:Exec.java   
public Exec(Configuration configuration,
    byte[] row,
    Class<? extends CoprocessorProtocol> protocol,
    Method method, Object[] parameters) {
  super(method, protocol, parameters);
  this.conf = configuration;
  this.referenceRow = row;
  this.protocol = protocol;
  this.protocolName = protocol.getName();
}
项目:LCIndex-HBase-0.94.16    文件:RemoteHTable.java   
@Override
public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T, R> callable)
    throws IOException, Throwable {
  throw new UnsupportedOperationException("coprocessorExec not implemented");
}
项目:LCIndex-HBase-0.94.16    文件:RemoteHTable.java   
@Override
public <T extends CoprocessorProtocol, R> void coprocessorExec(
    Class<T> protocol, byte[] startKey, byte[] endKey,
    Batch.Call<T, R> callable, Batch.Callback<R> callback)
    throws IOException, Throwable {
  throw new UnsupportedOperationException("coprocessorExec not implemented");
}
项目:LCIndex-HBase-0.94.16    文件:MasterCoprocessorHost.java   
@Override
public MasterEnvironment createEnvironment(final Class<?> implClass,
    final Coprocessor instance, final int priority, final int seq,
    final Configuration conf) {
  for (Class c : implClass.getInterfaces()) {
    if (CoprocessorProtocol.class.isAssignableFrom(c)) {
      masterServices.registerProtocol(c, (CoprocessorProtocol)instance);
      break;
    }
  }
  return new MasterEnvironment(implClass, instance, priority, seq, conf,
      masterServices);
}
项目:LCIndex-HBase-0.94.16    文件:RegionCoprocessorHost.java   
@Override
public RegionEnvironment createEnvironment(Class<?> implClass,
    Coprocessor instance, int priority, int seq, Configuration conf) {
  // Check if it's an Endpoint.
  // Due to current dynamic protocol design, Endpoint
  // uses a different way to be registered and executed.
  // It uses a visitor pattern to invoke registered Endpoint
  // method.
  for (Class c : implClass.getInterfaces()) {
    if (CoprocessorProtocol.class.isAssignableFrom(c)) {
      region.registerProtocol(c, (CoprocessorProtocol)instance);
      break;
    }
  }
  ConcurrentMap<String, Object> classData;
  // make sure only one thread can add maps
  synchronized (sharedDataMap) {
    // as long as at least one RegionEnvironment holds on to its classData it will
    // remain in this map
    classData = (ConcurrentMap<String, Object>)sharedDataMap.get(implClass.getName());
    if (classData == null) {
      classData = new ConcurrentHashMap<String, Object>();
      sharedDataMap.put(implClass.getName(), classData);
    }
  }
  return new RegionEnvironment(instance, priority, seq, conf, region,
      rsServices, classData);
}
项目:uzaygezen    文件:MockHTable.java   
@Override
public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(
  Class<T> protocol, byte[] startKey, byte[] endKey, Call<T, R> callable) throws IOException,
  Throwable {
  // TODO Auto-generated method stub
  return null;
}
项目:uzaygezen    文件:MockHTable.java   
@Override
public <T extends CoprocessorProtocol, R> void coprocessorExec(
  Class<T> protocol, byte[] startKey, byte[] endKey, Call<T, R> callable, Callback<R> callback)
  throws IOException, Throwable {
  // TODO Auto-generated method stub

}
项目:openyu-commons    文件:HzSessionImpl.java   
public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(
        String tableName, Class<T> paramClass, byte[] paramArrayOfByte1,
        byte[] paramArrayOfByte2, Call<T, R> paramCall) throws IOException,
        Throwable {
    return poolableHConnection.coprocessorExec(tableName, paramClass,
            paramArrayOfByte1, paramArrayOfByte2, paramCall);
}
项目:openyu-commons    文件:HzSessionImpl.java   
public <T extends CoprocessorProtocol, R> void coprocessorExec(
        String tableName, Class<T> paramClass, byte[] paramArrayOfByte1,
        byte[] paramArrayOfByte2, Call<T, R> paramCall,
        Callback<R> paramCallback) throws IOException, Throwable {
    poolableHConnection.coprocessorExec(tableName, paramClass,
            paramArrayOfByte1, paramArrayOfByte2, paramCall, paramCallback);
}
项目:openyu-commons    文件:PoolableHTable.java   
public <T extends CoprocessorProtocol, R> void coprocessorExec(
        Class<T> protocol, byte[] startKey, byte[] endKey,
        Batch.Call<T, R> callable, Batch.Callback<R> callback)
        throws IOException, Throwable {
    this.delegate.coprocessorExec(protocol, startKey, endKey, callable,
            callback);
}
项目:openyu-commons    文件:PoolableHConnection.java   
public <T extends CoprocessorProtocol> T coprocessorProxy(String tableName, Class<T> paramClass,
        byte[] paramArrayOfByte) {
    try {
        checkOpen();
        HTableInterface table = getTable(tableName);
        return table.coprocessorProxy(paramClass, paramArrayOfByte);
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
项目:openyu-commons    文件:HzBaoSupporter.java   
public <T extends CoprocessorProtocol> T coprocessorProxy(String tableName, Class<T> paramClass,
        byte[] paramArrayOfByte) {
    try {
        return hzTemplate.coprocessorProxy(tableName, paramClass, paramArrayOfByte);
    } catch (Exception ex) {
        throw new HzBaoException(ex);
    }
}
项目:openyu-commons    文件:HzBaoSupporter.java   
public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(String tableName, Class<T> paramClass,
        byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, Call<T, R> paramCall) {
    try {
        return hzTemplate.coprocessorExec(tableName, paramClass, paramArrayOfByte1, paramArrayOfByte2, paramCall);
    } catch (Throwable ex) {
        throw new HzBaoException(ex);
    }
}
项目:openyu-commons    文件:HzBaoSupporter.java   
public <T extends CoprocessorProtocol, R> void coprocessorExec(String tableName, Class<T> paramClass,
        byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, Call<T, R> paramCall, Callback<R> paramCallback) {
    try {
        hzTemplate.coprocessorExec(tableName, paramClass, paramArrayOfByte1, paramArrayOfByte2, paramCall,
                paramCallback);
    } catch (Throwable ex) {
        throw new HzBaoException(ex);
    }
}
项目:openyu-commons    文件:HzTemplateImpl.java   
public <T extends CoprocessorProtocol> T coprocessorProxy(String tableName, final Class<T> paramClass,
        final byte[] paramArrayOfByte) {
    return execute(tableName, new HzTableCallback<T>() {
        public T doInAction(HTableInterface table) throws HzTemplateException {
            try {
                return table.coprocessorProxy(paramClass, paramArrayOfByte);
            } catch (Exception ex) {
                throw new HzTemplateException(ex);
            }
        }
    });
}
项目:openyu-commons    文件:HzTemplateImpl.java   
@Override
public <T extends CoprocessorProtocol, R> Map<byte[], R> coprocessorExec(String tableName,
        final Class<T> paramClass, final byte[] paramArrayOfByte1, final byte[] paramArrayOfByte2,
        final Call<T, R> paramCall) throws IOException, Throwable {
    return execute(tableName, new HzTableCallback<Map<byte[], R>>() {
        public Map<byte[], R> doInAction(HTableInterface table) throws HzTemplateException {
            try {
                return table.coprocessorExec(paramClass, paramArrayOfByte1, paramArrayOfByte2, paramCall);
            } catch (Throwable ex) {
                throw new HzTemplateException(ex);
            }
        }
    });
}
项目:openyu-commons    文件:HzTemplateImpl.java   
public <T extends CoprocessorProtocol, R> void coprocessorExec(String tableName, final Class<T> paramClass,
        final byte[] paramArrayOfByte1, final byte[] paramArrayOfByte2, final Call<T, R> paramCall,
        final Callback<R> paramCallback) throws IOException, Throwable {
    execute(tableName, new HzTableCallback<Object>() {
        public Object doInAction(HTableInterface table) throws HzTemplateException {
            try {
                table.coprocessorExec(paramClass, paramArrayOfByte1, paramArrayOfByte2, paramCall, paramCallback);
                return null;
            } catch (Throwable ex) {
                throw new HzTemplateException(ex);
            }
        }
    });
}