libhdfs++: File length doesn't always count the last block if it's being written to. Contributed by Xiaowei Zhu.
This commit is contained in:
parent
60c3437267
commit
1cbfd6f962
@ -104,6 +104,7 @@ void NameNodeOperations::GetBlockLocations(const std::string & path,
|
||||
|
||||
if (locations.has_lastblock() && locations.lastblock().b().numbytes()) {
|
||||
file_info->blocks_.push_back(locations.lastblock());
|
||||
file_info->file_length_ += locations.lastblock().b().numbytes();
|
||||
}
|
||||
|
||||
handler(stat, file_info);
|
||||
|
Loading…
Reference in New Issue
Block a user