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

项目:ditb    文件:RSRpcServices.java   
@Override
@QosPriority(priority=HConstants.ADMIN_QOS)
public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
    final GetOnlineRegionRequest request) throws ServiceException {
  try {
    checkOpen();
    requestCount.increment();
    Map<String, Region> onlineRegions = regionServer.onlineRegions;
    List<HRegionInfo> list = new ArrayList<HRegionInfo>(onlineRegions.size());
    for (Region region: onlineRegions.values()) {
      list.add(region.getRegionInfo());
    }
    Collections.sort(list);
    return ResponseConverter.buildGetOnlineRegionResponse(list);
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:pbase    文件:RSRpcServices.java   
@Override
@QosPriority(priority = HConstants.ADMIN_QOS)
public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
                                               final GetOnlineRegionRequest request) throws ServiceException {
    try {
        checkOpen();
        requestCount.increment();
        Map<String, HRegion> onlineRegions = regionServer.onlineRegions;
        List<HRegionInfo> list = new ArrayList<HRegionInfo>(onlineRegions.size());
        for (HRegion region : onlineRegions.values()) {
            list.add(region.getRegionInfo());
        }
        Collections.sort(list);
        return ResponseConverter.buildGetOnlineRegionResponse(list);
    } catch (IOException ie) {
        throw new ServiceException(ie);
    }
}
项目:HIndex    文件:HRegionServer.java   
@Override
@QosPriority(priority=HConstants.HIGH_QOS)
public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
    final GetOnlineRegionRequest request) throws ServiceException {
  try {
    checkOpen();
    requestCount.increment();
    List<HRegionInfo> list = new ArrayList<HRegionInfo>(onlineRegions.size());
    for (HRegion region: this.onlineRegions.values()) {
      list.add(region.getRegionInfo());
    }
    Collections.sort(list);
    return ResponseConverter.buildGetOnlineRegionResponse(list);
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:PyroDB    文件:RSRpcServices.java   
@Override
@QosPriority(priority=HConstants.HIGH_QOS)
public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
    final GetOnlineRegionRequest request) throws ServiceException {
  try {
    checkOpen();
    requestCount.increment();
    Map<String, HRegion> onlineRegions = regionServer.onlineRegions;
    List<HRegionInfo> list = new ArrayList<HRegionInfo>(onlineRegions.size());
    for (HRegion region: onlineRegions.values()) {
      list.add(region.getRegionInfo());
    }
    Collections.sort(list);
    return ResponseConverter.buildGetOnlineRegionResponse(list);
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:c5    文件:HRegionServer.java   
@Override
@QosPriority(priority=HConstants.HIGH_QOS)
public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
    final GetOnlineRegionRequest request) throws ServiceException {
  try {
    checkOpen();
    requestCount.increment();
    List<HRegionInfo> list = new ArrayList<HRegionInfo>(onlineRegions.size());
    for (HRegion region: this.onlineRegions.values()) {
      list.add(region.getRegionInfo());
    }
    Collections.sort(list);
    return ResponseConverter.buildGetOnlineRegionResponse(list);
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:DominoHBase    文件:HRegionServer.java   
@Override
@QosPriority(priority=HConstants.HIGH_QOS)
public GetOnlineRegionResponse getOnlineRegion(final RpcController controller,
    final GetOnlineRegionRequest request) throws ServiceException {
  try {
    checkOpen();
    requestCount.increment();
    List<HRegionInfo> list = new ArrayList<HRegionInfo>(onlineRegions.size());
    for (HRegion region: this.onlineRegions.values()) {
      list.add(region.getRegionInfo());
    }
    Collections.sort(list);
    return ResponseConverter.buildGetOnlineRegionResponse(list);
  } catch (IOException ie) {
    throw new ServiceException(ie);
  }
}
项目:ditb    文件:ResponseConverter.java   
/**
 * A utility to build a GetOnlineRegionResponse.
 *
 * @param regions
 * @return the response
 */
public static GetOnlineRegionResponse buildGetOnlineRegionResponse(
    final List<HRegionInfo> regions) {
  GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
  for (HRegionInfo region: regions) {
    builder.addRegionInfo(HRegionInfo.convert(region));
  }
  return builder.build();
}
项目:ditb    文件:ProtobufUtil.java   
/**
 * A helper to get the all the online regions on a region
 * server using admin protocol.
 * @return a list of online region info
 */
public static List<HRegionInfo> getOnlineRegions(final RpcController controller,
    final AdminService.BlockingInterface admin)
throws IOException {
  GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
  GetOnlineRegionResponse response = null;
  try {
    response = admin.getOnlineRegion(controller, request);
  } catch (ServiceException se) {
    throw getRemoteException(se);
  }
  return getRegionInfos(response);
}
项目:ditb    文件:ProtobufUtil.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info or null if <code>proto</code> is null
 */
static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null) return null;
  List<HRegionInfo> regionInfos = new ArrayList<HRegionInfo>();
  for (RegionInfo regionInfo: proto.getRegionInfoList()) {
    regionInfos.add(HRegionInfo.convert(regionInfo));
  }
  return regionInfos;
}
项目:pbase    文件:ResponseConverter.java   
/**
 * A utility to build a GetOnlineRegionResponse.
 *
 * @param regions
 * @return the response
 */
public static GetOnlineRegionResponse buildGetOnlineRegionResponse(
    final List<HRegionInfo> regions) {
  GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
  for (HRegionInfo region: regions) {
    builder.addRegionInfo(HRegionInfo.convert(region));
  }
  return builder.build();
}
项目:pbase    文件:ProtobufUtil.java   
/**
 * A helper to get the all the online regions on a region
 * server using admin protocol.
 *
 * @param admin
 * @return a list of online region info
 * @throws IOException
 */
public static List<HRegionInfo> getOnlineRegions(final AdminService.BlockingInterface admin)
throws IOException {
  GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
  GetOnlineRegionResponse response = null;
  try {
    response = admin.getOnlineRegion(null, request);
  } catch (ServiceException se) {
    throw getRemoteException(se);
  }
  return getRegionInfos(response);
}
项目:pbase    文件:ProtobufUtil.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info or null if <code>proto</code> is null
 */
static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null) return null;
  List<HRegionInfo> regionInfos = new ArrayList<HRegionInfo>();
  for (RegionInfo regionInfo: proto.getRegionInfoList()) {
    regionInfos.add(HRegionInfo.convert(regionInfo));
  }
  return regionInfos;
}
项目:HIndex    文件:ResponseConverter.java   
/**
 * A utility to build a GetOnlineRegionResponse.
 *
 * @param regions
 * @return the response
 */
public static GetOnlineRegionResponse buildGetOnlineRegionResponse(
    final List<HRegionInfo> regions) {
  GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
  for (HRegionInfo region: regions) {
    builder.addRegionInfo(HRegionInfo.convert(region));
  }
  return builder.build();
}
项目:HIndex    文件:ProtobufUtil.java   
/**
 * A helper to get the all the online regions on a region
 * server using admin protocol.
 *
 * @param admin
 * @return a list of online region info
 * @throws IOException
 */
public static List<HRegionInfo> getOnlineRegions(final AdminService.BlockingInterface admin)
throws IOException {
  GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
  GetOnlineRegionResponse response = null;
  try {
    response = admin.getOnlineRegion(null, request);
  } catch (ServiceException se) {
    throw getRemoteException(se);
  }
  return getRegionInfos(response);
}
项目:HIndex    文件:ProtobufUtil.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info or null if <code>proto</code> is null
 */
static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null) return null;
  List<HRegionInfo> regionInfos = new ArrayList<HRegionInfo>();
  for (RegionInfo regionInfo: proto.getRegionInfoList()) {
    regionInfos.add(HRegionInfo.convert(regionInfo));
  }
  return regionInfos;
}
项目:PyroDB    文件:ResponseConverter.java   
/**
 * A utility to build a GetOnlineRegionResponse.
 *
 * @param regions
 * @return the response
 */
public static GetOnlineRegionResponse buildGetOnlineRegionResponse(
    final List<HRegionInfo> regions) {
  GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
  for (HRegionInfo region: regions) {
    builder.addRegionInfo(HRegionInfo.convert(region));
  }
  return builder.build();
}
项目:PyroDB    文件:ProtobufUtil.java   
/**
 * A helper to get the all the online regions on a region
 * server using admin protocol.
 *
 * @param admin
 * @return a list of online region info
 * @throws IOException
 */
public static List<HRegionInfo> getOnlineRegions(final AdminService.BlockingInterface admin)
throws IOException {
  GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
  GetOnlineRegionResponse response = null;
  try {
    response = admin.getOnlineRegion(null, request);
  } catch (ServiceException se) {
    throw getRemoteException(se);
  }
  return getRegionInfos(response);
}
项目:PyroDB    文件:ProtobufUtil.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info or null if <code>proto</code> is null
 */
static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null) return null;
  List<HRegionInfo> regionInfos = new ArrayList<HRegionInfo>();
  for (RegionInfo regionInfo: proto.getRegionInfoList()) {
    regionInfos.add(HRegionInfo.convert(regionInfo));
  }
  return regionInfos;
}
项目:c5    文件:ResponseConverter.java   
/**
 * A utility to build a GetOnlineRegionResponse.
 *
 * @param regions
 * @return the response
 */
public static GetOnlineRegionResponse buildGetOnlineRegionResponse(
    final List<HRegionInfo> regions) {
  GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
  for (HRegionInfo region: regions) {
    builder.addRegionInfo(HRegionInfo.convert(region));
  }
  return builder.build();
}
项目:c5    文件:ProtobufUtil.java   
/**
 * A helper to get the all the online regions on a region
 * server using admin protocol.
 *
 * @param admin
 * @return a list of online region info
 * @throws IOException
 */
public static List<HRegionInfo> getOnlineRegions(final AdminService.BlockingInterface admin)
throws IOException {
  GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
  GetOnlineRegionResponse response = null;
  try {
    response = admin.getOnlineRegion(null, request);
  } catch (ServiceException se) {
    throw getRemoteException(se);
  }
  return getRegionInfos(response);
}
项目:c5    文件:ProtobufUtil.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info or null if <code>proto</code> is null
 */
static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null) return null;
  List<HRegionInfo> regionInfos = new ArrayList<HRegionInfo>();
  for (RegionInfo regionInfo: proto.getRegionInfoList()) {
    regionInfos.add(HRegionInfo.convert(regionInfo));
  }
  return regionInfos;
}
项目:DominoHBase    文件:ResponseConverter.java   
/**
 * A utility to build a GetOnlineRegionResponse.
 *
 * @param regions
 * @return the response
 */
public static GetOnlineRegionResponse buildGetOnlineRegionResponse(
    final List<HRegionInfo> regions) {
  GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder();
  for (HRegionInfo region: regions) {
    builder.addRegionInfo(HRegionInfo.convert(region));
  }
  return builder.build();
}
项目:DominoHBase    文件:ProtobufUtil.java   
/**
 * A helper to get the all the online regions on a region
 * server using admin protocol.
 *
 * @param admin
 * @return a list of online region info
 * @throws IOException
 */
public static List<HRegionInfo> getOnlineRegions(final AdminProtocol admin) throws IOException {
  GetOnlineRegionRequest request = RequestConverter.buildGetOnlineRegionRequest();
  GetOnlineRegionResponse response = null;
  try {
    response = admin.getOnlineRegion(null, request);
  } catch (ServiceException se) {
    throw getRemoteException(se);
  }
  return getRegionInfos(response);
}
项目:DominoHBase    文件:ProtobufUtil.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info or null if <code>proto</code> is null
 */
static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null) return null;
  List<HRegionInfo> regionInfos = new ArrayList<HRegionInfo>();
  for (RegionInfo regionInfo: proto.getRegionInfoList()) {
    regionInfos.add(HRegionInfo.convert(regionInfo));
  }
  return regionInfos;
}
项目:ditb    文件:MockRegionServer.java   
@Override
public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
    GetOnlineRegionRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:pbase    文件:MockRegionServer.java   
@Override
public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
    GetOnlineRegionRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:HIndex    文件:MockRegionServer.java   
@Override
public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
    GetOnlineRegionRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:PyroDB    文件:MockRegionServer.java   
@Override
public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
    GetOnlineRegionRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:c5    文件:MockRegionServer.java   
@Override
public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
    GetOnlineRegionRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:DominoHBase    文件:MockRegionServer.java   
@Override
public GetOnlineRegionResponse getOnlineRegion(RpcController controller,
    GetOnlineRegionRequest request) throws ServiceException {
  // TODO Auto-generated method stub
  return null;
}
项目:ditb    文件:ResponseConverter.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info
 */
public static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null || proto.getRegionInfoCount() == 0) return null;
  return ProtobufUtil.getRegionInfos(proto);
}
项目:pbase    文件:ResponseConverter.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info
 */
public static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null || proto.getRegionInfoCount() == 0) return null;
  return ProtobufUtil.getRegionInfos(proto);
}
项目:HIndex    文件:ResponseConverter.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info
 */
public static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null || proto.getRegionInfoCount() == 0) return null;
  return ProtobufUtil.getRegionInfos(proto);
}
项目:PyroDB    文件:ResponseConverter.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info
 */
public static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null || proto.getRegionInfoCount() == 0) return null;
  return ProtobufUtil.getRegionInfos(proto);
}
项目:c5    文件:ResponseConverter.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info
 */
public static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null || proto.getRegionInfoCount() == 0) return null;
  return ProtobufUtil.getRegionInfos(proto);
}
项目:DominoHBase    文件:ResponseConverter.java   
/**
 * Get the list of region info from a GetOnlineRegionResponse
 *
 * @param proto the GetOnlineRegionResponse
 * @return the list of region info
 */
public static List<HRegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) {
  if (proto == null || proto.getRegionInfoCount() == 0) return null;
  return ProtobufUtil.getRegionInfos(proto);
}