Uploaded image for project: 'Hadoop Distributed Data Store'
  1. Hadoop Distributed Data Store
  2. HDDS-1213

Support plain text S3 MPU initialization request

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.1
    • Component/s: S3
    • Target Version/s:
    • Sprint:
      HDDS Biscayne

      Description

      S3 Multi-Part-Upload (MPU) is implemented recently in the Ozone s3 gateway. We have extensive testing with using 'aws s3api' application which is passed.

      But it turned out that the more simple `aws s3 cp` command fails with 405 Media type not supported error message

      The root cause of this issue is the JAXRS implementation of the multipart upload method:

        @POST
        @Produces(MediaType.APPLICATION_XML)
        public Response multipartUpload(
            @PathParam("bucket") String bucket,
            @PathParam("path") String key,
            @QueryParam("uploads") String uploads,
            @QueryParam("uploadId") @DefaultValue("") String uploadID,
            CompleteMultipartUploadRequest request) throws IOException, OS3Exception {
          if (!uploadID.equals("")) {
            //Complete Multipart upload request.
            return completeMultipartUpload(bucket, key, uploadID, request);
          } else {
            // Initiate Multipart upload request.
            return initiateMultipartUpload(bucket, key);
          }
        }
      

      Here we have a CompleteMultipartUploadRequest parameter which is created by the JAXRS framework based on the media type and the request body. With Content-Type: application/xml it's easy: the JAXRS framework uses the built-in JAXB serialization. But with plain/text content-type it's not possible as there is no serialization support for CompleteMultipartUploadRequest from plain/text.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                elek Marton Elek
                Reporter:
                elek Marton Elek
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 20m
                  4h 20m