Utils.java 文件源码

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

项目:fst-bench 作者:
public static final IndexedMapFile getSharedMapFile(String symbol, JobConf job) throws IOException {

    int slots = job.getInt(symbol, 0);

    if (slots <=0) {
        log.error("slots number should be no less than 1 !!!");
        System.exit(-1);
    }

    FileSystem fs = FileSystem.getLocal(job);
    MapFile.Reader[] readers = new MapFile.Reader[slots];
    for (int i=0; i<slots; i++) {
        String symbfile = fs.getWorkingDirectory().toString() + "/" + symbol + "-" + Integer.toString(i);
        readers[i] = new MapFile.Reader(fs, symbfile, job);
    }

    return new IndexedMapFile(slots, readers);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号