HDFS-15080. Fix the issue in reading persistent memory cached data with an offset. Contributed by Feilong He.
This commit is contained in:
parent
aba3f6c3e1
commit
7030722e5d
|
@ -822,7 +822,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
|
||||||
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…
Reference in New Issue