Hadoop Common
  1. Hadoop Common
  2. HADOOP-1131

Add a closeAll() static method to FileSystem

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.1, 0.11.0, 0.11.1, 0.11.2, 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      The closeAll method should close all "cached" FileSystem (FileSystems present in the CACHE variable).

      This can be very usefull when an access to the HDFS is needed in a webapp : when the web application context is unloaded from the container, the application should only call the closeAll method to stop DFSClients (and especially the LeaseChecker thread ).

      1. HADOOP-1131-without-spurious-whitespace.diff
        0.8 kB
        Philippe Gassmann
      2. HADOOP-1131.diff
        1.0 kB
        Philippe Gassmann

        Activity

        Hide
        Philippe Gassmann added a comment -

        Also, as the HADOOP-1131 issue, calling the closeAll() method will prevent memory leak to appear when trying to unload the context of a webapp.

        Show
        Philippe Gassmann added a comment - Also, as the HADOOP-1131 issue, calling the closeAll() method will prevent memory leak to appear when trying to unload the context of a webapp.
        Hide
        Owen O'Malley added a comment -

        This looks fine, except for the spurious whitespace change.

        Show
        Owen O'Malley added a comment - This looks fine, except for the spurious whitespace change.
        Hide
        Philippe Gassmann added a comment -

        Ouch sorry, didn't notice that.

        Here is a clean patch.

        Show
        Philippe Gassmann added a comment - Ouch sorry, didn't notice that. Here is a clean patch.
        Hide
        Owen O'Malley added a comment -

        +1

        Show
        Owen O'Malley added a comment - +1
        Hide
        Tom White added a comment -

        I've just committed this. Thanks Philippe!

        Show
        Tom White added a comment - I've just committed this. Thanks Philippe!

          People

          • Assignee:
            Unassigned
            Reporter:
            Philippe Gassmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development