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 08:56:16 UTC

[hadoop] branch trunk 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 trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 7030722  HDFS-15080. Fix the issue in reading persistent memory cached data with an offset. Contributed by Feilong He.
7030722 is described below

commit 7030722e5d9f376245a9ab0a6a883538b6c55f82
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.
---
 .../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 f356949..0feb3b7 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
@@ -822,7 +822,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