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

Log the name of the fsimage being loaded for better supportability

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      When NN starts to load fsimage, it does

       void loadFSImageFile(FSNamesystem target, MetaRecoveryContext recovery,
            FSImageFile imageFile, StartupOption startupOption) throws IOException {
            LOG.debug("Planning to load image :\n" + imageFile);
            ......
          long txId = loader.getLoadedImageTxId();
          LOG.info("Loaded image for txid " + txId + " from " + curFile);
      

      A debug msg is issued at the beginning with the fsimage file name, then at the end an info msg is issued after loading.

      If the fsimage loading failed due to corrupted fsimage (see HDFS-9406), we don't see the first msg. It'd be helpful to always be able to see from NN logs what fsimage file it's loading.

      Two improvements:

      1. Change the above debug to info
      2. If exception happens when loading fsimage, be sure to report the fsimage name being loaded in the error message.

      Attachments

        1. HDFS-9569.005.patch
          9 kB
          Yongjun Zhang
        2. HDFS-9569.004.patch
          10 kB
          Yongjun Zhang
        3. HDFS-9569.003.patch
          9 kB
          Yongjun Zhang
        4. HDFS-9569.002.patch
          3 kB
          Yongjun Zhang
        5. HDFS-9569.001.patch
          1 kB
          Yongjun Zhang

        Issue Links

          Activity

            People

              yzhangal Yongjun Zhang
              yzhangal Yongjun Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: