Details

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

      Description

      In FSDirectory, quite a few methods are unnecessary declared with "throws IOException". In some cases, it can just be removed without causing any compilation problem. In some other cases, it can be replaced with a specific subclass like QuotaExceededException.

      1. 4985_20090106.patch
        9 kB
        Tsz Wo Nicholas Sze
      2. 4985_20090107.patch
        7 kB
        Tsz Wo Nicholas Sze
      3. 4985_20090109.patch
        11 kB
        Tsz Wo Nicholas Sze

        Issue Links

          Activity

          Hide
          Tsz Wo Nicholas Sze added a comment -

          4985_20090106.patch: remove unnecessary "throws IOException"

          Show
          Tsz Wo Nicholas Sze added a comment - 4985_20090106.patch: remove unnecessary "throws IOException"
          Hide
          Tsz Wo Nicholas Sze added a comment -

          4985_20090107.patch: reverted the changes of try-catch, which need more thought.

          Show
          Tsz Wo Nicholas Sze added a comment - 4985_20090107.patch: reverted the changes of try-catch, which need more thought.
          Hide
          Konstantin Shvachko added a comment -
          • FSDirectory empty line change.
          • Javadoc for FSDirectory.setReplication() should not remove @throws IOException but rather replace it with @throws QuotaExceededException
          • FileNotFoundException("Unknown file: " ...) should be FileNotFoundException("File does not exist: " ...)
            I once tried to unify this in the code, but it's now back with all different messages.
          • Additionally we can remove IOException in
            FSEditLog.close()
            FSEditLog.existsNew()
            FSEditLog.logOpenFile()
            FSEditLog.getFsEditName()
            and then
            FSDirectory.persistBlocks()
            FSDirectory.closeFile()
            FSDirectory.setTimes()
            and then
            FSNamesystem.getBlockLocationsInternal()
          Show
          Konstantin Shvachko added a comment - FSDirectory empty line change. Javadoc for FSDirectory.setReplication() should not remove @throws IOException but rather replace it with @throws QuotaExceededException FileNotFoundException("Unknown file: " ...) should be FileNotFoundException("File does not exist: " ...) I once tried to unify this in the code, but it's now back with all different messages. Additionally we can remove IOException in FSEditLog.close() FSEditLog.existsNew() FSEditLog.logOpenFile() FSEditLog.getFsEditName() and then FSDirectory.persistBlocks() FSDirectory.closeFile() FSDirectory.setTimes() and then FSNamesystem.getBlockLocationsInternal()
          Hide
          Tsz Wo Nicholas Sze added a comment -

          4985_20090109.patch: incorporated Konstantin's comments.

          Show
          Tsz Wo Nicholas Sze added a comment - 4985_20090109.patch: incorporated Konstantin's comments.
          Hide
          Konstantin Shvachko added a comment -

          +1. This looks good.

          Show
          Konstantin Shvachko added a comment - +1. This looks good.
          Hide
          Tsz Wo Nicholas Sze added a comment -
               [exec] -1 overall.  
               [exec] 
               [exec]     +1 @author.  The patch does not contain any @author tags.
               [exec] 
               [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
               [exec]                         Please justify why no tests are needed for this patch.
               [exec] 
               [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
               [exec] 
               [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
               [exec] 
               [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
               [exec] 
               [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
          

          No new tests added since there are only declaration changes but no code logic change.

          Show
          Tsz Wo Nicholas Sze added a comment - [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no tests are needed for this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. No new tests added since there are only declaration changes but no code logic change.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Tested locally. All tests Passed except HADOOP-4907: TestMapReduceLocal.

          Show
          Tsz Wo Nicholas Sze added a comment - Tested locally. All tests Passed except HADOOP-4907 : TestMapReduceLocal.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          I just committed this.

          Show
          Tsz Wo Nicholas Sze added a comment - I just committed this.

            People

            • Assignee:
              Tsz Wo Nicholas Sze
              Reporter:
              Tsz Wo Nicholas Sze
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development