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

Add a generic .isOffline() method to filesystems to probe availability

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.7.1
    • None
    • fs
    • None

    Description

      Looking at some of the spark `HistoryServer` code, they do reflection games to check whether HDFS is in safe mode or not, games which vary with version and could be at risk of failing with the client/server split (fortunately, it's all client-side). Nor do the checks apply to other filesystems, which could have their own online/offline state.

      I propose adding the new methods FileSystem.isOffline(), FileContext.isOffline(), to return true if an FS knows that it is offline. For HDFS: Safe mode. For other filesystems? Maybe network state, disk being r/W, etc. Their choice. The default would be false: an FS is not offline,

      obvously, !isOffline() doesn't guarantee the FS is fully functional; that's why I propose isOffline(); less dangerous than the opposite values of isLive() or isAvailable(), which may be making promises which cannot hold

      Attachments

        Activity

          People

            Unassigned Unassigned
            stevel@apache.org Steve Loughran
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: