Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1463

accessTime updates should not occur in safeMode

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      FSNamesystem.getBlockLocations sometimes need to update the accessTime of files. If the namenode is in safemode, this call should fail.

      1. accessTimeSafeMode.txt
        0.7 kB
        dhruba borthakur
      2. accessTimeSafeMode.txt
        0.7 kB
        dhruba borthakur

        Activity

        Hide
        dhruba borthakur added a comment -

        If safemode is on, then setting access time on a file will throw an exception.

        Show
        dhruba borthakur added a comment - If safemode is on, then setting access time on a file will throw an exception.
        Hide
        Hairong Kuang added a comment -

        +1. This looks good!

        Show
        Hairong Kuang added a comment - +1. This looks good!
        Hide
        dhruba borthakur added a comment -

        This could be problematic because SafeMode implies readonly mode, but this patch could make readers fail if it needed to update accessTime fo a file. I would prefer to skip updating accesstime of a file if the namenode is in SafeMode.

        Show
        dhruba borthakur added a comment - This could be problematic because SafeMode implies readonly mode, but this patch could make readers fail if it needed to update accessTime fo a file. I would prefer to skip updating accesstime of a file if the namenode is in SafeMode.
        Hide
        dhruba borthakur added a comment -

        Merged patch with latest trunk. Ignore updating accesstime in getBlockLocations if the namenode is in safemode.

        Show
        dhruba borthakur added a comment - Merged patch with latest trunk. Ignore updating accesstime in getBlockLocations if the namenode is in safemode.
        Hide
        Hairong Kuang added a comment -

        +1. The new patch looks good to me.

        Show
        Hairong Kuang added a comment - +1. The new patch looks good to me.
        Hide
        dhruba borthakur added a comment -

        Trigger Hudson tests.

        Show
        dhruba borthakur added a comment - Trigger Hudson tests.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12467160/accessTimeSafeMode.txt
        against trunk revision 1055142.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +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 (version 1.3.9) warnings.

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

        -1 core tests. The patch failed these core unit tests:
        org.apache.hadoop.cli.TestHDFSCLI
        org.apache.hadoop.hdfs.server.datanode.TestBlockRecovery
        org.apache.hadoop.hdfs.server.namenode.TestStorageRestore

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

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/84//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/84//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/84//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/12467160/accessTimeSafeMode.txt against trunk revision 1055142. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +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 (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these core unit tests: org.apache.hadoop.cli.TestHDFSCLI org.apache.hadoop.hdfs.server.datanode.TestBlockRecovery org.apache.hadoop.hdfs.server.namenode.TestStorageRestore -1 contrib tests. The patch failed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/84//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/84//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/84//console This message is automatically generated.
        Hide
        dhruba borthakur added a comment -

        I committed this. The unit test failures are not related to this patch. Also, there is no need for a unit test because this is a one liner minor fix.

        Show
        dhruba borthakur added a comment - I committed this. The unit test failures are not related to this patch. Also, there is no need for a unit test because this is a one liner minor fix.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #643 (See https://builds.apache.org/hudson/job/Hadoop-Hdfs-trunk/643/)

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #643 (See https://builds.apache.org/hudson/job/Hadoop-Hdfs-trunk/643/ )

          People

          • Assignee:
            dhruba borthakur
            Reporter:
            dhruba borthakur
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development