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

Journal Nodes should refuse to format non-empty directories

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4
    • None
    • None
    • 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

              linyiqun Yiqun Lin
              arp Arpit Agarwal
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: