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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to