org.apache.hadoop.io.file.tfile.CompareUtils.ScalarComparator源码实例Demo

类org.apache.hadoop.io.file.tfile.CompareUtils.ScalarComparator源码实例Demo

下面列出了org.apache.hadoop.io.file.tfile.CompareUtils.ScalarComparator 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: 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;
}
 
源代码2 项目: 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;
}
 
源代码3 项目: attic-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;
}
 
源代码4 项目: 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;
}
 
源代码5 项目: 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;
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法