org.apache.hadoop.hbase.client.coprocessor.Batch.Callback Java Examples

The following examples show how to use org.apache.hadoop.hbase.client.coprocessor.Batch.Callback. 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 File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException,
  InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  return hTable.batchCallback(transactionalizeActions(actions), callback);
}
 
Example #2
Source File: TableOverAsyncTable.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Override
public <T extends Service, R> void coprocessorService(Class<T> service, byte[] startKey,
    byte[] endKey, Call<T, R> callable, Callback<R> callback) throws ServiceException, Throwable {
  coprocssorService(service.getName(), startKey, endKey, callback, channel -> {
    T instance = ProtobufUtil.newServiceStub(service, channel);
    return callable.call(instance);
  });
}
 
Example #3
Source File: TableOverAsyncTable.java    From hbase with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Override
public <R extends Message> void batchCoprocessorService(MethodDescriptor methodDescriptor,
    Message request, byte[] startKey, byte[] endKey, R responsePrototype, Callback<R> callback)
    throws ServiceException, Throwable {
  coprocssorService(methodDescriptor.getFullName(), startKey, endKey, callback, channel -> {
    return (R) channel.callBlockingMethod(methodDescriptor, null, request, responsePrototype);
  });
}
 
Example #4
Source File: HTableMultiCluster.java    From HBase.MCC with Apache License 2.0 5 votes vote down vote up
public <R extends Message> void batchCoprocessorService(
        MethodDescriptor methodDescriptor, Message request, byte[] startKey,
        byte[] endKey, R responsePrototype, Callback<R> callback)
        throws ServiceException, Throwable {
  // TODO Auto-generated method stub

}
 
Example #5
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException,
  InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  return hTable.batchCallback(transactionalizeActions(actions), callback);
}
 
Example #6
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws
  IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #7
Source File: HConnectionMultiCluster.java    From HBase.MCC with Apache License 2.0 5 votes vote down vote up
@Deprecated
public <R> void processBatchCallback(List<? extends Row> list,
    byte[] tableName, ExecutorService pool, Object[] results,
    Callback<R> callback) throws IOException, InterruptedException {
  primaryConnection.processBatchCallback(list, tableName, pool, results, callback);

}
 
Example #8
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException,
  InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  return hTable.batchCallback(transactionalizeActions(actions), callback);
}
 
Example #9
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws
  IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #10
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException,
  InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  return hTable.batchCallback(transactionalizeActions(actions), callback);
}
 
Example #11
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws
  IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #12
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException,
  InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  return hTable.batchCallback(transactionalizeActions(actions), callback);
}
 
Example #13
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws
  IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #14
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws
  IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #15
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R extends Message> void batchCoprocessorService(MethodDescriptor methodDescriptor,
    Message request, byte[] startKey, byte[] endKey, R responsePrototype, Callback<R> callback)
    throws ServiceException, Throwable {
  hTable.batchCoprocessorService(methodDescriptor, request, startKey, endKey, responsePrototype,
    callback);
}
 
Example #16
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results,
    Batch.Callback<R> callback) throws IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #17
Source File: OmidTransactionTable.java    From phoenix with Apache License 2.0 5 votes vote down vote up
@Override
public <R extends Message> void batchCoprocessorService(
        MethodDescriptor methodDescriptor, Message request,
        byte[] startKey, byte[] endKey, R responsePrototype,
        Callback<R> callback) throws ServiceException, Throwable {
    throw new UnsupportedOperationException();
}
 
Example #18
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> Object[] batchCallback(List<? extends Row> actions, Batch.Callback<R> callback) throws IOException,
  InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  return hTable.batchCallback(transactionalizeActions(actions), callback);
}
 
Example #19
Source File: TransactionAwareHTable.java    From phoenix-tephra with Apache License 2.0 5 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results, Batch.Callback<R> callback) throws
  IOException, InterruptedException {
  if (tx == null) {
    throw new IOException("Transaction not started");
  }
  hTable.batchCallback(transactionalizeActions(actions), results, callback);
}
 
Example #20
Source File: DelegateHTable.java    From phoenix with Apache License 2.0 5 votes vote down vote up
@Override
public <T extends Service, R> void coprocessorService(Class<T> service, byte[] startKey,
        byte[] endKey, Call<T, R> callable, Callback<R> callback) throws ServiceException,
        Throwable {
    delegate.coprocessorService(service, startKey, endKey, callable, callback);
    
}
 
Example #21
Source File: DelegateHTable.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public <R extends Message> void batchCoprocessorService(MethodDescriptor methodDescriptor,
        Message request, byte[] startKey, byte[] endKey, R responsePrototype,
        Callback<R> callback) throws ServiceException, Throwable {
    delegate.batchCoprocessorService(methodDescriptor, request, startKey, endKey, responsePrototype);
}
 
Example #22
Source File: RemoteHTable.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results,
    Batch.Callback<R> callback) throws IOException, InterruptedException {
  throw new IOException("batchCallback not supported");
}
 
Example #23
Source File: RemoteHTable.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
public <T extends Service, R> void coprocessorService(Class<T> service, byte[] startKey,
    byte[] endKey, Batch.Call<T, R> callable, Batch.Callback<R> callback)
    throws ServiceException, Throwable {
  throw new UnsupportedOperationException("coprocessorService not implemented");
}
 
Example #24
Source File: RemoteHTable.java    From hbase with Apache License 2.0 4 votes vote down vote up
@Override
public <R extends Message> void batchCoprocessorService(Descriptors.MethodDescriptor method,
    Message request, byte[] startKey, byte[] endKey, R responsePrototype, Callback<R> callback)
    throws ServiceException, Throwable {
  throw new UnsupportedOperationException("batchCoprocessorService not implemented");
}
 
Example #25
Source File: HTableMultiCluster.java    From HBase.MCC with Apache License 2.0 4 votes vote down vote up
public <R> void batchCallback(List<? extends Row> actions, Object[] results,
                              Callback<R> callback) throws IOException, InterruptedException {
  // TODO
}
 
Example #26
Source File: HTableMultiCluster.java    From HBase.MCC with Apache License 2.0 4 votes vote down vote up
public <R> Object[] batchCallback(List<? extends Row> actions,
                                  Callback<R> callback) throws IOException, InterruptedException {
  // TODO
  return null;
}
 
Example #27
Source File: HTableMultiCluster.java    From HBase.MCC with Apache License 2.0 4 votes vote down vote up
public <T extends Service, R> void coprocessorService(Class<T> service,
                                                      byte[] startKey, byte[] endKey,Call<T, R> callable, Callback<R> callback)
        throws ServiceException, Throwable {
  // TODO Auto-generated method stub
}
 
Example #28
Source File: HConnectionMultiCluster.java    From HBase.MCC with Apache License 2.0 4 votes vote down vote up
@Deprecated
public <R> void processBatchCallback(List<? extends Row> list,
    TableName tableName, ExecutorService pool, Object[] results,
    Callback<R> callback) throws IOException, InterruptedException {
  primaryConnection.processBatchCallback(list, tableName, pool, results, callback);
}
 
Example #29
Source File: DelegateHTable.java    From phoenix with Apache License 2.0 4 votes vote down vote up
@Override
public <R> void batchCallback(List<? extends Row> actions, Object[] results,
        Callback<R> callback) throws IOException, InterruptedException {
    delegate.batchCallback(actions, results, callback);
}
 
Example #30
Source File: MockHTable.java    From foxtrot with Apache License 2.0 4 votes vote down vote up
@Override
public <T extends Service, R> void coprocessorService(Class<T> service, byte[] startKey, byte[] endKey, Call<T, R> callable,
                                                      Callback<R> callback) throws ServiceException, Throwable {

}