hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject hadoop git commit: libhdfs++: File length doesn't always count the last block if it's being written to. Contributed by Xiaowei Zhu.
Date Mon, 18 Apr 2016 13:26:51 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-8707 082860052 -> d8653c8dc


libhdfs++: File length doesn't always count the last block if it's being written to. Contributed
by Xiaowei Zhu.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d8653c8d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d8653c8d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d8653c8d

Branch: refs/heads/HDFS-8707
Commit: d8653c8dc2ab9847d531cf48d1cd4dd6b005c3ff
Parents: 0828600
Author: James <jhc@apache.org>
Authored: Mon Apr 18 09:25:53 2016 -0400
Committer: James <jhc@apache.org>
Committed: Mon Apr 18 09:25:53 2016 -0400

----------------------------------------------------------------------
 .../src/main/native/libhdfspp/lib/fs/filesystem.cc                  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d8653c8d/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
index 569b479..8530ffa 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc
@@ -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);


Mime
View raw message