private static TIntIntMap readIntIntMap(URI[] files, Configuration conf, String token, int size) throws IOException {
TIntIntMap map = new TIntIntHashMap(size, Constants.DEFAULT_LOAD_FACTOR, -1, -1);
for (URI file : files) {
if (file.getPath().contains(token)) {
SequenceFile.Reader reader = new SequenceFile.Reader(conf, Reader.file(new Path(file)));
IntWritable key = new IntWritable();
IntWritable value = new IntWritable();
while (reader.next(key, value)) {
map.put(key.get(), value.get());
}
reader.close();
}
}
return map;
}
DistCache.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:TopPI
作者:
评论列表
文章目录