Java 类org.apache.hadoop.io.file.tfile.CompareUtils.ScalarLong 实例源码

项目:hadoop-oss    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:aliyun-oss-hadoop-fs    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:big-c    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-EAR    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:apex-malhar    文件:DTBCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 *
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-plus    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hops    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-TCP    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-on-lustre    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hardfs    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-on-lustre2    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:RDFS    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-0.20    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hortonworks-extension    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hortonworks-extension    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}
项目:hadoop-gpu    文件:BCFile.java   
/**
 * Find the smallest Block index whose starting offset is greater than or
 * equal to the specified offset.
 * 
 * @param offset
 *          User-specific offset.
 * @return the index to the data Block if such block exists; or -1
 *         otherwise.
 */
public int getBlockIndexNear(long offset) {
  ArrayList<BlockRegion> list = dataIndex.getBlockRegionList();
  int idx =
      Utils
          .lowerBound(list, new ScalarLong(offset), new ScalarComparator());

  if (idx == list.size()) {
    return -1;
  }

  return idx;
}