Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-445

pread() fails when cached block locations are no longer valid

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20-append
    • Fix Version/s: 0.20-append, 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      when cached block locations are no longer valid (e.g., datanodes restart on different ports), pread() will fail, whereas normal read() still succeeds through re-fetching of block locations from namenode (up to a max number of times).

      1. hdfs-445-0.20-append.txt
        8 kB
        Todd Lipcon
      2. HDFS-445-0_20.2.patch
        10 kB
        Jitendra Nath Pandey
      3. 445-08.patch
        9 kB
        Kan Zhang
      4. 445-06.patch
        7 kB
        Kan Zhang

        Activity

        Kan Zhang created issue -
        Kan Zhang made changes -
        Field Original Value New Value
        Attachment 445-06.patch [ 12411724 ]
        Kan Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Kan Zhang added a comment -

        the attached patch changed chooseDataNode() to return a new location from newly fetched list from namenode.

        Show
        Kan Zhang added a comment - the attached patch changed chooseDataNode() to return a new location from newly fetched list from namenode.
        Hide
        Kan Zhang added a comment -

        attaching a new patch, which added a line at the beginning of the while loop in fetchBlockByteRange() to always get the latest block locations from cache. Also, removed old fetchBlockAt() and renamed fetchAndCacheBlockAt() to fetchBlockAt(). Always cache block locations when fetching. Thank Raghu for comments and discussions.

        Show
        Kan Zhang added a comment - attaching a new patch, which added a line at the beginning of the while loop in fetchBlockByteRange() to always get the latest block locations from cache. Also, removed old fetchBlockAt() and renamed fetchAndCacheBlockAt() to fetchBlockAt(). Always cache block locations when fetching. Thank Raghu for comments and discussions.
        Kan Zhang made changes -
        Attachment 445-08.patch [ 12411956 ]
        Kan Zhang made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Kan Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12411956/445-08.patch
        against trunk revision 790733.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 6 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12411956/445-08.patch against trunk revision 790733. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 6 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/0/console This message is automatically generated.
        Hide
        Raghu Angadi added a comment -

        +1. This is an important fix for clients that keep a file open for a long time (like HBase).

        Show
        Raghu Angadi added a comment - +1. This is an important fix for clients that keep a file open for a long time (like HBase).
        Hide
        Raghu Angadi added a comment -

        I just committed this. Thanks Kan.

        Show
        Raghu Angadi added a comment - I just committed this. Thanks Kan.
        Raghu Angadi made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Fix Version/s 0.21.0 [ 12314046 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #23 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/23/)
        . pread() does not pick up changes to block locations. (Kan Zhang via rangadi)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #23 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/23/ ) . pread() does not pick up changes to block locations. (Kan Zhang via rangadi)
        Hide
        Jitendra Nath Pandey added a comment -

        Patch for Hadoop 20 added.

        Show
        Jitendra Nath Pandey added a comment - Patch for Hadoop 20 added.
        Jitendra Nath Pandey made changes -
        Attachment HDFS-445-0_20.2.patch [ 12428885 ]
        Hide
        Nicolas Spiegelberg added a comment -

        Issue appeared during HBase testing. This should be pulled into the branch-0.20-append branch.

        Show
        Nicolas Spiegelberg added a comment - Issue appeared during HBase testing. This should be pulled into the branch-0.20-append branch.
        Nicolas Spiegelberg made changes -
        Affects Version/s 0.20-append [ 12315103 ]
        Hide
        Todd Lipcon added a comment -

        Here's a patch against the current 0.20-append branch (probably about the same as Jitendra's)

        Show
        Todd Lipcon added a comment - Here's a patch against the current 0.20-append branch (probably about the same as Jitendra's)
        Todd Lipcon made changes -
        Attachment hdfs-445-0.20-append.txt [ 12446921 ]
        dhruba borthakur made changes -
        Fix Version/s 0.20-append [ 12315103 ]
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        7d 20h 51m 1 Kan Zhang 02/Jul/09 21:37
        Open Open Patch Available Patch Available
        1h 21m 2 Kan Zhang 02/Jul/09 21:37
        Patch Available Patch Available Resolved Resolved
        11d 23h 40m 1 Raghu Angadi 14/Jul/09 21:18
        Resolved Resolved Closed Closed
        406d 29m 1 Tom White 24/Aug/10 21:48

          People

          • Assignee:
            Kan Zhang
            Reporter:
            Kan Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development