Java 类org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetStoreFileRequest 实例源码

项目:HIndex    文件:HRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(final RpcController controller,
    final GetStoreFileRequest request) throws ServiceException {
  try {
    checkOpen();
    HRegion region = getRegion(request.getRegion());
    requestCount.increment();
    Set<byte[]> columnFamilies;
    if (request.getFamilyCount() == 0) {
      columnFamilies = region.getStores().keySet();
    } else {
      columnFamilies = new TreeSet<byte[]>(Bytes.BYTES_RAWCOMPARATOR);
      for (ByteString cf: request.getFamilyList()) {
        columnFamilies.add(cf.toByteArray());
      }
    }
    int nCF = columnFamilies.size();
    List<String>  fileList = region.getStoreFileList(
      columnFamilies.toArray(new byte[nCF][]));
    GetStoreFileResponse.Builder builder = GetStoreFileResponse.newBuilder();
    builder.addAllStoreFile(fileList);
    return builder.build();
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:PyroDB    文件:RSRpcServices.java   
@Override
public GetStoreFileResponse getStoreFile(final RpcController controller,
    final GetStoreFileRequest request) throws ServiceException {
  try {
    checkOpen();
    HRegion region = getRegion(request.getRegion());
    requestCount.increment();
    Set<byte[]> columnFamilies;
    if (request.getFamilyCount() == 0) {
      columnFamilies = region.getStores().keySet();
    } else {
      columnFamilies = new TreeSet<byte[]>(Bytes.BYTES_RAWCOMPARATOR);
      for (ByteString cf: request.getFamilyList()) {
        columnFamilies.add(cf.toByteArray());
      }
    }
    int nCF = columnFamilies.size();
    List<String>  fileList = region.getStoreFileList(
      columnFamilies.toArray(new byte[nCF][]));
    GetStoreFileResponse.Builder builder = GetStoreFileResponse.newBuilder();
    builder.addAllStoreFile(fileList);
    return builder.build();
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:c5    文件:HRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(final RpcController controller,
    final GetStoreFileRequest request) throws ServiceException {
  try {
    HRegion region = getRegion(request.getRegion());
    requestCount.increment();
    Set<byte[]> columnFamilies;
    if (request.getFamilyCount() == 0) {
      columnFamilies = region.getStores().keySet();
    } else {
      columnFamilies = new TreeSet<byte[]>(Bytes.BYTES_RAWCOMPARATOR);
      for (ByteString cf: request.getFamilyList()) {
        columnFamilies.add(cf.toByteArray());
      }
    }
    int nCF = columnFamilies.size();
    List<String>  fileList = region.getStoreFileList(
      columnFamilies.toArray(new byte[nCF][]));
    GetStoreFileResponse.Builder builder = GetStoreFileResponse.newBuilder();
    builder.addAllStoreFile(fileList);
    return builder.build();
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:DominoHBase    文件:HRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(final RpcController controller,
    final GetStoreFileRequest request) throws ServiceException {
  try {
    HRegion region = getRegion(request.getRegion());
    requestCount.increment();
    Set<byte[]> columnFamilies;
    if (request.getFamilyCount() == 0) {
      columnFamilies = region.getStores().keySet();
    } else {
      columnFamilies = new HashSet<byte[]>();
      for (ByteString cf: request.getFamilyList()) {
        columnFamilies.add(cf.toByteArray());
      }
    }
    int nCF = columnFamilies.size();
    List<String>  fileList = region.getStoreFileList(
      columnFamilies.toArray(new byte[nCF][]));
    GetStoreFileResponse.Builder builder = GetStoreFileResponse.newBuilder();
    builder.addAllStoreFile(fileList);
    return builder.build();
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:ditb    文件:RSRpcServices.java   
@Override
@QosPriority(priority=HConstants.ADMIN_QOS)
public GetStoreFileResponse getStoreFile(final RpcController controller,
    final GetStoreFileRequest request) throws ServiceException {
  try {
    checkOpen();
    Region region = getRegion(request.getRegion());
    requestCount.increment();
    Set<byte[]> columnFamilies;
    if (request.getFamilyCount() == 0) {
      columnFamilies = region.getTableDesc().getFamiliesKeys();
    } else {
      columnFamilies = new TreeSet<byte[]>(Bytes.BYTES_RAWCOMPARATOR);
      for (ByteString cf: request.getFamilyList()) {
        columnFamilies.add(cf.toByteArray());
      }
    }
    int nCF = columnFamilies.size();
    List<String>  fileList = region.getStoreFileList(
      columnFamilies.toArray(new byte[nCF][]));
    GetStoreFileResponse.Builder builder = GetStoreFileResponse.newBuilder();
    builder.addAllStoreFile(fileList);
    return builder.build();
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:ditb    文件:RequestConverter.java   
/**
 * Create a protocol buffer GetStoreFileRequest for a given region name
 *
 * @param regionName the name of the region to get info
 * @param family the family to get store file list
 * @return a protocol buffer GetStoreFileRequest
 */
public static GetStoreFileRequest
    buildGetStoreFileRequest(final byte[] regionName, final byte[] family) {
  GetStoreFileRequest.Builder builder = GetStoreFileRequest.newBuilder();
  RegionSpecifier region = buildRegionSpecifier(
    RegionSpecifierType.REGION_NAME, regionName);
  builder.setRegion(region);
  builder.addFamily(ByteStringer.wrap(family));
  return builder.build();
}
项目:ditb    文件:ProtobufUtil.java   
/**
 * A helper to get the list of files of a column family
 * on a given region using admin protocol.
 *
 * @return the list of store files
 */
public static List<String> getStoreFiles(final RpcController controller,
    final AdminService.BlockingInterface admin, final byte[] regionName, final byte[] family)
throws IOException {
  GetStoreFileRequest request =
    RequestConverter.buildGetStoreFileRequest(regionName, family);
  try {
    GetStoreFileResponse response = admin.getStoreFile(controller, request);
    return response.getStoreFileList();
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
项目:pbase    文件:RSRpcServices.java   
@Override
@QosPriority(priority = HConstants.ADMIN_QOS)
public GetStoreFileResponse getStoreFile(final RpcController controller,
                                         final GetStoreFileRequest request) throws ServiceException {
    try {
        checkOpen();
        HRegion region = getRegion(request.getRegion());
        requestCount.increment();
        Set<byte[]> columnFamilies;
        if (request.getFamilyCount() == 0) {
            columnFamilies = region.getStores().keySet();
        } else {
            columnFamilies = new TreeSet<byte[]>(Bytes.BYTES_RAWCOMPARATOR);
            for (ByteString cf : request.getFamilyList()) {
                columnFamilies.add(cf.toByteArray());
            }
        }
        int nCF = columnFamilies.size();
        List<String> fileList = region.getStoreFileList(
                columnFamilies.toArray(new byte[nCF][]));
        GetStoreFileResponse.Builder builder = GetStoreFileResponse.newBuilder();
        builder.addAllStoreFile(fileList);
        return builder.build();
    } catch (IOException ie) {
        throw new ServiceException(ie);
    }
}
项目:pbase    文件:RequestConverter.java   
/**
 * Create a protocol buffer GetStoreFileRequest for a given region name
 *
 * @param regionName the name of the region to get info
 * @param family the family to get store file list
 * @return a protocol buffer GetStoreFileRequest
 */
public static GetStoreFileRequest
    buildGetStoreFileRequest(final byte[] regionName, final byte[] family) {
  GetStoreFileRequest.Builder builder = GetStoreFileRequest.newBuilder();
  RegionSpecifier region = buildRegionSpecifier(
    RegionSpecifierType.REGION_NAME, regionName);
  builder.setRegion(region);
  builder.addFamily(ByteStringer.wrap(family));
  return builder.build();
}
项目:pbase    文件:ProtobufUtil.java   
/**
 * A helper to get the list of files of a column family
 * on a given region using admin protocol.
 *
 * @param admin
 * @param regionName
 * @param family
 * @return the list of store files
 * @throws IOException
 */
public static List<String> getStoreFiles(final AdminService.BlockingInterface admin,
    final byte[] regionName, final byte[] family)
throws IOException {
  GetStoreFileRequest request =
    RequestConverter.buildGetStoreFileRequest(regionName, family);
  try {
    GetStoreFileResponse response = admin.getStoreFile(null, request);
    return response.getStoreFileList();
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
项目:HIndex    文件:RequestConverter.java   
/**
 * Create a protocol buffer GetStoreFileRequest for a given region name
 *
 * @param regionName the name of the region to get info
 * @param family the family to get store file list
 * @return a protocol buffer GetStoreFileRequest
 */
public static GetStoreFileRequest
    buildGetStoreFileRequest(final byte[] regionName, final byte[] family) {
  GetStoreFileRequest.Builder builder = GetStoreFileRequest.newBuilder();
  RegionSpecifier region = buildRegionSpecifier(
    RegionSpecifierType.REGION_NAME, regionName);
  builder.setRegion(region);
  builder.addFamily(HBaseZeroCopyByteString.wrap(family));
  return builder.build();
}
项目:HIndex    文件:ProtobufUtil.java   
/**
 * A helper to get the list of files of a column family
 * on a given region using admin protocol.
 *
 * @param admin
 * @param regionName
 * @param family
 * @return the list of store files
 * @throws IOException
 */
public static List<String> getStoreFiles(final AdminService.BlockingInterface admin,
    final byte[] regionName, final byte[] family)
throws IOException {
  GetStoreFileRequest request =
    RequestConverter.buildGetStoreFileRequest(regionName, family);
  try {
    GetStoreFileResponse response = admin.getStoreFile(null, request);
    return response.getStoreFileList();
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
项目:PyroDB    文件:RequestConverter.java   
/**
 * Create a protocol buffer GetStoreFileRequest for a given region name
 *
 * @param regionName the name of the region to get info
 * @param family the family to get store file list
 * @return a protocol buffer GetStoreFileRequest
 */
public static GetStoreFileRequest
    buildGetStoreFileRequest(final byte[] regionName, final byte[] family) {
  GetStoreFileRequest.Builder builder = GetStoreFileRequest.newBuilder();
  RegionSpecifier region = buildRegionSpecifier(
    RegionSpecifierType.REGION_NAME, regionName);
  builder.setRegion(region);
  builder.addFamily(HBaseZeroCopyByteString.wrap(family));
  return builder.build();
}
项目:PyroDB    文件:ProtobufUtil.java   
/**
 * A helper to get the list of files of a column family
 * on a given region using admin protocol.
 *
 * @param admin
 * @param regionName
 * @param family
 * @return the list of store files
 * @throws IOException
 */
public static List<String> getStoreFiles(final AdminService.BlockingInterface admin,
    final byte[] regionName, final byte[] family)
throws IOException {
  GetStoreFileRequest request =
    RequestConverter.buildGetStoreFileRequest(regionName, family);
  try {
    GetStoreFileResponse response = admin.getStoreFile(null, request);
    return response.getStoreFileList();
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
项目:c5    文件:RequestConverter.java   
/**
 * Create a protocol buffer GetStoreFileRequest for a given region name
 *
 * @param regionName the name of the region to get info
 * @param family the family to get store file list
 * @return a protocol buffer GetStoreFileRequest
 */
public static GetStoreFileRequest
    buildGetStoreFileRequest(final byte[] regionName, final byte[] family) {
  GetStoreFileRequest.Builder builder = GetStoreFileRequest.newBuilder();
  RegionSpecifier region = buildRegionSpecifier(
    RegionSpecifierType.REGION_NAME, regionName);
  builder.setRegion(region);
  builder.addFamily(ZeroCopyLiteralByteString.wrap(family));
  return builder.build();
}
项目:c5    文件:ProtobufUtil.java   
/**
 * A helper to get the list of files of a column family
 * on a given region using admin protocol.
 *
 * @param admin
 * @param regionName
 * @param family
 * @return the list of store files
 * @throws IOException
 */
public static List<String> getStoreFiles(final AdminService.BlockingInterface admin,
    final byte[] regionName, final byte[] family)
throws IOException {
  GetStoreFileRequest request =
    RequestConverter.buildGetStoreFileRequest(regionName, family);
  try {
    GetStoreFileResponse response = admin.getStoreFile(null, request);
    return response.getStoreFileList();
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
项目:DominoHBase    文件:RequestConverter.java   
/**
 * Create a protocol buffer GetStoreFileRequest for a given region name
 *
 * @param regionName the name of the region to get info
 * @param family the family to get store file list
 * @return a protocol buffer GetStoreFileRequest
 */
public static GetStoreFileRequest
    buildGetStoreFileRequest(final byte[] regionName, final byte[] family) {
  GetStoreFileRequest.Builder builder = GetStoreFileRequest.newBuilder();
  RegionSpecifier region = buildRegionSpecifier(
    RegionSpecifierType.REGION_NAME, regionName);
  builder.setRegion(region);
  builder.addFamily(ByteString.copyFrom(family));
  return builder.build();
}
项目:DominoHBase    文件:ProtobufUtil.java   
/**
 * A helper to get the list of files of a column family
 * on a given region using admin protocol.
 *
 * @param admin
 * @param regionName
 * @param family
 * @return the list of store files
 * @throws IOException
 */
public static List<String> getStoreFiles(final AdminProtocol admin,
    final byte[] regionName, final byte[] family) throws IOException {
  GetStoreFileRequest request =
    RequestConverter.buildGetStoreFileRequest(regionName, family);
  try {
    GetStoreFileResponse response = admin.getStoreFile(null, request);
    return response.getStoreFileList();
  } catch (ServiceException se) {
    throw ProtobufUtil.getRemoteException(se);
  }
}
项目:ditb    文件:MockRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(RpcController controller,
    GetStoreFileRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:pbase    文件:MockRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(RpcController controller,
    GetStoreFileRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:HIndex    文件:MockRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(RpcController controller,
    GetStoreFileRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:PyroDB    文件:MockRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(RpcController controller,
    GetStoreFileRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:c5    文件:MockRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(RpcController controller,
    GetStoreFileRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:DominoHBase    文件:MockRegionServer.java   
@Override
public GetStoreFileResponse getStoreFile(RpcController controller,
    GetStoreFileRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}