steveloughran commented on a change in pull request #843: HADOOP-15183 S3Guard
store becomes inconsistent after partial failure of rename
URL: https://github.com/apache/hadoop/pull/843#discussion_r286427212
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java
##########
@@ -128,23 +128,22 @@
* This does not attempt to open it; that is only done on the first
* actual read() operation.
* @param ctx operation context
- * @param s3Attributes object attributes from a HEAD request
- * @param contentLength length of content
+ * @param s3Attributes object attributes
* @param client S3 client to use
*/
public S3AInputStream(S3AReadOpContext ctx,
S3ObjectAttributes s3Attributes,
- long contentLength,
AmazonS3 client) {
Preconditions.checkArgument(isNotEmpty(s3Attributes.getBucket()),
"No Bucket");
Preconditions.checkArgument(isNotEmpty(s3Attributes.getKey()), "No Key");
- Preconditions.checkArgument(contentLength >= 0, "Negative content length");
+ long l = s3Attributes.getLen();
Review comment:
I'll rename this to "length"; too easy to mix l and 1. I'd orginally used
'len' but the IDE told me off.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]