hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-14423) s3guard will set file length to -1 on a putObjectDirect(stream, -1) call
Date Mon, 26 Jun 2017 18:13:00 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-14423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Steve Loughran updated HADOOP-14423:
------------------------------------
    Attachment: HADOOP-14423-HADOOP-13335-001.patch

Patch 001

this has picked in the HADOOP-13786 checks on put object length, both at the start of the
put and as a final safety check in {{finishedWrite()}}. A new test catches the exception and
asserts that nothing was created, that is, the first check is sufficient. The second is there
to make sure that no codepath will get a -1 into the db.

Testing: s3 frankfurt and ireland. All is well except both tests are returning 400 "bad request"
trying to list/walk key user/stevel in the test {{.ITestS3AContractRootDir.testRecursiveRootListing()}}.
Don't understand that, and I don't believe its related

> s3guard will set file length to -1 on a putObjectDirect(stream, -1) call
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-14423
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14423
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.0.0-alpha4
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-14423-HADOOP-13335-001.patch
>
>
> You can pass a negative number into {{S3AFileSystem.putObjectDirect}}, which means "put
until the end of the stream". S3guard has been using this {{len}} argument: it needs to be
using the actual number of bytes uploaded. Also relevant with client side encryption, when
the amount of data put > the amount of data in the file or stream.
> Noted in the committer branch after I added some more assertions, I've changed it there
so making changes to S3AFS.putObjectDirect to pull the content length to pass in to finishedWrite()
from the {{PutObjectResult}} instead. This can be picked into the s3guard branch



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message