SegmentHandler.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:GeoCrawler 作者:
/** Open the output generated by this format. */
private MapFile.Reader[] getReaders(String subDir) throws IOException {
  Path dir = new Path(segmentDir, subDir);
  FileSystem fs = dir.getFileSystem(conf);
  Path[] names = FileUtil.stat2Paths(fs.listStatus(dir,
      SegmentPathFilter.INSTANCE));

  // sort names, so that hash partitioning works
  Arrays.sort(names);

  MapFile.Reader[] parts = new MapFile.Reader[names.length];
  for (int i = 0; i < names.length; i++) {
    parts[i] = new MapFile.Reader(names[i], conf);
  }
  return parts;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号