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:
James 2016-04-18 09:25:53 -04:00 committed by James Clampffer
parent 60c3437267
commit 1cbfd6f962

View File

@ -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);