You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/01/27 13:53:00 UTC
[jira] [Work logged] (HADOOP-17415) Use S3 content-range header to update length of an object during reads
[ https://issues.apache.org/jira/browse/HADOOP-17415?focusedWorklogId=716419&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-716419 ]
ASF GitHub Bot logged work on HADOOP-17415:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 27/Jan/22 13:52
Start Date: 27/Jan/22 13:52
Worklog Time Spent: 10m
Work Description: monthonk opened a new pull request #3939:
URL: https://github.com/apache/hadoop/pull/3939
### Description of PR
As part of all the openFile work, knowing full length of an object allows for a HEAD to be skipped. But: code knowing only the splits don't know the final length of the file.
If the content-range header is used, then as soon as a single GET is initiated against an object, if the field is returned then we can update the length of the S3A stream to its real/final length
* Skip file status probe on openFile. Content length will be updated on first read.
* As a side effect, modification time, etag and version id also be unknown as there is no probe on openFile.
* Allow content length to be negative value, it means content length is unknown.
* On read file, use information from Content-Range header to update content length.
* If out of range exception occurs on read, ActualObjectSize from exception details can be used to update content length.
### How was this patch tested?
Tested in `eu-west-1` with `mvn -Dparallel-tests -DtestsThreadCount=16 clean verify` (AP tests failed from previous SDK upgrade)
```
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ITestS3ABucketExistence.testAccessPointProbingV2:171->expectUnknownStore:103->lambda$testAccessPointProbingV2$12:172 » IllegalArgument
[ERROR] ITestS3ABucketExistence.testAccessPointRequired:188->expectUnknownStore:103->lambda$testAccessPointRequired$14:189 » IllegalArgument
[INFO]
[ERROR] Tests run: 1063, Failures: 0, Errors: 2, Skipped: 186
[INFO] Results:
[INFO]
[WARNING] Tests run: 108, Failures: 0, Errors: 0, Skipped: 68
```
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
- [x] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Issue Time Tracking
-------------------
Worklog Id: (was: 716419)
Remaining Estimate: 0h
Time Spent: 10m
> Use S3 content-range header to update length of an object during reads
> ----------------------------------------------------------------------
>
> Key: HADOOP-17415
> URL: https://issues.apache.org/jira/browse/HADOOP-17415
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.3.0
> Reporter: Steve Loughran
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> As part of all the openFile work, knowing full length of an object allows for a HEAD to be skipped. But: code knowing only the splits don't know the final length of the file.
> If the content-range header is used, then as soon as a single GET is initiated against an object, if the field is returned then we can update the length of the S3A stream to its real/final length
> Also: when any input stream fails with an EOF exception, we can distinguish stream-interrupted from "no, too far"
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org