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 ra...@apache.org on 2020/01/08 09:03:23 UTC
[hadoop] branch branch-3.1 updated: HDFS-15080. Fix the issue in
reading persistent memory cached data with an offset. Contributed by
Feilong He.
This is an automated email from the ASF dual-hosted git repository.
rakeshr pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new b1eb478 HDFS-15080. Fix the issue in reading persistent memory cached data with an offset. Contributed by Feilong He.
b1eb478 is described below
commit b1eb47865c7ec9796f966c7b134758bf456d0d84
Author: Rakesh Radhakrishnan <ra...@apache.org>
AuthorDate: Wed Jan 8 14:25:17 2020 +0530
HDFS-15080. Fix the issue in reading persistent memory cached data with an offset. Contributed by Feilong He.
(cherry picked from commit 7030722e5d9f376245a9ab0a6a883538b6c55f82)
---
.../hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
index faf0935..1ce2910 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
@@ -821,7 +821,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
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(
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org