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


Java ResponseConverter.getResults方法代码示例

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


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

示例1: call

import org.apache.hadoop.hbase.protobuf.ResponseConverter; //导入方法依赖的package包/类
@Override
public Result[] call(int timeout) throws IOException {
  if (this.closed) return null;
  if (Thread.interrupted()) {
    throw new InterruptedIOException();
  }
  ScanRequest request = RequestConverter.buildScanRequest(getLocation()
      .getRegionInfo().getRegionName(), getScan(), getCaching(), true);
  ScanResponse response = null;
  PayloadCarryingRpcController controller = controllerFactory.newController();
  try {
    controller.setPriority(getTableName());
    controller.setCallTimeout(timeout);
    response = getStub().scan(controller, request);
    return ResponseConverter.getResults(controller.cellScanner(),
        response);
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:21,代码来源:ClientSmallScanner.java

示例2: getSmallScanCallable

import org.apache.hadoop.hbase.protobuf.ResponseConverter; //导入方法依赖的package包/类
static RegionServerCallable<Result[]> getSmallScanCallable(
    final Scan sc, HConnection connection, TableName table, byte[] localStartKey,
    final int cacheNum, final RpcControllerFactory rpcControllerFactory) throws IOException { 
  sc.setStartRow(localStartKey);
  RegionServerCallable<Result[]> callable = new RegionServerCallable<Result[]>(
      connection, table, sc.getStartRow()) {
    public Result[] call() throws IOException {
      ScanRequest request = RequestConverter.buildScanRequest(getLocation()
        .getRegionInfo().getRegionName(), sc, cacheNum, true);
      ScanResponse response = null;
      PayloadCarryingRpcController controller = rpcControllerFactory.newController();
      try {
        controller.setPriority(getTableName());
        response = getStub().scan(controller, request);
        return ResponseConverter.getResults(controller.cellScanner(),
            response);
      } catch (ServiceException se) {
        throw ProtobufUtil.getRemoteException(se);
      }
    }
  };
  return callable;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:24,代码来源:ClientSmallScanner.java

示例3: getSmallScanCallable

import org.apache.hadoop.hbase.protobuf.ResponseConverter; //导入方法依赖的package包/类
static RegionServerCallable<Result[]> getSmallScanCallable(
    final Scan sc, HConnection connection, TableName table,
    byte[] localStartKey, final int cacheNum, final RpcControllerFactory rpcControllerFactory) {
  sc.setStartRow(localStartKey);
  RegionServerCallable<Result[]> callable = new RegionServerCallable<Result[]>(
      connection, table, sc.getStartRow()) {
    public Result[] call(int callTimeout) throws IOException {
      ScanRequest request = RequestConverter.buildScanRequest(getLocation()
          .getRegionInfo().getRegionName(), sc, cacheNum, true);
      PayloadCarryingRpcController controller = rpcControllerFactory.newController();
      controller.setPriority(getTableName());
      controller.setCallTimeout(callTimeout);
      try {
        ScanResponse response = getStub().scan(controller, request);
        return ResponseConverter.getResults(controller.cellScanner(), response);
      } catch (ServiceException se) {
        throw ProtobufUtil.getRemoteException(se);
      }
    }
  };
  return callable;
}
 
开发者ID:shenli-uiuc,项目名称:PyroDB,代码行数:23,代码来源:ClientSmallScanner.java

示例4: getSmallScanCallable

import org.apache.hadoop.hbase.protobuf.ResponseConverter; //导入方法依赖的package包/类
private RegionServerCallable<Result[]> getSmallScanCallable(
    byte[] localStartKey, final int cacheNum) {
  this.scan.setStartRow(localStartKey);
  RegionServerCallable<Result[]> callable = new RegionServerCallable<Result[]>(
      getConnection(), getTable(), scan.getStartRow()) {
    public Result[] call() throws IOException {
      ScanRequest request = RequestConverter.buildScanRequest(getLocation()
          .getRegionInfo().getRegionName(), scan, cacheNum, true);
      ScanResponse response = null;
      PayloadCarryingRpcController controller = new PayloadCarryingRpcController();
      try {
        controller.setPriority(getTableName());
        response = getStub().scan(controller, request);
        return ResponseConverter.getResults(controller.cellScanner(),
            response);
      } catch (ServiceException se) {
        throw ProtobufUtil.getRemoteException(se);
      }
    }
  };
  return callable;
}
 
开发者ID:cloud-software-foundation,项目名称:c5,代码行数:23,代码来源:ClientSmallScanner.java

示例5: call

import org.apache.hadoop.hbase.protobuf.ResponseConverter; //导入方法依赖的package包/类
@Override
public Result[] call(int timeout) throws IOException {
  if (this.closed) return null;
  if (Thread.interrupted()) {
    throw new InterruptedIOException();
  }
  ScanRequest request = RequestConverter.buildScanRequest(getLocation()
      .getRegionInfo().getRegionName(), getScan(), getCaching(), true);
  ScanResponse response = null;
  controller = controllerFactory.newController();
  try {
    controller.setPriority(getTableName());
    controller.setCallTimeout(timeout);
    response = getStub().scan(controller, request);
    Result[] results = ResponseConverter.getResults(controller.cellScanner(),
        response);
    if (response.hasMoreResultsInRegion()) {
      setHasMoreResultsContext(true);
      setServerHasMoreResults(response.getMoreResultsInRegion());
    } else {
      setHasMoreResultsContext(false);
    }
    // We need to update result metrics since we are overriding call()
    updateResultsMetrics(results);
    return results;
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:30,代码来源:ClientSmallScanner.java


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