HDFS-11305: libhdfs++: Log Datanode information when reading an HDFS block. Contributed by Xiaowei Zhu.
This commit is contained in:
parent
a30cf6a369
commit
69d55340f8
@ -225,6 +225,12 @@ void FileHandleImpl::AsyncPreadSome(
|
|||||||
|
|
||||||
DatanodeInfoProto &chosen_dn = *it;
|
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 offset_within_block = offset - block->offset();
|
||||||
uint64_t size_within_block = std::min<uint64_t>(
|
uint64_t size_within_block = std::min<uint64_t>(
|
||||||
block->b().numbytes() - offset_within_block, asio::buffer_size(buffers));
|
block->b().numbytes() - offset_within_block, asio::buffer_size(buffers));
|
||||||
|
Loading…
Reference in New Issue
Block a user