Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-15620 Über-jira: S3A phase VI: Hadoop 3.3 features
  3. HADOOP-13884

s3a create(overwrite=true) to only look for dir/ and list entries, not file

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.9.0
    • 3.3.0
    • fs/s3
    • None

    Description

      before doing a create(), s3a does a getFileStatus() to make sure there isn't a directory there, and, if overwrite=false, that there isn't a file.

      Because S3 caches negative HEAD/GET requests, if there isn't a file, then even after the PUT, a later GET/HEAD may return 404; we are generating create consistency where none need exist.

      when overwrite=true we don't care whether the file exists or not, only that the path isn't a directory. So we can just do the HEAD path +"/' and the LIST calls, skipping the HEAD path. This will save an HTTP round trip of a few hundred millis, and ensure that there's no 404 cached in the S3 front end for later callers

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: