Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13074 Ozone File System
  3. HDFS-13133

Ozone: OzoneFileSystem: Calling delete with non-existing path shouldn't be logged on ERROR level

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • HDFS-7240
    • HDFS-7240
    • ozone
    • None
    • Reviewed

    Description

      During the test of OzoneFileSystem with spark I noticed ERROR messages multiple times:

      Something like this:

      2018-02-11 15:54:54 ERROR OzoneFileSystem:409 - Couldn't delete o3://bucket1.test/user/hadoop/.sparkStaging/application_1518349702045_0008 - does not exist
      

      I checked the other implemetations, and they use DEBUG level. I think it's expected that the path sometimes points to a non-existing dir/file.

      To be consistent with the other implemetation I propose to lower the log level to debug.

      Examples from other file systems:

      S3AFileSystem:

      } catch (FileNotFoundException e) {
            LOG.debug("Couldn't delete {} - does not exist", f);
            instrumentation.errorIgnored();
            return false;
          } catch (AmazonClientException e) {
            throw translateException("delete", f, e);
          }
      

      Alyun:

         try {
            return innerDelete(getFileStatus(path), recursive);
          } catch (FileNotFoundException e) {
            LOG.debug("Couldn't delete {} - does not exist", path);
            return false;
          }
      

      SFTP:

         } catch (FileNotFoundException e) {
            // file not found, no need to delete, return true
            return false;
          }
      

      SwiftNativeFileSystem:

          try {
            return store.delete(path, recursive);
          } catch (FileNotFoundException e) {
            //base path was not found.
            return false;
          }
      

      Attachments

        1. HDFS-13133-HDFS-7240.001.patch
          0.8 kB
          Marton Elek

        Activity

          People

            elek Marton Elek
            elek Marton Elek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: