HDFS-15080. Fix the issue in reading persistent memory cached data with an offset. Contributed by Feilong He.

This commit is contained in:
Rakesh Radhakrishnan 2020-01-08 14:25:17 +05:30
parent aba3f6c3e1
commit 7030722e5d

View File

@ -822,7 +822,7 @@ private InputStream getBlockInputStreamWithCheckingPmemCache(
if (addr != -1) {
LOG.debug("Get InputStream by cache address.");
return FsDatasetUtil.getDirectInputStream(
addr, info.getBlockDataLength());
addr + seekOffset, info.getBlockDataLength() - seekOffset);
}
LOG.debug("Get InputStream by cache file path.");
return FsDatasetUtil.getInputStreamAndSeek(