HDFSArchiver.java 文件源码

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

项目:hdfs-archiver 作者:
private boolean isDumpToLocal(GridFSFile file, GridFS fs){
    long limit = 0; 
    if(this.sizeToLocal.containsKey(fs.getDB().getName())){
        limit = this.sizeToLocal.get(fs.getDB().getName());
    }else {
        limit = this.sizeToLocal.get("default");
    }
    if(file == null && limit == 0){
        return true;
    }else if(file != null){
        log.debug("Check db limit, file size:" + file.getLength() + ", db:" + limit);
        return file.getLength() > limit;
    }else {
        return false;
    }       
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号