You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by jh...@apache.org on 2017/01/10 16:26:33 UTC
hadoop git commit: HDFS-11305: libhdfs++: Log Datanode information
when reading an HDFS block. Contributed by Xiaowei Zhu.
Repository: hadoop
Updated Branches:
refs/heads/HDFS-8707 2ceec2b3c -> 02cef3e95
HDFS-11305: libhdfs++: Log Datanode information when reading an HDFS block. 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/02cef3e9
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/02cef3e9
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/02cef3e9
Branch: refs/heads/HDFS-8707
Commit: 02cef3e955aa531b26ab3f2bb07352a42d499014
Parents: 2ceec2b
Author: James <jh...@apache.org>
Authored: Tue Jan 10 11:25:56 2017 -0500
Committer: James <jh...@apache.org>
Committed: Tue Jan 10 11:25:56 2017 -0500
----------------------------------------------------------------------
.../src/main/native/libhdfspp/lib/fs/filehandle.cc | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/02cef3e9/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
index 03c517b..1f553a0 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filehandle.cc
@@ -225,6 +225,12 @@ void FileHandleImpl::AsyncPreadSome(
DatanodeInfoProto &chosen_dn = *it;
+ std::string dnIpAddr = chosen_dn.id().ipaddr();
+ std::string dnHostName = chosen_dn.id().hostname();
+ LOG_DEBUG(kFileHandle, << "FileHandleImpl::AsyncPreadSome("
+ << FMT_THIS_ADDR << "), ...) Datanode hostname=" << dnHostName << ", IP Address=" << dnIpAddr
+ << ", file path=\"" << path_ << "\", offset=" << offset);
+
uint64_t offset_within_block = offset - block->offset();
uint64_t size_within_block = std::min<uint64_t>(
block->b().numbytes() - offset_within_block, asio::buffer_size(buffers));
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org