HDFS-15080. Fix the issue in reading persistent memory cached data with an offset. Contributed by Feilong He.
(cherry picked from commit 7030722e5d9f376245a9ab0a6a883538b6c55f82)
This commit is contained in:
parent
3e17b471b6
commit
d7f9a90e2c
@ -821,7 +821,7 @@ private InputStream getBlockInputStreamWithCheckingPmemCache(
|
|||||||
if (addr != -1) {
|
if (addr != -1) {
|
||||||
LOG.debug("Get InputStream by cache address.");
|
LOG.debug("Get InputStream by cache address.");
|
||||||
return FsDatasetUtil.getDirectInputStream(
|
return FsDatasetUtil.getDirectInputStream(
|
||||||
addr, info.getBlockDataLength());
|
addr + seekOffset, info.getBlockDataLength() - seekOffset);
|
||||||
}
|
}
|
||||||
LOG.debug("Get InputStream by cache file path.");
|
LOG.debug("Get InputStream by cache file path.");
|
||||||
return FsDatasetUtil.getInputStreamAndSeek(
|
return FsDatasetUtil.getInputStreamAndSeek(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user