Java 类org.apache.hadoop.hbase.protobuf.generated.MasterProtos.EnableTableResponse 实例源码

项目:ditb    文件:HBaseAdmin.java   
/**
 * Enable the table but does not block and wait for it be completely enabled.
 * You can use Future.get(long, TimeUnit) to wait on the operation to complete.
 * It may throw ExecutionException if there was an error while executing the operation
 * or TimeoutException in case the wait timeout was not long enough to allow the
 * operation to complete.
 *
 * @param tableName name of table to delete
 * @throws IOException if a remote or network exception occurs
 * @return the result of the async enable. You can use Future.get(long, TimeUnit)
 *    to wait on the operation to complete.
 */
// TODO: This should be called Async but it will break binary compatibility
private Future<Void> enableTableAsyncV2(final TableName tableName) throws IOException {
  TableName.isLegalFullyQualifiedTableName(tableName.getName());
  EnableTableResponse response = executeCallable(
    new MasterCallable<EnableTableResponse>(getConnection()) {
      @Override
      public EnableTableResponse call(int callTimeout) throws ServiceException {
        PayloadCarryingRpcController controller = rpcControllerFactory.newController();
        controller.setCallTimeout(callTimeout);
        controller.setPriority(tableName);

        LOG.info("Started enable of " + tableName);
        EnableTableRequest req =
            RequestConverter.buildEnableTableRequest(tableName, ng.getNonceGroup(),ng.newNonce());
        return master.enableTable(controller,req);
      }
    });
  return new EnableTableFuture(this, tableName, response);
}
项目:ditb    文件:MasterRpcServices.java   
@Override
public EnableTableResponse enableTable(RpcController controller,
    EnableTableRequest request) throws ServiceException {
  try {
    long procId = master.enableTable(
      ProtobufUtil.toTableName(request.getTableName()),
      request.getNonceGroup(),
      request.getNonce());
    return EnableTableResponse.newBuilder().setProcId(procId).build();
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
}
项目:pbase    文件:MasterRpcServices.java   
@Override
public EnableTableResponse enableTable(RpcController controller,
    EnableTableRequest request) throws ServiceException {
  try {
    master.enableTable(ProtobufUtil.toTableName(request.getTableName()));
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return EnableTableResponse.newBuilder().build();
}
项目:HIndex    文件:HMaster.java   
@Override
public EnableTableResponse enableTable(RpcController controller, EnableTableRequest request)
throws ServiceException {
  try {
    enableTable(ProtobufUtil.toTableName(request.getTableName()));
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return EnableTableResponse.newBuilder().build();
}
项目:PyroDB    文件:MasterRpcServices.java   
@Override
public EnableTableResponse enableTable(RpcController controller,
    EnableTableRequest request) throws ServiceException {
  try {
    master.enableTable(ProtobufUtil.toTableName(request.getTableName()));
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return EnableTableResponse.newBuilder().build();
}
项目:c5    文件:HMaster.java   
@Override
public EnableTableResponse enableTable(RpcController controller, EnableTableRequest request)
throws ServiceException {
  try {
    enableTable(ProtobufUtil.toTableName(request.getTableName()));
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return EnableTableResponse.newBuilder().build();
}
项目:ditb    文件:HBaseAdmin.java   
public EnableTableFuture(final HBaseAdmin admin, final TableName tableName,
    final EnableTableResponse response) {
  super(admin, (response != null && response.hasProcId()) ? response.getProcId() : null);
  this.tableName = tableName;
}