Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6345

Refactor Trash::moveToTrash() and its accompanying poor tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.20.1
    • None
    • fs
    • None
    • Incompatible change
    • Changes moveToTrash to only return false when trash is disabled; all other errors result in IOException. Added functional unit tests for moveToTrash() to cover major exit paaths.

    Description

      We've had several issues relating to the Trash and its access via the shell, none of which were picked up by the unit tests. The current moveToTrash method has 8 different ways it can terminate and sometimes uses a false value and sometimes uses an exception to indicate failure. This method should be refactored to improve readability and testability, and new tests written to exercise all possible code paths.

      Attachments

        1. HADOOP-6345.patch
          9 kB
          Matt Ahrens
        2. HADOOP-6345.2.patch
          9 kB
          Matt Ahrens

        Issue Links

          Activity

            People

              mahrens Matt Ahrens
              jghoman Jakob Homan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: