Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11112

Journal Nodes should refuse to format non-empty directories

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Journal Nodes should reject the format RPC request if a storage directory is non-empty. The relevant code is in JNStorage#format.

        void format(NamespaceInfo nsInfo) throws IOException {
          setStorageInfo(nsInfo);
      ...
          unlockAll();
          sd.clearDirectory();
          writeProperties(sd);
          createPaxosDir();
          analyzeStorage();
      

      This would make the behavior similar to namenode -format -nonInteractive.

        Attachments

        1. HDFS-11112.001.patch
          3 kB
          Yiqun Lin
        2. HDFS-11112.002.patch
          3 kB
          Yiqun Lin

          Issue Links

            Activity

              People

              • Assignee:
                linyiqun Yiqun Lin
                Reporter:
                arpitagarwal Arpit Agarwal
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: