synchronized void closeAll() throws IOException {
List<IOException> exceptions = new ArrayList<IOException>();
for(; !map.isEmpty(); ) {
Map.Entry<Key, FileSystem> e = map.entrySet().iterator().next();
final Key key = e.getKey();
final FileSystem fs = e.getValue();
//remove from cache
remove(key, fs);
if (fs != null) {
try {
fs.close();
}
catch(IOException ioe) {
exceptions.add(ioe);
}
}
}
if (!exceptions.isEmpty()) {
throw MultipleIOException.createIOException(exceptions);
}
}
FileSystem.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:hadoop-on-lustre
作者:
评论列表
文章目录